With the increasing automation of high-speed railway train control system,the onboard equipment of train control system has become the key equipment for safe operation of trains and improving operation efficiency.Onboard equipment is a typical safety critical system,and its safety is very important for the safety of the train.As the software is the main part of onboard equipment,in order to ensure that the onboard equipment can work safely and reliably,it is necessary to test the software of onboard equipment.At present,the test of onboard equipment software mostly depends on the expert experience to manually write test cases.This test method is time-consuming,inefficient and easy to cause omissions.For the onboard equipment with complex system structure and functional logic,it is of great significance to study the model-based automatic test method to improve the test automation.Safe state machine(SSM)has the characteristics of hierarchy and concurrency,which can describe complex system intuitively.Therefore,this paper studies the software test case generation method of onboard equipment based on SSM,and takes the transition of CTCS-2level to CTCS-3 level as an example to illustrate the feasibility of the method.Firstly,this paper analyzes the structure and basic functions of onboard equipment,introduces the basic elements and features of SSM,and puts forward the application method of SSM model in the software test of onboard equipment.Secondly,taking the level transition function as an example,this paper makes a detailed requirement analysis on the level transition from CTCS-2 to CTCS-3.On the basis of requirement,a hierarchical SSM model of CTCS-2 to CTCS-3 transition is established.In order to generate test cases automatically,this paper proposes a flattened method of SSM,which transforms hierarchical SSM model into reachability graph without hierarchy.Finally,based on the reachability graph,this paper uses the branch and bound method based on edge coverage to generate the test path of the CTCS-2 level to CTCS-3 level transition model,and compares it with the commonly used breadth first search algorithm.After generating the test path,this paper uses MC/DC coverage criterion to instantiate the test path,and automatically generates the test cases that meet the coverage criterion.It shows the feasibility of this method,which is of great significance for the automatic test of onboard equipment. |