Groin lymph nodes swell up in various conditions, the commonest being infection of the genitals. A viral infection, inguinal hernia, hydrocele,
drug reaction, cancer and STD. Besides HIV, other infections like Chlamydia, gonorrhea, trichomonas etc should be looked into—that is you need to get a complete STD panel done.
Pain in testicle could be due to infection, like prostatitis, epididymitis or orchitis. Get a culture sensitivity test for both semen and urine done.