一句话:将多准则测试套件最小化建模为整数非线性规划并转换为线性规划,以高效求最优解。
多准则测试套件最小化旨在按代码覆盖率等准则删除冗余测试用例,同时尽可能保持故障检测等能力。现有基于整数线性规划的方法声称最优,但测试用例在准则上常相互依赖,问题本质非线性。本文提出将多准则测试套件最小化形式化为整数非线性规划问题,并通过程序化变换将其转化为线性问题,再用现代线性求解器求解。作者实现工具 Nemo,支持多种现代线性与非线性求解器,并在公开数据集上评估,考虑语句覆盖、故障揭示能力和测试执行时间等准则。实验表明,Nemo 能借助现代求解器高效找到最优解,且最优解在所考虑准则上比次优解最高提升 164.29%。
Multi-criteria test-suite minimization aims to remove redundant test cases from a test suite based on some criteria such as code coverage, while trying to optimally maintain the capability of the reduced suite based on other criteria such as fault-detection effectiveness. Existing techniques addressing this problem with integer linear programming claim to produce optimal solutions. However, the multi-criteria test-suite minimization problem is inherently nonlinear, due to the fact that test cases are often dependent on each other in terms of test-case criteria. In this paper, we propose a framework that formulates the multi-criteria test-suite minimization problem as an integer nonlinear programming problem. To solve this problem optimally, we programmatically transform this nonlinear problem into a linear one and then solve the problem using modern linear solvers. We have implemented our framework as a tool, called Nemo, that supports a number of modern linear and nonlinear solvers. We have evaluated Nemo with a publicly available dataset and minimization problems involving multiple criteria including statement coverage, fault-revealing capability, and test execution time. The experimental results show that Nemo can be used to efficiently find an optimal solution for multi-criteria test-suite minimization problems with modern solvers, and the optimal solutions outperform the suboptimal ones by up to 164.29% in terms of the criteria considered in the problem.
DOI 原文 ·
@inproceedings{paperbot4510,
title = {Nemo},
author = {Jun-Wei Lin and Reyhaneh Jabbarvand and Joshua Garcia and Sam Malek},
booktitle = {ICSE},
year = {2018},
doi = {10.1145/3180155.3180174}
}