The practice of briefly keying a microphone (hitting the push-to-talk/PTT button) to see if a repeater responds with a courtesy tone is commonly known as kerchunking (or ker-chunking) in ham-speak.
Don’t do it! Don’t be a kerchunker, even though it’s often a quick and convenient way of verifying that you can hit a repeater.
For one, it is technically illegal. All transmissions must be identified (with rare exceptions).
Just because you hear it happening and the probability of getting caught is very low doesn’t make it right.
However, the main reason not to key a mic without identifying yourself is that it
is both annoying and disruptive. It’s bad etiquette and almost always discouraged in published guidelines by the repeater owner.
If you really want to test your connection to a repeater, take the extra second to speak your call sign into the mic. Or say “testing”, followed by your call sign. Or ID and ask for a signal report, which will give you even more info than just to hear a courtesy tone.
On a related note, if you want to test transmit power or SWR or something like that, consider using a simplex frequency to avoid tying up a repeater.