Sperm testing can be done in a sperm lab by looking through a microscope. The patient should abstain from sex for three to seven days before the sperm test so that the sperm can be of good quality. The patient first discharges the sperm into a sterile tube, which can be used to retrieve the sperm by masturbation. Be careful to clean your hands before masturbation. After the sperms are discharged into the sterile tube, one should promptly go to the semen examination laboratory where the viability, count and malformation rate of the sperms are observed through a microscope. If you want the sperms to be of good quality, you should pay attention to avoid eating spicy and stimulating foods as much as possible in your daily life, prohibit smoking and drinking, avoid staying up late and avoid sitting for a long time. Patients should pay attention to timely nutrition and rest after sperm retrieval, and should go to regular hospitals for consultation and treatment in time if any adverse reaction occurs.