计算机工程与应用 ›› 2011, Vol. 47 ›› Issue (21): 86-89.

• 研发、设计、测试 • 上一篇    下一篇

应用代数规约和数据变异策略测试类

余 波1,2,王 昆1   

  1. 1.中南林业科技大学 涉外学院,长沙 410042
    2.国防科学技术大学 计算机学院,长沙 410007
  • 收稿日期:1900-01-01 修回日期:1900-01-01 出版日期:2011-07-21 发布日期:2011-07-21

Applying algebraic specification and data mutation strategy to test class

YU Bo1,2,WANG Kun1   

  1. 1.Swan College of Central South University of Forestry and Technology,Changsha 410042,China
    2.School of Computer Science & Technology of National University of Defense Technology,Changsha 410007,China
  • Received:1900-01-01 Revised:1900-01-01 Online:2011-07-21 Published:2011-07-21

摘要: 在应用基于代数规约测试类时,虽然可以有效解决测试数据生成和测试结果判断这两个测试难题,但是,因为该方法常常随机生成测试数据,会导致对于同一待测试类两次测试会得到不同的测试效果。为克服这个缺陷,提出应用数据变异方法,对已生成的测试用例进行变异。变异测试实验表明:该方法能够有效地改善代数测试方法的测试效果。

关键词: 代数规约, 数据变异, 类测试

Abstract: The method for testing class based on algebraic specification can overcome the difficulties for generating test cases and evaluating test outputs automatically.There is a defect for this method that it would obtain different effects for detecting faults for the same class under testing as the test data are usually generated randomly.This approach is proposed that the new test cases are added by applying data mutation strategy to the original test cases generated from algebraic specification to solve it.The experiments show that this method is feasible for improving the test effects of algebraic testing method.

Key words: algebraic specification, data mutation, class testing