Shake It! Detecting Flaky Tests Caused by Concurrency with Shaker
Shake It! Detecting Flaky Tests Caused by Concurrency with Shaker
复制标题
摇一摇!
DOI:
--
复制
发表时间:
2020
期刊:
影响因子:
--
通讯作者:
Marcelo d’Amorim
中科院分区:
文献类型:
--
作者:
Denini Silva;Leopoldo Teixeira;Marcelo d’Amorim
A test is said to be flaky when it non-deterministically passes or fails. Test flakiness negatively affects the effectiveness of regression testing and, consequently, impacts software evolution. Detecting test flakiness is an important and challenging problem. ReRun is the most popular approach in industry to detect test flakiness. It re-executes a test suite on a fixed code version multiple times, looking for inconsistent outputs across executions. Unfortunately, ReRun is costly and unreliable. This paper proposes SHAKER, a lightweight technique to improve the ability of ReRun to detect flaky tests. SHAKER adds noise in the execution environment (e.g., it adds stressor tasks to compete for the CPU or memory). It builds on the observations that concurrency is an important source of flakiness and that adding noise in the environment can interfere in the ordering of events and, consequently, influence on the test outputs. We conducted experiments on a data set with 11 Android apps. Results are very encouraging. SHAKER discovered many more flaky tests than ReRun (95% and 37.5% of the total, respectively) and discovered these flaky tests much faster. In addition, SHAKER was able to reveal 61 new flaky tests that went undetected in 50 re-executions with ReRun.
DOI:
10.1145/3338906.3338925
发表时间:
2019-08
期刊:
Proceedings of the 2019 27th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering
影响因子:
--
作者:
A. Shi;Wing Lam;Reed Oei;Tao Xie;D. Marinov
通讯作者:
A. Shi;Wing Lam;Reed Oei;Tao Xie;D. Marinov