摘要
作为衡量测试用例集完备性的测试策略,变异测试是一种"面向缺陷"的单元测试技术,主要用来生成完备的测试用例集.其中面向路径测试数据生成技术通过约束系统构造和求解过程实现用例集生成,是一种高效的测试用例生成技术.但目前大部分面向路径测试用例生成技术只考虑了程序语句间的控制依赖,即通过对控制流图的分析来构建约束系统,而忽略了语句间的数据依赖对约束系统的影响.充分考虑两种依赖关系,针对域削减的测试数据生成技术进行了改进,提出了一种考虑数据依赖的域削减方法.实验表明,这种方法在变异测试数据生成的成功率和执行效率上都有较大程度的提高.
As a testing strategy to evaluate the completude of test cases,mutation testing has been identified as a "fault-oriented" technique for unit testing,which is mainly used to generate complete test cases.By applying mutation operators to simulate software defects,mutation testing generates mutants and constructs a test suit to kill them.Test data generation for the test suit constructing includes random method,path-wise method and goal-oriented test data generators.Among them,the path-wise technique of test data generation is a high-efficiency technique for test cases generation,implements test data generation by building and solving constraint systems.However,most of path-wise generation techniques only take the control dependence among statements into consideration,viz,build constraint system by analyzing the control flow graph but neglecting the data dependence among statements.Considering both of them,a new domain reduction method named domain reduction approach with data dependence(DRD) is proposed to improve the test data generation technique of domain reduction.Using path with data dependence,DRD combines the constraint-based test data generation technique with the chaining approach for test data generation to build constraint system.As an automation technology for test data generation,DRD solves the constraint system by domain reduction technique and verifies test data with back substitution method.Experimental results showed that this method improves the successful rate and execution efficiency of test data generation in mutation testing at a large extent.
出处
《计算机研究与发展》
EI
CSCD
北大核心
2011年第4期617-626,共10页
Journal of Computer Research and Development
基金
国家"八六三"高技术研究发展计划基金项目(2007AA01Z123)
关键词
变异测试
约束系统
软件自动化测试
测试数据生成
面向路径测试
mutation testing
constraint system
automated software testing
test data generation
path-wise testing