Parry, O., Kapfhammer, G.M., Hilton, M. et al. (1 more author) (2026) Systemic flakiness: a study of flaky test failure co-occurrence using Java and Python projects. IEEE Transactions on Software Engineering. pp. 1-21. ISSN: 0098-5589
Abstract
Flaky tests are test cases that fail non-deterministically without code modifications. They disrupt continuous integration, waste developer time, and obscure real faults. While prior work largely treats flakiness test-by-test, we show that failures often co-occur in ways that suggest shared causes, a phenomenon we call systemic flakiness. This raises the possibility that developers could reduce repair effort by identifying shared failure mechanisms and investigating co-failing tests together. We study this across 36 open-source Java and Python projects by combining two datasets with 10,000 (Java) and 12,000 (Python) test suite runs per project. We cluster flaky tests by failure co-occurrence to quantify the phenomenon and analyze how different rerun budgets influence its manifestation. We then evaluate machine learning models trained on static test case distance metrics to predict co-occurrence as a way to suggest which known flaky tests may warrant joint inspection, and qualitatively examine likely causes.Systemic flakiness is prevalent: 77% of flaky tests belong to a cluster, with a mean cluster size of 21.1. On average, 47% of flaky tests and 49% of the number of clusters are identified by 2,000 test suite runs. The proportion of detected flaky tests grouped into a cluster remains high even under reduced rerun budgets, although the resultant clusters only partially approximate the clusters computed from the full set of runs. The Extra Trees model achieved a mean R<sup>2</sup> of 0.79 when predicting failure co-occurrence between flaky tests using distance metrics that include those based on embeddings of test case source code, reflecting partial predictive power. Qualitative analysis shows that systemic flakiness mainly arises from intermittent network problems and unstable external services or libraries, with filesystem pollution and resource mismanagement also being common.
Metadata
| Item Type: | Article |
|---|---|
| Authors/Creators: |
|
| Copyright, Publisher and Additional Information: | © 2026 The Authors. Except as otherwise noted, this author-accepted version of a journal article published in Systemic Flakiness: A Study of Flaky Test Failure Co-Occurrence Using Java and Python Projects is made available via the University of Sheffield Research Publications and Copyright Policy under the terms of the Creative Commons Attribution 4.0 International License (CC-BY 4.0), which permits unrestricted use, distribution and reproduction in any medium, provided the original work is properly cited. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/ |
| Keywords: | Testing; Modeling; Distance measurement; Python; Radio access networks; Regional area networks; Codes; Java; Measurement; Machine learning |
| Dates: |
|
| Institution: | The University of Sheffield |
| Academic Units: | The University of Sheffield > Faculty of Engineering (Sheffield) > Department of Computer Science (Sheffield) |
| Date Deposited: | 30 Nov 2026 16:38 |
| Last Modified: | 30 Nov 2026 16:38 |
| Status: | Published |
| Publisher: | Institute of Electrical and Electronics Engineers (IEEE) |
| Refereed: | Yes |
| Identification Number: | 10.1109/tse.2026.3750452 |
| Open Archives Initiative ID (OAI ID): | oai:eprints.whiterose.ac.uk:248595 |

CORE (COnnecting REpositories)
CORE (COnnecting REpositories)