← Latest papers
💻 computer science

Flaky Tests in a Large Industrial Database Management System: An Empirical Study of Fixed Issue Reports for SAP HANA

This paper presents an LLM-based approach to automatically categorize root causes of flaky tests in the SAP HANA database system, revealing that concurrency issues are the most prevalent cause and highlighting the need for mitigation strategies tailored to different test types.

Original authors: Alexander Berndt, Thomas Bach, Sebastian Baltes

Published 2026-02-04
📖 5 min read🧠 Deep dive

Original authors: Alexander Berndt, Thomas Bach, Sebastian Baltes

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are a chef running a massive, high-end restaurant (SAP HANA). Every day, you have a team of sous-chefs (developers) who write new recipes (code). Before these recipes go to the customers, they must pass a taste test (software testing).

Usually, a taste test is simple: the dish is either delicious (pass) or it's burnt (fail). But sometimes, the test is flaky. This means if you taste the same dish three times in a row, it might taste perfect the first time, burnt the second, and perfect again the third. This is confusing! The kitchen staff doesn't know if the recipe is actually good or if the test itself is broken.

This paper is a detective story about how the SAP HANA kitchen figured out why their taste tests were so flaky, using a new kind of "super-robot assistant" (Large Language Models) to help them sort through thousands of complaints.

Here is the breakdown of their investigation:

1. The Problem: The "Maybe" Tests

In a huge industrial kitchen, you can't afford to guess. If a test is flaky, the kitchen stops. The head chef (the developer) has to wait, re-run the test, and waste time. It breaks trust; the staff starts ignoring the test results because they seem unreliable.

2. The Detective Work: Using Robot Assistants

The researchers had a mountain of 559 "complaint tickets" from the kitchen. Each ticket described a flaky test and what the developers thought was wrong. Reading all of these by hand would take forever.

So, they tried a new trick: they asked three different AI "robot assistants" to read the tickets and sort them into categories (like "Timing Issue," "Bad Recipe," or "Broken Oven").

  • The Strategy: They didn't just ask once. They asked each robot the same question five times. If a robot gave the same answer 4 out of 5 times, they trusted it. Then, they took a "vote" between the three robots.
  • The Result: The robots agreed with each other very well, and they agreed with human experts about 63% of the time. This proved that robots can help humans sort through massive piles of data quickly and accurately.

3. The Big Discovery: The "Rush Hour" Problem

After sorting the tickets, the researchers found the most common culprit: Concurrency (23% of all cases).

The Analogy: Imagine a busy kitchen where two chefs are trying to use the same blender at the exact same time. One chef grabs it, the other pushes them away, and suddenly the blender breaks or the smoothie gets mixed up. In software, this is called a "race condition." Because SAP HANA is a database that handles thousands of requests at once (like a very busy kitchen), these "clashes" happen often.

4. The Two Types of Chefs: Unit Tests vs. System Tests

The kitchen has two types of testers, and they have different problems:

  • The "Micro-Tasters" (Native Unit Tests): These chefs test tiny, specific ingredients (like just the salt or just the flour).
    • Their Flaky Problem: They often fail because of Platform issues (the specific stove they are using behaves differently) or Isolation (one test accidentally left a dirty spoon that messed up the next test).
  • The "Full-Meal Tasters" (System Tests): These chefs test the entire meal from start to finish.
    • Their Flaky Problem: They often fail because of Timeouts (the meal took too long to cook and the oven shut off) or Oracle Brittleness (the test was too picky, expecting the sauce to be exactly 3.0 grams, but it was 3.01 grams, so it failed).

5. The "Group Failure" Pattern

The researchers also looked at tickets where multiple tests failed at the same time.

  • The Finding: When many tests fail together, it's almost always a Concurrency issue (the whole kitchen is in a rush) or a Platform issue (the whole building's power is flickering).
  • The Trend: Over time, the number of "Timeout" complaints dropped significantly after the kitchen changed its rules to have a single, global time limit for all cooking. This shows that fixing the rules can fix the flakiness.

6. The Conclusion: It's Not Just One Thing

The biggest takeaway is that flaky tests are rarely caused by just one simple thing. Sometimes a test fails because of a race condition and a specific computer setting and a slow network all at once.

The paper suggests that instead of trying to find a single "root cause" (like blaming just the salt), we should accept that these failures are a multi-label problem—a complex mix of ingredients that go wrong together.

In short: The researchers used AI robots to read thousands of bug reports and found that in this massive database system, the biggest cause of confusion is "too many things happening at once" (Concurrency). They also learned that different types of tests fail for different reasons, and that fixing flakiness requires understanding these complex, overlapping causes.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →