I agree with the stool sample to exclude an infection.
If negative, other causes can include irritable bowel, inflammatory bowel disease, colitis, or more seriously, a mass.
A colonoscopy would be indicated if the symptoms continue. If the tests remain negative, you can consider treatment for irritable bowel syndrome. This can include antispasmodic agents, as well as increasing the amount of fiber in the diet.
These options can be discussed with your personal physician.
This answer is not intended as and does not substitute for medical advice - the information presented is for patient education only. Please see your personal physician for further evaluation of your individual case.