If your doctor thinks that your IBS may be caused by an infection you will be asked to give a sample of your faeces. This will be sent to a laboratory for tests. You may also need an X-ray of your abdomen, eg a barium enema. In this test a liquid containing a small amount of barium- a type of metal is passed through a tube into your back passage where it enters the large intestine. The barium allows inflamed or ulcerated areas of the colon to show up clearly on X-ray images.
Attribution: BUPA