An empirical analysis of flaky tests

Qingzhou Luo, Farah Hariri, Lamyaa Eloussi, Darko Marinov

Research output: Chapter in Book/Report/Conference proceedingConference contribution

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.

Original languageEnglish (US)
Title of host publication22nd ACM SIGSOFT International Symposium on the Foundations of Software Engineering, FSE 2014 - Proceedings
PublisherAssociation for Computing Machinery
Pages643-653
Number of pages11
ISBN (Electronic)9781450330565
DOIs
StatePublished - Nov 16 2014
Event22nd ACM SIGSOFT International Symposium on the Foundations of Software Engineering, FSE 2014 - Hong Kong, China
Duration: Nov 16 2014Nov 21 2014

Publication series

NameProceedings of the ACM SIGSOFT Symposium on the Foundations of Software Engineering
Volume16-21-November-2014

Other

Other22nd ACM SIGSOFT International Symposium on the Foundations of Software Engineering, FSE 2014
Country/TerritoryChina
CityHong Kong
Period11/16/1411/21/14

Keywords

  • Empirical study
  • Flaky tests
  • Non-determinism

ASJC Scopus subject areas

  • Software

Fingerprint

Dive into the research topics of 'An empirical analysis of flaky tests'. Together they form a unique fingerprint.

Cite this