[Paper Review] The Importance of Discerning Flaky from Fault-triggering Test Failures: A Case Study on the Chromium CI
This study evaluates flakiness prediction methods in the Chromium CI and reveals that despite 99.2% precision in detecting flaky tests, 76.2% of fault-triggering test failures are incorrectly classified as flaky, leading to missed regressions. The authors propose failure-focused prediction models using execution features like run duration and flake rate, which improve performance (MCC from 0.20 to 0.42), advocating for a shift from testing-level to failure-level flakiness detection.
Flaky tests are tests that pass and fail on different executions of the same version of a program under test. They waste valuable developer time by making developers investigate false alerts (flaky test failures). To deal with this problem, many prediction methods that identify flaky tests have been proposed. While promising, the actual utility of these methods remains unclear since they have not been evaluated within a continuous integration (CI) process. In particular, it remains unclear what is the impact of missed faults, i.e., the consideration of fault-triggering test failures as flaky, at different CI cycles. To fill this gap, we apply state-of-the-art flakiness prediction methods at the Chromium CI and check their performance. Perhaps surprisingly, we find that, despite the high precision (99.2%) of the methods, their application leads to numerous faults missed, approximately 76.2% of all regression faults. To explain this result, we analyse the fault-triggering failures and show that flaky tests have a strong fault-revealing capability, i.e., they reveal more than 1/3 of all regression faults, indicating an inherent limitation of all methods focusing on identifying flaky tests, instead of flaky test failures. Going a step further, we build failure-focused prediction methods and optimize them by considering new features. Interestingly, we find that these methods perform better than the test-focused ones, with an MCC increasing from 0.20 to 0.42. Overall, our findings imply that on the one hand future research should focus on predicting flaky test failures instead of flaky tests and the need for adopting more thorough experimental methodologies when evaluating flakiness prediction methods, on the other.
Motivation & Objective
- To evaluate the real-world utility of state-of-the-art flakiness prediction methods within an industrial CI pipeline.
- To investigate the impact of misclassifying fault-triggering failures as flaky on regression fault detection.
- To explore whether failure-focused prediction models outperform test-focused models in identifying flaky failures.
- To identify effective features—especially dynamic execution features—for improving failure-level flakiness detection.
- To advocate for a paradigm shift from detecting flaky tests to detecting flaky test failures in CI systems.
Proposed method
- The study analyzes 1.8 million test failures from 10,000 Chromium CI builds over 9 months, classifying failures as flaky or fault-triggering.
- It applies state-of-the-art vocabulary-based flakiness prediction models (e.g., based on test code tokens) to detect flaky tests.
- The authors retrain models to predict flaky failures instead of flaky tests, using failure-level features such as run duration and historical flake rate.
- They evaluate models using standard metrics including precision, recall, and Matthews Correlation Coefficient (MCC).
- The study compares test-focused and failure-focused models, analyzing performance differences and feature contributions.
- It includes data filtering to ensure ground truth reliability by removing passing tests that were flaky or fault-revealing in any build.
Experimental results
Research questions
- RQ1To what extent do existing flakiness prediction methods misclassify fault-triggering test failures as flaky in a real CI pipeline?
- RQ2How does the fault-revealing capability of flaky tests affect the reliability of flakiness prediction in industrial settings?
- RQ3Can failure-focused prediction models outperform test-focused models in distinguishing flaky failures from fault-triggering failures?
- RQ4Which features—especially dynamic execution features—improve the performance of failure-focused flakiness prediction models?
- RQ5What is the practical impact of using flaky test detection on regression fault detection in a large-scale CI system?
Key findings
- Despite a high precision of 99.2% in detecting flaky tests, 76.2% of all fault-triggering test failures were misclassified as flaky by the prediction models.
- Flaky tests exhibit strong fault-revealing capability, triggering more than one-third (1/3) of all regression faults in the dataset.
- Failure-focused prediction models achieved a Matthews Correlation Coefficient (MCC) of 0.42, significantly improving from 0.20 in test-focused models.
- Incorporating dynamic features such as run duration and historical flake rate enhanced the ability to distinguish flaky failures from fault-triggering failures.
- The study reveals a fundamental limitation in current flakiness prediction: focusing on tests rather than failures leads to high fault loss, even with high-precision models.
- The findings suggest that future research should prioritize failure-level flakiness detection and adopt more rigorous evaluation methodologies in real CI environments.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.