Doctor explaining stomach ulcer test to patient

Stomach ulcer test: what you need to know

A stomach ulcer test detects either the ulcers themselves or Helicobacter pylori (H. pylori), the bacterium responsible for the majority of peptic ulcers. If you have had persistent stomach pain, burning between meals, or unexplained nausea, getting tested is the right next step. The good news is that modern testing is far less daunting than most people expect. Several options exist, from a simple breath test to a more thorough endoscopy, and the right choice depends on your symptoms and medical history.

What types of stomach ulcer tests are available?

Diagnostic testing for H. pylori primarily includes the urea breath test, stool antigen test, and blood antibody test, with breath and stool tests being more accurate for active infection. For direct visualisation of an ulcer, upper endoscopy is the gold standard. Understanding each method helps you have a more informed conversation with your GP.

Urea breath test

The urea breath test is one of the most reliable non-invasive options. You swallow a urea solution, and if H. pylori is present, the bacteria convert it to carbon dioxide. A breath sample taken 10 minutes later reveals whether the infection is active. This test is also used after treatment to confirm the bacteria have been cleared.

Man performing urea breath test at home

Stool antigen test

The stool antigen test identifies H. pylori proteins in a faecal sample. It is accurate for both initial diagnosis and post-treatment confirmation. You collect a small sample at home and send it to a laboratory, making it one of the more convenient non-invasive options available.

Blood antibody test

A blood test checks for antibodies your immune system produced in response to H. pylori. The catch is significant. Blood tests cannot distinguish between a current and a past infection because antibodies persist long after the bacteria are gone. This makes blood testing unsuitable for confirming whether treatment has worked.

Upper endoscopy (EGD)

Upper endoscopy is the gold standard for diagnosing peptic ulcers. A thin, flexible camera is passed through your mouth and into your stomach, allowing a doctor to see ulcers directly and take biopsies. It is performed under sedation in a hospital or clinic setting, so discomfort is minimal.

Infographic comparing stomach ulcer test types

Test How it works Best for
Urea breath test Detects CO2 from H. pylori activity Active infection, post-treatment check
Stool antigen test Finds H. pylori proteins in stool Active infection, post-treatment check
Blood antibody test Detects antibodies to H. pylori Initial screening only
Upper endoscopy (EGD) Direct camera view with biopsy Alarm symptoms, treatment failure

Pro Tip: If you have already taken antibiotics or proton pump inhibitors recently, tell your doctor before any breath or stool test. Both can suppress H. pylori activity and produce a false negative result.

When should you get tested for a stomach ulcer?

Knowing when to seek a stomach ulcer assessment saves you from months of unnecessary discomfort. Symptoms that persist for more than four weeks, or that keep returning, are a clear signal to get checked. Testing is indicated when symptoms last over a month or when you have a history of ulcers.

Some symptoms require urgent attention rather than a routine appointment. These are called alarm symptoms, and they include:

  • Unintentional weight loss with no obvious cause
  • Vomiting blood or material that looks like coffee grounds
  • Black, tarry stools (a sign of internal bleeding)
  • Difficulty swallowing
  • Anaemia or persistent fatigue

Patients with signs of upper GI bleeding require immediate evaluation and urgent endoscopy. These symptoms should never be left until a routine GP slot becomes available. Go to A&E or call 999.

Beyond alarm symptoms, certain risk factors also push testing up the priority list. Regular use of NSAIDs such as ibuprofen or aspirin irritates the stomach lining and raises ulcer risk. A personal or family history of peptic ulcers is another reason to get checked sooner rather than later. Age matters too. International clinical guidelines recommend starting with non-invasive H. pylori testing for most people with dyspepsia, but reserving endoscopy for older patients, those with alarm symptoms, or those who have not responded to initial treatment.

How to prepare for and perform stomach ulcer tests

Preparation varies depending on which test you are having. Getting it right matters because poor preparation is one of the most common reasons for inaccurate results.

  1. Urea breath test. Fast for at least four hours before the test. Avoid antibiotics and proton pump inhibitors (such as omeprazole) for at least two weeks beforehand if possible. Your GP will advise on this. On the day, you simply drink a small amount of urea solution, wait around 10 minutes, and breathe into a collection bag.

  2. Stool antigen test. No special diet is required, but again, avoid antibiotics and proton pump inhibitors for two weeks before collecting your sample. Use the collection kit provided to gather a small amount of stool. Seal it carefully and follow the storage instructions, as samples left too long at room temperature can degrade.

  3. Blood test. No fasting is needed. A nurse or phlebotomist takes a small blood sample from your arm. Results are usually available within a few days. Remember that a positive result here only confirms past or present exposure, not necessarily an active infection.

  4. Upper endoscopy. You will need to fast for at least six hours before the procedure. Sedation is offered, and most people feel drowsy rather than fully asleep. The camera is passed through your mouth while you lie on your side. Biopsies are taken during endoscopy not only to detect H. pylori but also to rule out malignancy, particularly for people over 50 or with suspicious signs. You will need someone to take you home afterwards.

Pro Tip: If you are doing an at-home H. pylori test, read the full instructions before you start. Rushing the collection process is the most common cause of an invalid result. Rapidtest’s at-home H. pylori test kit includes clear step-by-step guidance to make the process straightforward.

What do your results mean and what happens next?

A positive breath or stool test confirms an active H. pylori infection. That is a clear signal for treatment, which typically involves a short course of two antibiotics combined with a proton pump inhibitor. This combination is called triple therapy and is effective in the majority of cases.

A negative breath or stool test makes active H. pylori infection unlikely. If your symptoms persist despite a negative result, your doctor may consider other causes such as GERD, gastritis, or gastric cancer. Clinicians emphasise ruling out these conditions during ulcer evaluation, especially via endoscopy.

Blood test results need careful interpretation. A positive blood test means your body has produced antibodies to H. pylori at some point. It does not confirm the infection is still active. Stool or breath tests should verify treatment success rather than a follow-up blood test, which will remain positive even after successful eradication.

Endoscopy findings carry their own grading system. The Forrest classification grades ulcers by bleeding risk during the procedure, guiding decisions about whether to apply cautery or clips on the spot. Clean-based ulcers carry a low rebleeding risk and are managed with medication alone. Active bleeding ulcers require immediate endoscopic intervention.

After treatment, a test of cure is standard practice. You repeat a breath or stool test at least four weeks after finishing antibiotics to confirm eradication. Skipping this step is a mistake many people make, only to find symptoms return months later because the infection was never fully cleared.

The following signs always warrant urgent medical attention, regardless of what any previous test showed:

  • Sudden, severe stomach pain that does not ease
  • Vomiting blood or passing black stools
  • Feeling faint or collapsing
  • Rapid heart rate with stomach pain

Key takeaways

A stomach ulcer diagnosis relies on choosing the right test for your symptoms. Breath and stool tests confirm active H. pylori infection, endoscopy confirms the ulcer itself, and blood tests alone are not enough to guide treatment decisions.

Point Details
Breath and stool tests are most accurate Use these for active H. pylori infection and to confirm eradication after treatment.
Blood tests have a key limitation They cannot confirm current infection, making them unsuitable for post-treatment checks.
Endoscopy is for serious cases Reserve it for alarm symptoms, older patients, or when non-invasive tests fail to explain symptoms.
Preparation affects accuracy Avoid antibiotics and proton pump inhibitors for two weeks before breath or stool tests.
Always do a test of cure Repeat a breath or stool test four weeks after finishing antibiotics to confirm H. pylori is gone.

Why I think too many people wait far too long to get tested

People put off testing for stomach ulcers for all sorts of reasons. They assume the pain is just stress, or they tell themselves it will pass. I have seen this pattern repeatedly, and the frustrating thing is that the tests themselves are genuinely simple. A urea breath test takes about 15 minutes. A stool antigen test requires nothing more than a small sample collected at home.

What concerns me most is the number of people who sit with symptoms for months before acting. H. pylori affects about two thirds of the global population, yet most people have no idea they are carrying it. The bacteria can sit quietly for years before triggering an ulcer. By the time symptoms become hard to ignore, some damage has already been done.

The other misconception I come across is that a negative result means everything is fine. A negative H. pylori test does not rule out an ulcer caused by NSAID use, for example. Symptoms deserve a proper explanation, not just reassurance that one test came back clear.

My honest advice is this. If your stomach has been off for more than a month, do not wait for it to sort itself out. Get a test. The non-invasive options are accurate, quick, and far less stressful than most people imagine. And if your GP suggests endoscopy, that is not a sign things are serious. It is a sign your doctor wants a proper answer.

— Jack

Rapidtest makes stomach health screening simple

Waiting weeks for a GP appointment when your stomach has been playing up is frustrating. Rapidtest offers an at-home H. pylori rapid test that gives you results in 15 minutes, with no lab visit or appointment needed.

https://rapidtest.co

The kit is straightforward to use and comes with clear instructions so you know exactly what you are doing. If you want to go further, Rapidtest’s health screening test kits cover a wide range of markers beyond digestive health. Proactive testing at home puts you in a better position to have an informed conversation with your GP when it matters most.

FAQ

What is the most accurate stomach ulcer test?

The urea breath test and stool antigen test are the most accurate non-invasive options for detecting active H. pylori infection. Upper endoscopy is the most accurate overall, as it directly visualises ulcers and allows biopsy.

Can a blood test diagnose a stomach ulcer?

A blood test can detect H. pylori antibodies but cannot confirm whether the infection is currently active. It is not suitable for confirming treatment success, as antibodies persist after the bacteria are gone.

How do I know if I need an endoscopy?

International clinical guidelines recommend endoscopy for people with alarm symptoms such as weight loss, vomiting blood, or difficulty swallowing, and for older patients or those who have not responded to initial treatment.

How long after treatment should I retest?

Wait at least four weeks after finishing antibiotics before repeating a breath or stool test. Testing too soon can produce a false negative result because residual antibiotic activity may temporarily suppress H. pylori.

Can I test for H. pylori at home?

Yes. At-home stool antigen tests and rapid test kits are available for H. pylori screening. Rapidtest’s home testing guide covers exactly how to use them and what to do with your results.

Back to blog