An empirical analysis of flaky tests
The DOI matches its Crossref record; 17 of the 17 references it cites were found in a registry or an index.
Abstract
Regression testing is a crucial part of software development. It checks that software changes do not break existing functionality. An important assumption of regression testing is that test outcomes are deterministic: an unmodified test is expected to either always pass or always fail for the same code under test. Unfortunately, in practice, some tests often called flaky tests—have non-deterministic outcomes. Such tests undermine the regression testing as they make it difficult to rely on test results. We present the first extensive study of flaky tests. We study in detail a total of 201 commits that likely fix flaky tests in 51 open-source projects. We classify the most common root causes of flaky tests, identify approaches that could manifest flaky behavior, and describe common strategies that developers use to fix flaky tests. We believe that our insights and implications can help guide future research on the important topic of (avoiding) flaky tests.
Overview
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Integrity signals
Registry
Cites
Statistics
Verification
Claims the paper makes
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Self-check
Percentages, sums and reported differences re-computed from the paper’s own numbers.
The self-check needs the paper’s full text.
Citations
Cites
An empirical study of the reliability of UNIX utilities
Miller, B. P., Fredriksen, L., & So, B. (1990) · Communications of the ACM · doi:10.1145/96267.96279 · Cited by 1,281
Learning from mistakes: a comprehensive study on real world concurrency bug characteristics
Lu, S., Park, S., Seo, E., & Zhou, Y. (2008) · Proceedings of the 13th international conference on Architectural support for programming languages and operating systems · doi:10.1145/1346281.1346323 · Cited by 895
Have things changed now?: an empirical study of bug characteristics in modern open source software
Li, Z., Tan, L., Wang, X., Lu, S., Zhou, Y., & Zhai, C. (2006) · Proceedings of the 1st workshop on Architectural and system support for improving software dependability · doi:10.1145/1181309.1181314 · Cited by 291
Characterizing and predicting which bugs get fixed: an empirical study of Microsoft Windows
Guo, P. J., Zimmermann, T., Nagappan, N., & Murphy, B. (2010) · Proceedings of the 32nd ACM/IEEE International Conference on Software Engineering - Volume 1 · doi:10.1145/1806799.1806871 · Cited by 265
The missing links: bugs and bug-fix commits
Bachmann, A., Bird, C., Rahman, F., Devanbu, P., & Bernstein, A. (2010) · Proceedings of the eighteenth ACM SIGSOFT international symposium on Foundations of software engineering · doi:10.1145/1882291.1882308 · Cited by 190
Empirically revisiting the test independence assumption
Zhang, S., Jalali, D., Wuttke, J., Muşlu, K., Lam, W., Ernst, M. D., & Notkin, D. (2014) · Proceedings of the 2014 International Symposium on Software Testing and Analysis · doi:10.1145/2610384.2610404 · Cited by 154
Automated atomicity-violation fixing
Jin, G., Song, L., Zhang, W., Lu, S., & Liblit, B. (2011) · Proceedings of the 32nd ACM SIGPLAN Conference on Programming Language Design and Implementation · doi:10.1145/1993498.1993544 · Cited by 145
Automated atomicity-violation fixing
Jin, G., Song, L., Zhang, W., Lu, S., & Liblit, B. (2011) · ACM SIGPLAN Notices · doi:10.1145/1993316.1993544 · Cited by 135
ReAssert: Suggesting Repairs for Broken Unit Tests
Daniel, B., Jagannath, V., Dig, D., & Marinov, D. (2009) · IEEE/ACM International Conference on Automated Software Engineering (ASE) · doi:10.1109/ase.2009.17 · Cited by 110
Self-citationAutomatic detection of floating-point exceptions
Barr, E. T., Vo, T., Le, V., & Su, Z. (2013) · ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL) · doi:10.1145/2429069.2429133 · Cited by 101
Cited by
DeepFL: integrating multiple fault diagnosis dimensions for deep fault localization
Li, X., Li, W., Zhang, Y., & Zhang, L. (2019) · Proceedings of the 28th ACM SIGSOFT International Symposium on Software Testing and Analysis · doi:10.1145/3293882.3330574 · Cited by 336
Shamshiri, S., Just, R., Rojas, J. M., Fraser, G., McMinn, P., & Arcuri, A. (2015) · 2015 30th IEEE/ACM International Conference on Automated Software Engineering (ASE) · doi:10.1109/ase.2015.86 · Cited by 230
“The issue of static state has been raised in the context of test generation previously [10], and has recently also been verified in the context of manually written test suites [7], [27], [46].”
Practical regression test selection with dynamic file dependencies
Gligoric, M., Eloussi, L., & Marinov, D. (2015) · Proceedings of the 2015 International Symposium on Software Testing and Analysis · doi:10.1145/2771783.2771784 · Cited by 216
“If a test passes and fails for the same code revision, it is often called a “flaky test” [39].”
BackgroundSelf-citationTrade-offs in continuous integration: assurance, security, and flexibility
Hilton, M., Nelson, N., Tunnell, T., Marinov, D., & Dig, D. (2017) · Proceedings of the 2017 11th Joint Meeting on Foundations of Software Engineering · doi:10.1145/3106237.3106270 · Cited by 207
“Another question asked developers to estimate the number of CI builds failing due to non-deterministic ( aky) tests [27].”
BackgroundSelf-citationGiray, G. (2021) · Journal of Systems and Software · doi:10.1016/j.jss.2021.111031 · Cited by 187
D e F laker: automatically detecting flaky tests
Bell, J., Legunsen, O., Hilton, M., Eloussi, L., Yung, T., & Marinov, D. (2018) · Proceedings of the 40th International Conference on Software Engineering · doi:10.1145/3180155.3180164 · Cited by 170
“We also consulted a prior study of flaky tests [61], selecting from it 10 flaky tests (from 5 projects) that we could build and run.”
BackgroundMethodInfluentialSelf-citationUnderstanding flaky tests: the developer’s perspective
Eck, M., Palomba, F., Castelluccio, M., & Bacchelli, A. (2019) · Proceedings of the 2019 27th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering · doi:10.1145/3338906.3338945 · Cited by 169
“[24] from a different data source and with a different methodology, with the aim of validating and extending it with more data and dimensions.”
BackgroundMethodInfluentialBugs.jar: a large-scale, diverse dataset of real-world Java bugs
Saha, R. K., Lyu, Y., Lam, W., Yoshida, H., & Prasad, M. R. (2018) · Proceedings of the 15th International Conference on Mining Software Repositories · doi:10.1145/3196398.3196473 · Cited by 168
“There may be also some flaky test cases, whose results are non-deterministic [6].”
BackgroundLarge Language Models for Software Engineering: A Systematic Literature Review
Hou, X., Zhao, Y., Liu, Y., Yang, Z., Wang, K., Li, L., Luo, X., Lo, D., Grundy, J., & Wang, H. (2023) · arXiv · doi:10.48550/arxiv.2308.10620 · Cited by 114
A large-scale longitudinal study of flaky tests
Lam, W., Winter, S., Wei, A., Xie, T., Marinov, D., & Bell, J. (2020) · Proceedings of the ACM on Programming Languages · doi:10.1145/3428270 · Cited by 64
“Our literature search reveals only two research papers [Gambi et al. 2018; Luo et al. 2014] that mention checking whether tests are flaky when they are added, but both studies are quite limited to just a handful of flaky tests that were manually studied, and in at least one study [Luo et al. 2014]…”
BackgroundInfluentialSelf-citationiPFlakies: a framework for detecting and fixing python order-dependent flaky tests
Wang, R., Chen, Y., & Lam, W. (2022) · Proceedings of the ACM/IEEE 44th International Conference on Software Engineering: Companion Proceedings · doi:10.1145/3510454.3516846 · Cited by 36
BigCodeBench: Benchmarking Code Generation with Diverse Function Calls and Complex Instructions
Zhuo, T. Y., Vu, M. C., Chim, J., Hu, H., Yu, W., Widyasari, R., Yusuf, I. N. B., Zhan, H., He, J., Paul, I., et al. (2024) · arXiv · doi:10.48550/arxiv.2406.15877 · Cited by 29
“…quality, we implement a three-fold human curation process: Examination We first perform a rigorous manual examination of the benchmarks, guided by a set of detailed guidelines (Appendix G.3) to add more test cases and resolve a list of runtime issues due to the LLM-generated flaky tests [37].”
BackgroundMethodGitBug-Java: A Reproducible Benchmark of Recent Java Bugs
Silva, A., Saavedra, N., & Monperrus, M. (2024) · Proceedings of the 21st International Conference on Mining Software Repositories · doi:10.1145/3643991.3644884 · Cited by 23
“Second, the reproductions must not include flaky tests, which are tests that can intermittently pass or fail [12].”
BackgroundMa11y: A Mutation Framework for Web Accessibility Testing
Tafreshipour, M., Deshpande, A., Mehralian, F., Ahmed, I., & Malek, S. (2024) · Proceedings of the 33rd ACM SIGSOFT International Symposium on Software Testing and Analysis · doi:10.1145/3650212.3652113 · Cited by 10
“In essence, this is similar to the problem of running flaky tests [33] for the conventional mutation testing.”
Method
Metadata
- Authors
- Luo, Q., Hariri, F., Eloussi, L., & Marinov, D.
- Venue
- Proceedings of the 22nd ACM SIGSOFT International Symposium on Foundations of Software Engineering
- Publisher
- ACM
- Published
- 2014-11-11
- Pages
- 643-653
- OpenAlex
- W2026926213
- Cited by
- 450
- References
- 17
- FWCI
- 8.19
- Type
- conference paper
- Language
- en
- Open access
- closed
About these checks
Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.
Statistics and arithmetic are recomputed, not judged.
Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.
What counts as a claim ›How we measure confidence ›How we check this ›
Are you an author, or do you see a problem with this page? Request a review
Data sources
Bibliographic data: Semantic Scholar, OpenAlex, Crossref.
Contains information from the Semantic Scholar Academic Graph Datasets, made available under the ODC Attribution License (ODC-BY 1.0).
Semantic Scholar’s data is described in: Kinney, R., et al. (2023). The Semantic Scholar Open Data Platform. arXiv:2301.10140.