Evolution-aware detection of order-dependent flaky tests
Chengpeng Li, August Shi
Abstract
Regression testing is an important part of the software development process but suffers from the presence of flaky tests. Flaky tests are tests that can nondeterministically pass or fail regardless of code changes. Order-dependent flaky tests are a prominent kind of flaky tests whose outcome depends on the test order in which they are run. Prior work has focused on detecting order-dependent flaky tests through rerunning all tests in different test orders on a single version of code. As code is constantly changing, rerunning all tests in different test orders after every change is costly. In this work, we propose IncIDFlakies, a technique to detect order-dependent flaky tests by analyzing code changes to detect newly-introduced order-dependent flaky tests due to those changes. Building upon existing work in iDFlakies that reruns tests in different test orders, IncIDFlakies analyzes and selects to run only the tests that (1) are affected by the change, and (2) can potentially result in a test-order dependency among each other due to potential shared state. Running IncIDFlakies on 67 order-dependent flaky tests across changes in code in their respective projects, including the changes where they became flaky, we find that IncIDFlakies can select to run on average 65.4% of all the tests, resulting in running 68.4% of the time that baseline iDFlakies would use when running the same number of test orders with the full test suite. Furthermore, we find that IncIDFlakies can still ensure that the test orders it runs can potentially detect the order-dependent flaky tests. CCS CONCEPTS • Software and its engineering → Software testing and debugging.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 2dc6f4c8-cd68-4217-955a-80ac3787608eCited by top-tier papers4
- Reducing Test Runtime by Transforming Test FixturesChengpeng Li, Abdelrahman Baz, August ShiASE 2024 · 1 citation
- Ranking Relevant Tests for Order-Dependent Flaky TestsShanto Rahman, Bala Naren Chanumolu, Suzzana Rafi, August Shi et al.ICSE 2025 · 1 citation
- Efficient Incremental Code Coverage Analysis for Regression Test SuitesJiale Amber Wang, Kaiyuan Wang, Pengyu NieASE 2024 · 1 citation
- FlakyGuard: Automatically Fixing Flaky Tests at Industry ScaleChengpeng Li, Farnaz Behrang, August Shi, Peng LiuASE 2025 · 1 citation
Builds on6
- Detecting flaky tests in probabilistic and machine learning applicationsSaikat Dutta, August Shi, Rutvik Choudhary, Zhekun Zhang et al.ISSTA 2020 · 71 citations
- FlakeFlagger: Predicting Flakiness Without Rerunning TestsAbdulrahman Alshammari, Christopher Morris, Michael Hilton, Jonathan BellICSE 2021 · 63 citations
- A large-scale longitudinal study of flaky testsWing Lam, Stefan Winter, Anjiang Wei, Tao Xie et al.OOPSLA 2020 · 63 citations
- Empirically evaluating readily available information for regression test optimization in continuous integrationDaniel Elsner, Florian Hauer, Alexander Pretschner, Silke ReimerISSTA 2021 · 45 citations
- Dependent-test-aware regression testing techniquesWing Lam, August Shi, Reed Oei, Sai Zhang et al.ISSTA 2020 · 44 citations
Related papers
- Repairing Order-Dependent Flaky Tests via Test GenerationChengpeng Li, Chenguang Zhu, Wenxi Wang, August ShiICSE 2022 · 22 citations
- Systematically Producing Test Orders to Detect Order-Dependent Flaky TestsChengpeng Li, Mohammad Mahdi Khosravi, Wing Lam, August ShiISSTA 2023 · 10 citations
- Preempting Flaky Tests via Non-Idempotent-Outcome TestsAnjiang Wei, Pu Yi, Zhengxi Li, Tao Xie et al.ICSE 2022 · 20 citations
- FlakeSync: Automatically Repairing Async Flaky TestsShanto Rahman, August ShiICSE 2024 · 7 citations
- Reproducing Timing-Dependent GUI Flaky Tests in Android Apps via a Single Event DelayXiaobao Cai, Zhen Dong, Yongjiang Wang, Abhishek Tiwari et al.ISSTA 2024 · 1 citation
