自动感染和传播分析测试套件改进建议
Suggestions on Test Suite Improvements with Automatic Infection and Propagation Analysis
摘要:
一个极端的转换移除了至少一个测试用例所到达的方法主体。如果测试套件通过了原始程序,并且在极端转换之后仍然通过,则转换被称为未检测到,并且测试套件需要改进。在这项工作中,我们提出了一种技术,以自动确定以下三个原因,防止检测的极端变换是:测试输入不足以感染状态的程序;感染不传播到测试用例;测试用例有一个弱的预言,不观察感染。我们已经开发了Reneri,一个工具,观察程序的测试和测试套件,以确定原始和转换方法的测试运行之间的运行时差异。分析过程中收集的观察结果由Reneri处理,以向开发人员提出可能的改进建议。我们对Reneri的15个项目进行了评估,总共有312个未被发现的极端转换。该工具能够为每个未检测到的转换生成建议。对于63%的情况,现有的测试用例可以感染程序状态,这意味着未检测到的转换主要是由于可观察性和弱Oracle问题。对开发人员的采访证实了所建议的改进的相关性,并且使用最先进的自动测试生成工具进行的实验表明,没有工具可以改进现有的测试套件来修复所有未检测到的转换。
英文摘要:
An extreme transformation removes the body of a method that is reached by one test case at least. If the test suite passes on the original program and still passes after the extreme transformation, the transformation is said to be undetected, and the test suite needs to be improved. In this work we propose a technique to automatically determine which of the following three reasons prevent the detection of the extreme transformation is : the test inputs are not sufficient to infect the state of the program; the infection does not propagate to the test cases; the test cases have a weak oracle that does not observe the infection. We have developed Reneri, a tool that observes the program under test and the test suite in order to determine runtime differences between test runs on the original and the transformed method. The observations gathered during the analysis are processed by Reneri to suggest possible improvements to the developers. We evaluate Reneri on 15 projects and a total of 312 undetected extreme transformations. The tool is able to generate a suggestion for each each undetected transformation. For 63% of the cases, the existing test cases can infect the program state, meaning that undetected transformations are mostly due to observability and weak oracle issues. Interviews with developers confirm the relevance of the suggested improvements and experiments with state of the art automatic test generation tools indicate that no tool can improve the existing test suites to fix all undetected transformations.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。