Noticed pain and swelling in testicle after bowel movement. How to get relief?

Every time I have a bowel movement my testicles or some times just one seem to swell and recede or contract upwards, also they are very pain full and the pain worsens after defacation, but also the bowel movement it's self is extremely painful and feels like ripping or tearing and the stool is always bloody both in the toilet and there is a good amount of blood when wiping. Oh and this isn't just one time I'm talking for the last 5 months every bowel movement

Few things should be ruled out in your case. Testicle pain can be caused by inguinal hernia, testicle torsion, epidydymis and testicle inflammation. Blood in stool and pain during passing stool in most cases is caused by anal fissure or hemorrhoids. However other blood in stool reasons should be ruled out.
Abdominal, groin and testicles ultrasound is advisable. Fool blood work and urine analysis should be done. Colonoscopy should be performed as well.

In conclusion, you probably are suffering from inguinal hernia. Such hernia probably caused problem in passing stools what has leaded to anal fissure.