You may talk with your physician to order testings for lactose intolerance and gluten intolerance.
Lactose intolerance can be diagnosed by using a blood test, The Lactose Tolerance Test, or The Hydrogen Breath Test, measuring the amount of hydrogen in your breath.
You may be performed Celiac Disease test, determine gluten intolerance, but, this test is known to picks up the small percentage of Gluten-sensitive people who are Celiac (other are missed out, and the elimination diet is suggested).
Although, complicated, still, elimination diet works best for everyone.