An Empirical Study of Flaky Tests in Python
Author:
Abstract
This is a summary of our work presented at the International Conference on Software Testing 2021 [Gr21b]. Tests that cause spurious failures without code changes, i.e., flaky tests, hamper regression testing and decrease trust in tests. While the prevalence and importance of flakiness is well established, prior research focused on Java projects, raising questions about generalizability. To provide a better understanding of flakiness, we empirically study the prevalence, causes, and degree of flakiness within 22 352 Python projects containing 876 186 tests. We found flakiness to be equally prevalent in Python as in Java. The reasons, however, are different: Order dependency is a dominant problem, causing 59% of the 7 571 flaky tests we found. Another 28% were caused by test infrastructure problems, a previously less considered cause of flakiness. The remaining 13% can mostly be attributed to the use of network and randomness APIs. Unveiling flaky tests also requires more runs than often assumed: A 95% confidence that a passing test is not flaky on average would require 170 reruns. Additionally, through our investigations, we created a large dataset of flaky tests that other researchers already started building on [MM21; Ni21].
- Citation
- BibTeX
Gruber, M., Lukasczyk, S., Kroiß, F. & Fraser, G.,
(2022).
An Empirical Study of Flaky Tests in Python.
In:
Grunske, L., Siegmund, J. & Vogelsang, A.
(Hrsg.),
Software Engineering 2022.
Bonn:
Gesellschaft für Informatik e.V..
(S. 37-38).
DOI: 10.18420/se2022-ws-009
@inproceedings{mci/Gruber2022,
author = {Gruber, Martin AND Lukasczyk, Stephan AND Kroiß, Florian AND Fraser, Gordon},
title = {An Empirical Study of Flaky Tests in Python},
booktitle = {Software Engineering 2022},
year = {2022},
editor = {Grunske, Lars AND Siegmund, Janet AND Vogelsang, Andreas} ,
pages = { 37-38 } ,
doi = { 10.18420/se2022-ws-009 },
publisher = {Gesellschaft für Informatik e.V.},
address = {Bonn}
}
author = {Gruber, Martin AND Lukasczyk, Stephan AND Kroiß, Florian AND Fraser, Gordon},
title = {An Empirical Study of Flaky Tests in Python},
booktitle = {Software Engineering 2022},
year = {2022},
editor = {Grunske, Lars AND Siegmund, Janet AND Vogelsang, Andreas} ,
pages = { 37-38 } ,
doi = { 10.18420/se2022-ws-009 },
publisher = {Gesellschaft für Informatik e.V.},
address = {Bonn}
}
Sollte hier kein Volltext (PDF) verlinkt sein, dann kann es sein, dass dieser aus verschiedenen Gruenden (z.B. Lizenzen oder Copyright) nur in einer anderen Digital Library verfuegbar ist. Versuchen Sie in diesem Fall einen Zugriff ueber die verlinkte DOI: 10.18420/se2022-ws-009
Haben Sie fehlerhafte Angaben entdeckt? Sagen Sie uns Bescheid: Send Feedback
More Info
ISBN: 978-3-88579-714-2
ISSN: 1617-5468
xmlui.MetaDataDisplay.field.date: 2022
Language: (en)
Content Type: Text/Conference Paper