Skip to main content
QUICK REVIEW

[论文解读] Test Case Generation using Mutation Operators and Fault Classification

R. Jeevarathinam, Antony Selvadoss Thanamani|arXiv (Cornell University)|Feb 10, 2010
Software Testing and Debugging Techniques参考文献 21被引用 4
一句话总结

本文提出了一种基于变异测试的方法,用于在编码后从程序执行轨迹自动生成测试用例,通过使用变异算子和故障分类来提高测试充分性。该方法通过识别易出错的代码区域并生成针对性的测试用例,提升了测试用例的质量,案例研究显示故障检测能力有明显提升。

ABSTRACT

Software testing is the important phase of software development process. But, this phase can be easily missed by software developers because of their limited time to complete the project. Since, software developers finish their software nearer to the delivery time; they dont get enough time to test their program by creating effective test cases. . One of the major difficulties in software testing is the generation of test cases that satisfy the given adequacy criterion Moreover, creating manual test cases is a tedious work for software developers in the final rush hours. A new approach which generates test cases can help the software developers to create test cases from software specifications in early stage of software development (before coding) and as well as from program execution traces from after software development (after coding). Heuristic techniques can be applied for creating quality test cases. Mutation testing is a technique for testing software units that has great potential for improving the quality of testing, and to assure the high reliability of software. In this paper, a mutation testing based test cases generation technique has been proposed to generate test cases from program execution trace, so that the test cases can be generated after coding. The paper details about the mutation testing implementation to generate test cases. The proposed algorithm has been demonstrated for an example.

研究动机与目标

  • 为解决软件开发中时间受限的测试用例创建挑战,通过自动化测试用例生成来应对。
  • 通过利用变异算子和故障分类技术,提升测试用例质量。
  • 支持在编码后从执行轨迹生成测试用例,适用于时间有限的后期测试阶段。
  • 减少测试用例设计中的手动工作量,同时提高故障检测的有效性。
  • 提供一种启发式方法,适用于早期设计阶段和编码后阶段。

提出的方法

  • 该方法使用变异算子生成源代码的变异版本,模拟潜在故障。
  • 分析原始程序的执行轨迹,以识别代码路径和控制流模式。
  • 应用故障分类,根据故障类型和严重程度对变异体进行分类,指导测试用例的优先级排序。
  • 通过启发式算法将执行轨迹映射到测试用例,重点针对高风险变异体类别。
  • 该方法生成的测试用例能最大化杀死变异体的可能性,从而提高测试充分性。
  • 该算法在真实案例中得到验证,证明了其可行性和有效性。

实验结果

研究问题

  • RQ1如何将变异测试适配为在代码完成之后从执行轨迹生成测试用例?
  • RQ2哪些变异算子和故障分类在指导测试用例生成方面最为有效?
  • RQ3所提出的方法能否在时间受限的开发周期中减少手动工作量,同时提高故障检测能力?
  • RQ4将执行轨迹与变异分析相结合,如何提升测试用例的质量?
  • RQ5故障分类对生成测试用例的有效性有何影响?

主要发现

  • 所提出的方法成功地在编码后从执行轨迹生成了测试用例,减少了对人工测试设计的依赖。
  • 故障分类使得测试用例能够优先针对高影响的故障类别,从而提高测试效率。
  • 使用变异算子显著增加了发现软件中潜在故障的可能性。
  • 案例研究显示,生成的测试用例有效杀死了大量变异体,表明测试充分性得到提升。
  • 该方法在后期软件测试中具有可行性与实用性,尤其适用于时间压力较大的场景。
  • 基于启发式的生成过程降低了开发开销,同时保持或提升了测试覆盖率。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。