随机测试是实践中广泛采用的一种黑盒测试方法.近年来提出的适应性随机测试方法改进了随机测试的不足,仿真实验结果表明,改进效果取决于软件失效域的特征.提出以测试约束刻画软件失效域在输入域上的分布,探讨了基于现有的程序分析技术构造测试约束的过程,讨论了基于测试约束的软件失效域的特征分析方法.以一个实例软件验证所提出的测试约束构造过程及其软件失效域特征分析方法.测试约束揭示了软件故障的触发与传播的内在机制,基于测试约束的软件失效域的特征分析方法有助于改进测试用例的设计质量以及评价适应性随机测试方法的适用性.
Random testing is a widely practiced black-box testing technique. Recently, adaptive random testing has been proposed to improve the random testing, and simulation results show that the improvements depend on the characteristic of failure-causing regions of program under test. This paper presents the concept of test constraints and employs them to specify the distribution of failure-causing regions within the input domain of program under test. Characteristic analysis of failure-causing regions can be conducted on the base of their test constraints, which are derived using the available program analysis techniques. To evaluate the proposed technique, a case study on a real-life application was conducted, and the results show that the proposed test constraint provides an insight into how a failure is triggered and propagated, and the constraint-based analysis helps to improve the quality of test case design and assess the applicability of the adaptive random testing.