What Made This Test Flake? Pinpointing Classes Responsible for Test Flakiness
Sarra Habchi, Guillaume Haben, Jeongju Sohn, Adriano Franci, Mike, Papadakis, Maxime Cordy, Yves Le Traon

TL;DR
This paper adapts spectrum-based fault localisation techniques to identify classes responsible for test flakiness, significantly reducing the number of classes developers need to inspect to fix flaky tests.
Contribution
It introduces a novel approach combining SBFL with change history and static metrics to localize flaky classes, improving efficiency over existing methods.
Findings
SBFL combined with additional data ranks flaky classes in top-1 in 26% of cases.
The approach reduces inspection effort to 19% of classes covered by flaky tests.
Effective in major flakiness categories like concurrency and asynchronous waits.
Abstract
Flaky tests are defined as tests that manifest non-deterministic behaviour by passing and failing intermittently for the same version of the code. These tests cripple continuous integration with false alerts that waste developers' time and break their trust in regression testing. To mitigate the effects of flakiness, both researchers and industrial experts proposed strategies and tools to detect and isolate flaky tests. However, flaky tests are rarely fixed as developers struggle to localise and understand their causes. Additionally, developers working with large codebases often need to know the sources of non-determinism to preserve code quality, i.e., avoid introducing technical debt linked with non-deterministic behaviour, and to avoid introducing new flaky tests. To aid with these tasks, we propose re-targeting Fault Localisation techniques to the flaky component localisation…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Testing and Debugging Techniques · Software Engineering Research · Software System Performance and Reliability
