This is the most common stool test to detect H. pylori . The test looks for proteins (antigens) associated with H. pylori infection in the stool. Stool PCR test. A lab test called a stool polymerase chain reaction (PCR) test can detect H. pylori infection in stool.