• Blood test. Analysis of a blood sample may reveal evidence of an active or previous H. pylori infection in your body. However, breath and stool tests are better at detecting active H. pylori infections than is a blood test.