在对复杂的软件系统进行测试时,生成的系统状态空间可能会非常庞大.为了避免对整个状态空间进行遍历,提出将on—the—ny方法与CPN形式化建模方法结合起来,用于生成测试例.在这种方法中,无需对整个状态空间进行遍历,只是仅对测试人员感兴趣的部分状态空间进行针对性的测试.首先,给出CPN和扩展可达图的定义,介绍了on-the-fly测试方法中涉及的相关概念,包括系统规约、测试目的、同步乘积和测试例等.然后,实现了同步乘积算法,并设计相关测试例对其进行了测试.最后,选定一个被测系统示例CPN建模与on-the-fly结合的方法,并通过适配器实现与被测系统的交互.生成和执行测试例.由此验证了方法的可行性和有效性.
The generated system state space can be very large when a complex software system is tested. In order to avoid the unnecessary traversing of the entire state space, a new method is presented based on the combination of CPN modeling and on-the-fly method to generate test cases. During such a process, only part of the state space is traversed according to the tester's personnel interest. Firstly, both the definitions of CPN and the extended reachability graph are introduced, and the related concepts relating to the on-the-fly testing method, including system specification, test purpose, synchronous product and test cases, are introduced. Secondly, a synchronous product algorithm is implemented, and the test cases are designed to test the algorithm as well. Finally, an implementation under test is selected to sample the combination method of CPN modeling and on-the-fly method. The interactions between the tester and the implementation under test are realized through an adapter, and the test cases are generated and executed simultaneously. Thus the feasibility and the effectiveness of the proposed method are verified.