One of my testicles hurts and I urinated very little blood and it stopped but I still have mild pain what can it be?

Kidney stone? Pain radiating down to the groin on one side and blood in the urine may be a sign of a kidney stone passing. See your doctor or urologist.
Epididmitis. You have two issues that may be related.It sound like an infection is going on in your urinary tract that may have progressed to your testicle. Antibiotics may solve both problems. See a doctor real soon.