The Importance of Accounting for Execution Failures when Predicting Test Flakiness
Open Access
- 27 October 2024
- conference paper
- Published by Association for Computing Machinery (ACM)
- p. 1979-1989
Abstract
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 issue, many prediction methods have been proposed. However, the utility of these methods remains unclear since they are typically evaluated based on single-release data, ignoring that in many cases tests that fail flakily in one release also correctly fail (indicating the presence of bugs) in some other, meaning that it is possible for subsequent correctly-failing cases to pass unnoticed. In this paper, we show that this situation is prevalent and can raise significant concerns for both researchers and practitioners. In particular, we show that flaky tests, tests that exhibit flaky behaviour at some point in time, have a strong fault-revealing capability, i.e., they reveal more than 1/3 of all encountered regression faults. We also show that 76.2%, of all test executions that reveal faults in the codebase under test are made by tests that are classified as flaky by existing prediction methods. Overall, our findings motivate the need for future research to focus on predicting flaky test executions instead of flaky tests.Keywords
Funding Information
- FNR (C20/IS/14761415/TestFlakes)
This publication has 23 references indexed in Scilit:
- A Replication Study on the Usability of Code Vocabulary in Predicting Flaky Tests2021
- What is the Vocabulary of Flaky Tests? An Extended Replication2021
- An Empirical Study of Flaky Tests in Python2021
- Shake It! Detecting Flaky Tests Caused by Concurrency with Shaker2020
- Assessing Transition-Based Test Selection Algorithms at Google2019
- Predictive Test Selection2019
- From Start-ups to Scale-ups: Opportunities and Open Problems for Static and Dynamic Program Analysis2018
- Towards a Bayesian Network Model for Predicting Flaky Automated Tests2018
- Empirically Detecting False Test Alarms Using Association Rules2015
- An orchestrated survey of methodologies for automated software test case generationJournal of Systems and Software, 2013