Computer Engineering and Applications ›› 2014, Vol. 50 ›› Issue (11): 39-45.

Previous Articles     Next Articles

Research of test case generation method based on colored Petri nets

ZHENG Wenyan   

  1. Department of Computer Science and Technology, Dezhou University, Dezhou, Shandong 253023, China
  • Online:2014-06-01 Published:2015-04-08

基于CPN的程序测试用例生成方法的研究

郑文艳   

  1. 德州学院 计算机系,山东 德州 253023

Abstract: Based on the mature modeling simulation tool CPN tools for programming language not only three basic structure modeling, the parallel structure of parallel program has also carried on the modeling and simulation. Not for some specific language such as C language situation, it puts forward the generating test cases of the new method, this method to have three basic structure characteristics of all program has universal applicability. It finds testing path with parallel structure of the program through the reduction. After generating test cases, it uses the CPN tools for test case selection and evaluation, finally determines the appropriate test cases, can guarantee that testing path is complete and optimal.

Key words: program test, colored Petri net, Strongly Connected Components(SCC) graph, test path, parallel architecture, state space, state space explosion

摘要: 采用成熟的建模仿真工具CPN tools不仅仅对程序设计语言的三种基本结构进行了建模,而且对并行程序中的并行结构也进行了建模和仿真。在不针对某些具体语言比如C语言的情况下,提出了生成测试用例的新方法,该方法对具备三种基本结构特性的所有程序都具有普遍适用性。对具有并行结构的程序通过化简寻找测试路径。最后在生成测试用例之后,又利用CPN tools对所获得的测试用例进行选择和评价,最终确定合适的测试用例,不仅能够保证获取的测试路径是完整的而且是最优的。

关键词: 程序测试, 颜色Petri网, 强连通图, 测试路径, 并行结构, 状态空间, 状态空间爆炸