摘要
单元测试阶段结构覆盖测试往往要求语句覆盖率和分支覆盖率均达到100%。然而对于含有复杂控制算法的程序,人工编写测试用例较为复杂,很难达到100%的覆盖率。利用迭代松弛法作为核心算法实现了结构覆盖测试用例的自动生成。文章首先简单介绍了迭代松弛法的思想及具体实施步骤,然后给出了系统的实现方法,最后对于该方法的扩展应用进行了展望。
In the unit test stage,it is often required that sentence coverage rate and branch coverage rate all up to 100% in the structure coverage test.But for the programs containing the complicated algorithm,it is comparatively complicated that write test case artificially,so it is very difficult to be up to coverage rate of 100%.This paper realizes the automatic generation of the test case in the structure coverage test,which takes use of the iterative relaxation method as key algorithm.At first,it simply introduces the concept and concrete procedure of the iterative relaxation method,and then provides the implementation method of the system;at last it gives a vista for the extension of the application of this method.
出处
《舰船电子工程》
2005年第3期67-69,79,共4页
Ship Electronic Engineering
关键词
软件测试
结构覆盖测试
迭代松弛法
非线性约束
测试用例
software testing, structure coverage test, iterative relaxation method, nonlinear constraint, test case