DEFLAKER: Automatically Detecting Flaky Tests

被引:154
作者
Bell, Jonathan [1 ]
Legunsen, Owolabi [2 ]
Hilton, Michael [3 ]
Eloussi, Lamyaa [2 ]
Yung, Tifany [2 ]
Marinov, Darko [2 ]
机构
[1] George Mason Univ, Fairfax, VA 22030 USA
[2] Univ Illinois, Urbana, IL USA
[3] Carnegie Mellon Univ, Pittsburgh, PA 15213 USA
来源
PROCEEDINGS 2018 IEEE/ACM 40TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE) | 2018年
关键词
Software testing; flaky tests; code coverage;
D O I
10.1145/3180155.3180164
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Developers often run tests to check that their latest changes to a code repository did not break any previously working functionality. Ideally, any new test failures would indicate regressions caused by the latest changes. However, some test failures may not be due to the latest changes but due to non-determinism in the tests, popularly called flaky tests. The typical way to detect flaky tests is to rerun failing tests repeatedly. Unfortunately, rerunning failing tests can be costly and can slow down the development cycle. We present the first extensive evaluation of rerunning failing tests and propose a new technique, called DEFLAKER, that detects if a test failure is due to a flaky test without rerunning and with very low runtime overhead. DEFLAKER monitors the coverage of latest code changes and marks as flaky any newly failing test that did not execute any of the changes. We deployed DEFLAKER live, in the build process of 96 Java projects on TravisCI, and found 87 previously unknown flaky tests in 10 of these projects. We also ran experiments on project histories, where DEFLAKER detected 1, 874 flaky tests from 4, 846 failures, with a low false alarm rate (1.5%). DEFLAKER had a higher recall (95.5% vs. 23%) of confirmed flaky tests than Maven's default flaky test detector.
引用
收藏
页码:433 / 444
页数:12
相关论文
共 67 条
[1]  
AndroidFlaky 2017, 2017, ANDROID FLAKYTEST AN
[2]  
[Anonymous], 2017, JMETER CONCURRENCYTH
[3]  
Apiwattanapong Taweesup, 2004, ASE
[4]  
Atlassian, 2017, COMP COD COV TOOLS
[5]  
Bell J., 2014, ICSE
[6]  
Bell J., 2015, ESEC FSE
[7]  
Bell Jonathan, 2017, DEFLAKER COMPANION W
[8]  
Bell Jonathan, 2017, DEFLAKER SOURCE CODE
[9]  
Beller M., 2017, MSR
[10]  
Bohner S. A., 1996, SOFTWARE CHANGE IMPA