Abstract:
The internal logic of railway signal safety software is complex, and through sufficient unit testing, defects within the software can be better discovered and eliminated. This paper analyzed common methods of unit testing and proposed a black and white box fusion unit testing method based on the Extended Finite State Machine (EFSM) model, combined with the technical requirements of railway signal safety software unit testing. The paper used the automated testing tool Cantata as an example to verify whether the method can meet the completeness of the testing scenario and paied attention to whether the software structure was fully covered, analyzed the reasons for the lack of coverage based on the coverage results to determine whether there were abnormal scenarios, provided supplementary testing scenarios for the uncovered branches, which enriched the testing cases and ensured the reliability of the railway signal system.