作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程 ›› 2008, Vol. 34 ›› Issue (18): 75-78. doi: 10.3969/j.issn.1000-3428.2008.18.027

• 软件技术与数据库 • 上一篇    下一篇

基于约束满足搜索算法的测试用例生成策略

许秀林1,胡克瑾2   

  1. (1. 南通职业大学电子工程系,南通 226007;2. 同济大学经济管理学院,上海 200092)
  • 收稿日期:1900-01-01 修回日期:1900-01-01 出版日期:2008-09-20 发布日期:2008-09-20

Test Case Generation Strategy Based on Constraint Satisfaction Searching Algorithm

XU Xiu-lin1, HU Ke-jin2   

  1. (1. Department of Electronic Engineering, Nantong Vocation College, Nantong 226007; 2. College of Economic Management, Tongji University, Shanghai 200092)
  • Received:1900-01-01 Revised:1900-01-01 Online:2008-09-20 Published:2008-09-20

摘要: 针对约束系统中非线性谓词函数、指针、数组等复杂运算的求解问题,运用约束满足搜索算法,通过减少约束方程组中参数变量的个数,逐步缩小参数变量的取值范围,提出基于符号法求解约束的改进算法。对含有非线性谓词、数组的程序实例进行实验,结果表明改进算法能有效生成测试用例。

关键词: 测试用例生成, 约束满足搜索, 软件测试, 路径覆盖测试

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

中图分类号: