软件测试不仅要考虑到功能的正确性、覆盖的完整性,也应该考虑到测试用例的可行性。一种常用的产生测试用例的方法是路径覆盖,它是通过分析控制流来产生的,但是这样很可能产生不可行路径。论文运用Petri网来描述程序,并且按照一定的数学规则将此Petri网进行分解,得到独立的段组(Independent Segment Group,ISG)并产生测试用例,最后设计一个算法找到满足覆盖准则的最少测试用例。
Software testing must consider correctness of functional requirements,complete coverage and test case feasibility.One of the common used methods to generate test case is path coverage,which generates test case by analyzing the control flow.But it is possible to generate infeasible test path.In this paper,Petri nets is used to describe programs,and the Petri nets is decomposed based on some mathematics rules.Then we can get the Independent Segment Group(ISG) and thus generate the test cases.Finally an algorithm is designed to find the minimal test sets which also satisfy the coverage criteria.