Harmless, painless swellings include epididymal cysts, hydroceles, varioceles, and spermatoceles. Cancer of the testis is an unusual cause of usually painless swelling. Painful testicular swelling can be due to a direct blow, torsion of the testes, orchitis (inflammation of the testis), or epididymo-orchitis (inflammation of the testis and epididymis) . Any swelling of the testes should be assessed immediately by a doctor. An ultrasound scan may be done to aid diagnosis.