一句话:利用字段覆盖指标指导符号执行并借助 tranScoping 提前终止,生成更小且高质量的测试套件。
字段穷尽测试是一种适用于面向对象程序复杂堆数据结构的测试准则,要求测试输入在给定规模界限内覆盖对象字段的所有可行取值。已有自动生成方法依赖输入的形式规约并进行 SAT 分析,且生成全部可行字段取值代价高昂。本文转而将字段覆盖作为衡量测试套件质量与变异得分的准则,并将其与基于符号执行的测试生成结合,使用 Symbolic Pathfinder 生成字段穷尽套件的下近似。为在较大规模下提前停止符号执行,作者采用 tranScoping,根据小规模分析结果估计大规模分析特征。实验表明,不同字段覆盖度量下的 tranScoping 能显著减小测试套件规模并大幅缩短生成时间,同时保持与字段穷尽套件相近的有效性。
Field-exhaustive testing is a testing criterion suitable for object-oriented code over complex, heap-allocated, data structures. It requires test suites to contain enough test inputs to cover all feasible values for the object's fields within a certain scope (input-size bound). While previous work shows that field-exhaustive suites can be automatically generated, the generation technique required a formal specification of the inputs that can be subject to SAT-based analysis. Moreover, the restriction of producing all feasible values for inputs' fields makes test generation costly. In this paper, we deal with field coverage as testing criteria that measure the quality of a test suite in terms of coverage and mutation score, by examining to what extent the values of inputs' fields are covered. In particular, we consider field coverage in combination with test generation based on symbolic execution to produce underapproximations of field-exhaustive suites, using the Symbolic Pathfinder tool. To underapproximate these suites we use tranScoping, a technique that estimates characteristics of yet to be run analyses for large scopes, based on data obtained from analyses performed in small scopes. This provides us with a suitable condition to prematurely stop the symbolic execution. As we show, tranScoping different metrics regarding field coverage allows us to produce significantly smaller suites using a fraction of the generation time. All this while retaining the effectiveness of field exhaustive suites in terms of test suite quality.
DOI 原文 ·
@inproceedings{paperbot5196,
title = {Efficient Test Generation Guided by Field Coverage Criteria},
author = {Ariel Godio and Valeria Bengolea and Pablo Ponzio and Nazareno Aguirre and Marcelo Fabian Frias},
booktitle = {ASE},
year = {2019},
doi = {10.1109/ase.2019.00019}
}