There is a test for C dif (Clostridium difficile). You'll need to see a doc to get an Rx and a little container for the sample. You can get it when you get off antibiotics. Usually it's not considered unless you have watery diarrhea at least 3 times a day. There are plenty of other bacteria that could be not in the right combination.
I was tested, found negative, but I'd already been working hard to raise my good bacteria, using probiotics for a couple of weeks. My doc says he can usually smell it, knew I wouldn't be positive for it. I had to change probiotics because the first one didn't work. The next one which I took twice a day, by Phillips, worked and was not as expensive as some that are available.
The gas and pain made me nauseous and ruined my appetite - maybe because of the bloating. I'm still taking it once a day.
Watching my diet - avoiding gassy foods helped me. Bread or ice cream particularly set off my gas bacteria, often within minutes.