English

Fine-Grained Assertion-Based Test Selection

Software Engineering 2025-04-29 v2

Abstract

For large software applications, running the whole test suite after each code change is time- and resource-intensive. Regression test selection techniques aim at reducing test execution time by selecting only the tests that are affected by code changes. However, existing techniques select test entities at coarse granularity levels such as test class, which causes imprecise test selection and executing unaffected tests. We propose a novel approach that increases the selection precision by analyzing test code at statement level and treating test assertions as the unit for selection. We implement our fine-grained test selection approach in a tool called \toolname and evaluate it by comparing against two state-of-the-art test selection techniques using 11 open-source subjects. Our results show that \toolname increases selection precision for all the subjects. Our test selection reduces, on average, 63\% of the overall test time, making regression testing 7--38\% faster than the other techniques. Our results also indicate that subjects with longer test execution time benefit more by our fine-grained selection technique.

Keywords

Cite

@article{arxiv.2403.16001,
  title  = {Fine-Grained Assertion-Based Test Selection},
  author = {Sijia Gu and Ali Mesbah},
  journal= {arXiv preprint arXiv:2403.16001},
  year   = {2025}
}