As part of infertility testing if your partner is having trouble becoming pregnant or after a vasectomy to determine if the operation was successful