Detecting Flaky Tests by Controlling Nondeterministic API Behavior
This program is tentative and subject to change.
Regression testing is an essential part of software development to ensure high-quality software; but the presence of flaky tests makes the testing outcomes unreliable. It is essential to proactively detect flaky tests, so developers are aware of them early on and can react appropriately in case they fail. While there has been prior work in detecting flaky tests, they either are developed to focus on specific flaky test types or can be imprecise in their analyses, such as by relying on AI models for prediction.
We present ChaosAPI, a framework to support detecting a variety of different types of flaky tests. Our insight is that the most effective approach to detecting flaky tests is to target the nondeterministic components that lead tests to have the flaky behavior in the first place. In particular, we target specific APIs within the Java Standard Library that all Java code relies on and that are known to exhibit nondeterministic behavior, such as those related to system time, concurrency, and environmental factors. During test execution, ChaosAPI modifies the behavior of these API calls, perturbing inputs and return values of these APIs in a systematic manner while still remaining compliant with the API specification. We can detect flaky tests by observing whether tests that previously passed would now fail when run through ChaosAPI.
Our evaluation on a prior dataset of known flaky tests, as well as running on test suites of other popular open-source projects, demonstrates that ChaosAPI not only detects more flaky tests than simple rerunning across a wide range of projects but also detects them more efficiently, making ChaosAPI a practical addition to the toolbox of flaky test detection techniques.
This program is tentative and subject to change.
Wed 7 OctDisplayed time zone: Pacific Time (US & Canada) change
13:30 - 15:00 | Property-Based Testing and Test QualityOOPSLA at East Hall 1 Chair(s): Jonathan Bell Northeastern University | ||
13:30 18mTalk | Block Tests OOPSLA Kevin Guan Cornell University, Pengyue Jiang Cornell University, Milos Gligoric University of Texas at Austin, Owolabi Legunsen Cornell University DOI | ||
13:48 18mTalk | Detecting Flaky Tests by Controlling Nondeterministic API Behavior OOPSLA Hengchen Yuan University of Texas at Austin, Jiefang Lin University of Texas at Austin, August Shi University of Texas at Austin DOI | ||
14:06 18mTalk | Random Testing via Runtime Abstract Interpretation OOPSLA DOI | ||
14:24 18mTalk | Testing Theorems, Fully Automatically OOPSLA Segev Elazar Mittelman University of Maryland, Harrison Goldstein University at Buffalo, Leonidas Lampropoulos University of Maryland DOI | ||
14:42 18mTalk | Fail Faster: Staging and Fast Randomness for High-Performance PBT OOPSLA Cynthia Richey University of Pennsylvania, Joseph W. Cutler University of Pennsylvania, Harrison Goldstein University at Buffalo, Benjamin C. Pierce University of Pennsylvania DOI | ||