一句话:提出面向结构化字符串输入的测试生成技术,通过推断输入定义的不一致来暴露代码与规约间的语义鸿沟。
自动化测试常以覆盖率为评价指标,但高覆盖率仍可能遗漏功能规约与代码实现之间的语义鸿沟,尤其对常用字符串数据类型表示的结构化输入,这种鸿沟源于实现或规约中缺少逻辑检查,导致输入定义不一致。作者通过对流行库缺陷的研究发现,这类鸿沟不限于输入验证检查。方法上,论文提出面向结构化字符串输入的测试生成技术,通过推断输入定义中的不一致来暴露被测方法与规约之间的语义差距;实现工具 SEGATE,结合静态分析与自动机建模推断差距并生成测试用例。评估方面,在包含 15 个流行 Java 开源库中已报告缺陷的基准数据集上,SEGATE 生成的测试能暴露 80% 的缺陷。
Automated testing techniques are often assessed on coverage based metrics. However, despite giving good coverage, the test cases may miss the gap between functional specification and the code implementation. This gap may be subtle in nature, arising due to the absence of logical checks, either in the implementation or in the specification, resulting in inconsistencies in the input definition. The inconsistencies may be prevalent especially for structured inputs, commonly specified using string-based data types. Our study on defects reported over popular libraries reveals that such gaps may not be limited to input validation checks. We propose a test generation technique for structured string inputs where we infer inconsistencies in input definition to expose semantic gaps in the method under test and the method specification. We assess this technique using our tool SEGATE, Semantic Gap Tester. SEGATE uses static analysis and automaton modeling to infer the gap and generate test cases. On our benchmark dataset, comprising of defects reported in 15 popular open-source libraries, written in Java, SEGATE was able to generate tests to expose 80% of the defects.
DOI 原文 ·
@inproceedings{paperbot5264,
title = {SEGATE: Unveiling Semantic Inconsistencies between Code and Specification of String Inputs},
author = {Devika Sondhi and Rahul Purandare},
booktitle = {ASE},
year = {2019},
doi = {10.1109/ase.2019.00028}
}