摘要
适应性随机测试是对随机测试低覆盖率和盲目性的一种改进.它的思想是通过尽量地使测试用例均匀地分布在整个测试域范围内,从而提高测试效率.研究显示,相比于常规的随机测试,适应性随机测试能够使用更少的测试用例来发现被测程序的第一个错误.但是,现有的适应性随机测试的实现方案的时间效率不高,在生成测试用例的过程中大量的计算将消耗大量的时间.针对已有适应性随机测试耗时的缺点,提出一种快速的适应性随机测试的实现方法.该方法主要是通过改变输入域空间内不同区域的测试用例生成的概率来实现测试用例的均匀分布.为最大限度地减少时间消耗,该方法每次只计算局部输入域空间内测试用例的生成概率.该方法理论上生成n个测试用例的时间消耗为O(n log n).实验显示,本文提出的方法只需很低的时间消耗就能生成大量的测试用例.
Adaptive Random Testing is an improvement to Random Testing for addressing the defects of the low coverage and blind- ness. Its idea is making the test cases widespread in the input domain. Research results show that, compared to pure Random testing, Adaptive Random Testing uses less test cases to reveal the first failure. But the unacceptable time consumption is its disadvantage. A lot of computations will cause unacceptable time consumption. To overcome the shortcoming of the time consumption, here we pres- ent a fast method to implement Adaptive Random Testing. This approach achieves the even spread of the test cases by varying the probability of the generation of the test cases in different input domain. This approach computes the probability of the generation of the test cases in part of the input domain to decrease the time consumption maximally. Theoretically, the time consumption of this ap- proach to generate n test cases is 0 ( n log n }. Experiments show that the time consumption of this method to generate test cases is very low.
出处
《小型微型计算机系统》
CSCD
北大核心
2014年第2期319-323,共5页
Journal of Chinese Computer Systems
基金
安徽省自然科学基金项目(11040606M131)资助
关键词
随机测试
概率
适应性随机测试
二叉排序树
random testing
probability
adaptive random testing
binary sort tree