摘要
测试用例自动生成技术是软件测试的一个重要研究领域,而如何从待测试程序中选取适当的测试序列集合是其中的一个关键问题。文章提出一种构造结构性测试序列集合的方法,此方法首先对待测试程序进行静态分析,然后根据程序的语句间关系生成程序图,最后基于数据流测试准则,根据程序图以及变量的定义和使用信息构造结构性测试序列集合。在Linux平台上使用这种方法对若干条程序进行分析处理,得到的测试序列集合可以使待测试程序得到充分测试。本文提出的方法具有比较高的测试覆盖,同时,在计算过程中避免了无用路径的生成,节省了算法空间和执行时间。
Automatic test case generation technology is an important research area of software testing. How to select a set of test sequences from a program is a key problem of the automatic test case generation technology. This paper proposes a method to structure the test sequences. First, this method makes static analysis on the program to be tested, then draws the program graphic. At last, this method structures the test sequence according to the program graphic and the defining information and using information of the variables based on data flow rules. We analyzed several programs on Linux and sets of test sequences we got could test those programs enough. This method has high covering rate. And saves space and time cost through avoiding useless paths.
出处
《微电子学与计算机》
CSCD
北大核心
2005年第5期131-135,共5页
Microelectronics & Computer
基金
国家(863)计划资助(2003AA1Z2610)
关键词
软件测试
数据流
测试序列
Software test, Dataflow, Test sequence