No, there is no test because IBS isn't a disease; it's a term used to describe a condition with, generally, no known cause. Basically they test you for everything else first and if you look to be perfectly healthy, they say, oh, you have IBS and then shoo you out the door.
If you think you have a bad bacteria, such as C. difficile, or a parasite, then you can get a stool sample tested. There is also a new test where you breathe into a machine and it analyzes your breath to see if you have a bacteira overgrowth. Both of these are treated with antibiotics, and, if your doctor doesn't have his head in the sand, some probiotics as well. If you have bowel problems after having your gall bladder removed, you can be put on Questran or Welchol for excess bile (diarrhea) or you can get some bile salts if you are constipated. If you are prone to vaginal yeast infections or thrush (yeast infection of the mouth) or even urinary tract infections, then you may have a yeast overgrowth of the intestinal tract too. I don't know if they can find that out by the breath test or not, but I think yeast overgrowth is also treated with antibiotics (and hopefully probiotics).
Then there are the people who have no known cause for their bowel problems, so the theory is that they have some sort of muscles or nerve issues at play in their intestinal tract--usually referred to as a motility issue. Either your intestines push things through too fast or they do it too slow. There are some strong prescription drugs for both problems, but they have a lot of side affects and are only employed for really bad cases. Everyone else just tries to make do with Imodiums or laxatives. There are some new anti-depressant drugs out now, though, that are supposed to help some people with their bowel function; something about the anti-depressant affects the motility of the bowel and makes it function better. I don't know if anyone here is on one of those drugs, but back when I first got on, there were some people trying them. Maybe they got cured and left the forum (one can hope!).