As a general rule, sperm samples are obtained by masturbation, but in case of aspermia (i.e. absence of spermatozoa in the ejaculate) static or death spermatozoa, it is necessary to collect them from the epididymis or the testicle.
The testicular biopsy is a surgical procedure in which a small portion is extracted to assess if there are spermatozoa, or if they present some sort of alteration. The procedure lasts 15 to 20 minutes, being a painless intervention.
Besides its diagnostical purpose, this procedure is used to collect spermatazoa tha can be used in assisted reproductive techniques in order to achieve preganancy.