文中将10CO(Input-0utputConformance)一致性测试理论与着色Petri网(ColoredPetriNets,CPN)进行优势融合,提出一种使用CPN描述测试目的模型并驱动IOCO一致性测试选择的新方法,称为PN4TS方法.PN4TS方法首先定义了面向一致性测试的CPN模型(ConformanceTestingorientedCPN,CT-CPN),描述软件系统的功能行为;定义了基于CT-CPN描述的PN-IOCO一致性关系;之后,构建CT-CPN描述的测试目的模型,并将该模型与描述软件功能行为的CT-CPN模型执行同步模拟,提出了一种测试目的模型驱动的10C0一致性测试选择方法,并证明了所生成测试例的可靠性及其对测试目的的覆盖完备性.PN4TS方法以实际测试数据驱动测试例的生成过程,有效保证了经测试目的选择所生成的测试例是切实可执行的.文中使用简单文件传输协议例示了PN4TS方法的应用过程,之后结合数字内容点对点网络分发软件系统的实际测试生成和测试执行实践,证实了PN4TS方法应用于较大规模软件系统的一致性测试应用时具有更好的可用性和可靠性.
This paper explores Input-Output Conformance (IOCO) test generation with Colored Petri Nets (CPN) to propose a novel test purpose model driven IOCO test selection approach, named PN4TS approach. First, Conformance Testing oriented CPN (CT-CPN) is proposed as formal models for the software specification, and PN-IOCO relation is defined. Then, test purposes are specified as CT-CPN models, and test cases are generated using the synchronous simulation between a specification model and a test purpose model. The soundness of test generation and the coverage completeness for test purposes are both well proved. The PN4TS approach integrates synergistically the merits of the IOCO testing theory and the CPN modeling. As test selection executes with actual testing data, all generated test eases are sufficiently feasible for practical test execution. As a representative, we apply the PN4TS approach into a simple file sharing protocol to illustrate its usage, and its feasibility and effectiveness is finally elaborated via practical test selection and test execution for a practical digital context peer-to-peer network distribution software system.