What does a stool analysis test for?

Several things. It usually looks fro signs of an infectious process or reasons for diarrhea.