Model-based Formal Approach for Generating Test Cases and Test Sequences Automatically by Example of the ETCS-2

With the rapid development of the Train Control System in China,the research of the train control system has drawn much attention from the academia.A new type of model-based formal approach for test cases and sequences generation is proposed in this paper to increase the test automation degree by example of the ETCS-2 system.In this paper,a set of modeling rules is presented firstly to make the Colored Petri Net(CPN) model more suitable for test generation.Then,an automated test approach is described in detail,which combines an automatic test case generating algorithm and a type of automatic test sequence searching algorithm.The output of the whole testing procedure is a set of well-formed XML(Extensible Markup Language) files which is used to increase the automation degree of the test executing process.Finally,based on the modeling rules,a partial model of the ETCS-2 on-board subsystem is built and analyzed using the CPN Tools as a case study.The model-based formal approach is implemented with this model and the test cases and test sequences are all generated in the form of XML.The results show the CPN-model based testing approach can be used to improve the automation of the testing procedure and the test cases can cover all the properties of the CPN model,which represents the System Requirement Specification of ETCS-2.