Lune

ASE2024顶会

Reducing Test Runtime by Transforming Test Fixtures

Chengpeng Li, Abdelrahman Baz, August Shi

摘要

Software testing is a fundamental part of software development, but the cost of running tests can be high. Existing approaches to speed up testing such as test-suite reduction or regression test selection aim to run only a subset of tests from the full test suite, but these approaches run the risk of missing to run some key tests that are needed to detect faults in the code. We propose a new technique to transform test code to speed up test runtime while still running all the tests. The insight is that testing frameworks such as JUnit for Java projects allow for developers to define test fixtures, i.e., methods that run before or after every test to setup or teardown test state, but these test fixtures need not be called all the time before/after each test. It may be sufficient to do the setup and teardown once at the beginning and end, respectively, of all tests. Our technique, TestBoost, transforms the test fixtures within a test class to instead run once before/after all tests in the test class, thereby running the test fixtures less frequently while still running all tests and ensuring that tests all still pass, as they did before. Our evaluation on 697 test classes from 34 projects shows that on average we can reduce the runtime per test class by 28.39% for the cases with positive significant improvement. Using these transformed test classes can result in an average 18.24% reduction per test suite runtime. We find that the coverage of the transformed test classes changes by <1%, and when we submitted 15 pull requests, 9 have already been merged.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 1 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Empirically evaluating readily available information for regression test optimization in continuous integration 引用了 Empirically revisiting and enhancing IR-based test-case prioritization
  • Repairing Order-Dependent Flaky Tests via Test Generation 引用了 A large-scale longitudinal study of flaky tests
  • More Precise Regression Test Selection via Reasoning about Semantics-Modifying Changes 引用了 Empirically evaluating readily available information for regression test optimization in continuous integration
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper1

  1. What's DAT Smell? Untangling and Weaving the Disjoint Assertion Tangle Test SmellMonil Narang, Hang Du, James A. JonesASE 2025

它引用的 Paper8

  1. A large-scale longitudinal study of flaky testsWing Lam, Stefan Winter, Anjiang Wei, Tao Xie 等OOPSLA 2020 · 63 次引用
  2. Empirically revisiting and enhancing IR-based test-case prioritizationQianyang Peng, August Shi, Lingming ZhangISSTA 2020 · 49 次引用
  3. Empirically evaluating readily available information for regression test optimization in continuous integrationDaniel Elsner, Florian Hauer, Alexander Pretschner, Silke ReimerISSTA 2021 · 45 次引用
  4. Repairing Order-Dependent Flaky Tests via Test GenerationChengpeng Li, Chenguang Zhu, Wenxi Wang, August ShiICSE 2022 · 22 次引用
  5. More Precise Regression Test Selection via Reasoning about Semantics-Modifying ChangesYu Liu, Jiyang Zhang, Pengyu Nie, Milos Gligoric 等ISSTA 2023 · 19 次引用

相关 Paper

  1. Efficient Incremental Code Coverage Analysis for Regression Test SuitesJiale Amber Wang, Kaiyuan Wang, Pengyu NieASE 2024 · 1 次引用
  2. Studying Test Annotation Maintenance in the WildDong Jae Kim, Nikolaos Tsantalis, Tse-Hsun Peter Chen, Jinqiu YangICSE 2021 · 20 次引用
  3. Dependent-test-aware regression testing techniquesWing Lam, August Shi, Reed Oei, Sai Zhang 等ISSTA 2020 · 44 次引用
  4. Test Selection for Unified Regression TestingShuai Wang, Xinyu Lian, Darko Marinov, Tianyin XuICSE 2023 · 9 次引用
  5. Instrumentation-Driven Evolution-Aware Runtime VerificationKevin Guan, Owolabi LegunsenICSE 2025 · 4 次引用
黄昏的海面,两侧是细线勾勒的悬崖