摘要: 针对约束系统中非线性谓词函数、指针、数组等复杂运算的求解问题,运用约束满足搜索算法,通过减少约束方程组中参数变量的个数,逐步缩小参数变量的取值范围,提出基于符号法求解约束的改进算法。对含有非线性谓词、数组的程序实例进行实验,结果表明改进算法能有效生成测试用例。
关键词:
测试用例生成,
约束满足搜索,
软件测试,
路径覆盖测试
Abstract: Because the problem that there are some complicated calculations such as non-linear predication function, pointer, array etc. in constraint system, this paper proposes an improved algorithm of constraint problem solving based on symbolic execution method by using constraint satisfaction searching algorithm, decreasing the number of parametric variation in equations set and narrowing down the range of parametric variation’s value. It is proved that this algorithm can produce test case of path coverage testing automatically by experimenting on some program examples which concludes non-line prediction functions and arrays.
Key words:
test case generation,
constraint satisfaction searching,
software test,
path coverage test
中图分类号:
许秀林;胡克瑾. 基于约束满足搜索算法的测试用例生成策略[J]. 计算机工程, 2008, 34(18): 75-78.
XU Xiu-lin; HU Ke-jin. Test Case Generation Strategy Based on Constraint Satisfaction Searching Algorithm[J]. Computer Engineering, 2008, 34(18): 75-78.