Research on automatic test sequence generation method of computer interlocking test

Railway computer interlocking system is the core equipment of station signal control system, which directly affects the reliability and safety of the whole system. It is essential to test the interlocking software comprehensively and strictly [1]. The traditional interlocking test is conducted by testers to control the quality and efficiency of the test. According to the reference railway transportation “Interim Measures for railway signal interlocking test”, combined with the signal interlocking relationship test checklist, compared with the actual station yard of railway station, relying on manual preparation and manual implementation of test items, the test efficiency is relatively low. Therefore, the realization of automatic interlocking test has become a research hotspot at present. Interlocking function test belongs to the research field of black box test. On the premise of ensuring the comprehensiveness of test, generating efficient test sequence is the research focus of this subject.


Introduction
Computer interlocking system has been widely used in China's railways. It includes two parts: hardware and software. The test of the system also includes hardware test and software test. With the rapid research and development of hardware in recent years, its reliability and safety have reached a high level, and hardware faults can be found and handled in time, which is more convenient for maintenance. Compared with hardware failure, software failure is more difficult to detect. Software failure mainly refers to coding error or unreasonable design [2]. Its design and development is mainly based on the requirements of actual station interlocking relationship. Due to different people's error in demand analysis or certain error in the implementation process of coding function, some defects that are not easy to be found may occur [3]. In order to ensure the reliability and safety of computer interlocking system, interlocking software must pass complete and strict test to ensure its normal operation. Software test is the key technology in software quality assurance. Aiming at the test of computer interlocking software, the main functional tests are carried out. 2 completed test quality completely depends on the test level of the test personnel, and it is inevitable to have missed items or repeated operations in the test process. The test process is mainly a simple click operation. The process is boring and the test workload is large, which requires more human and financial resources [4]. The automatic test can not only avoid the influence of human subjective factors on the interlocking test, but also ensure the quality and efficiency of the test. Therefore, it is necessary to realize the automatic test of interlocking software [5].

Test requirements
At present, there is little research on the project sequence written by testers. At present, the main problems are: first, the test item table is fixed, and testers generally do not reorder or change; second, the data analysis generated in the test process should comply with the manual test table, which is convenient for data comparison compared with the manual test table, Third, testers may have some errors in their understanding of the test items, resulting in incomplete testing. Interlocking test conducted by interlocking personnel is functional test, which meets the characteristics of black box test [6]. The purpose of automatic test is to improve test efficiency and shorten test time on the premise of ensuring full coverage of test. Therefore, generating efficient test sequence is the research hotspot of automatic test.

Test items
In order to generate efficient test sequence, we must first have a certain understanding of the characteristics of test items. At present, the interlocking test items refer to the Interim Measures for railway signal interlocking test issued by China Railway Publishing House, which points out that the basic basis of signal interlocking relationship test is signal interlocking diagram, which is the summary of interlocking functions to be checked in each route, Including various interlocking functions of the circuit. During the test, all requirements shall be tested item by item to check their correctness. During the test, items shall be tested item by item to check their correctness. However, it does not provide standard forms or regulations, but only describes the test contents and precautions in natural language. During the test, take the route as the unit, and test the items in the route according to the interlocking Handle the route, press the start and end buttons correctly, and the arranged route is consistent with that in the interlocking table  3 Conduct single operation on the switch in the route, and the route can be arranged normally 4 If the section is occupied, it cannot be handled normally in the route, and it will not affect the handling of the route outside the route 5 The switch is broken, indicating that it can not be processed in the route, and the route does not affect the route. 6 The routes cannot be arranged normally when conflicting routes are handled 7 The single lock position of switch in the route is consistent with that in the interlocking table and can be arranged, otherwise it cannot be arranged 8 Arrange the route and indicate the switch breaking. The signal is closed in the route and will not be affected outside the route 9 Route arrangement, section occupation, signal closing in the route, no influence outside the route When the switch irrelevant to the route is disconnected, the signal indicating that the operation has been opened is still open 11 The open signal will not be affected when the section irrelevant to the route is occupied 12 The route signal is closed for some reason and cannot be opened automatically. After the fault is removed, click the start button to open the signal 13 If the route arrangement is successful, the signal is open, and the hostile routes are arranged one by one, all the hostile routes cannot be arranged 14 The route signal is open, and the signal light is red because of the breakdown of the lamp circuit or filament failure. 15 Route pre locking (occupying approach section), handling route cancellation, signal closing and route non unlocking 16 If the route is not pre locked, cancel the route, close the signal and unlock the route immediately 17 Route pre locking, general manual release and delayed route release 18 After the signal is opened, any section shall be unlocked and the signal shall be able to be closed 19 The route shall be arranged normally, and the automatic unlocking operation can be carried out after the train set enters normally, and it shall be section unlocking 20 Turn back unlocking test in the middle of shunting of shunting route, and the train can also be unlocked normally according to the turn back signal after turning back The above table lists the basic test items of interlocking test. For a large station, the workload of oneto-one corresponding test is undoubtedly huge [8]. In the actual test process, the test items are often interrelated, and there are many steps between test items with a lot of repetition and intersection [9]. Therefore, in order to improve the test efficiency of the automatic test process, it is necessary to rearrange the sequence of each test item for the automatic test.

Test state transition shortest path
The above table needs to repeatedly handle and cancel the route, and there is a lot of repetitive work. Therefore, for automatic test, this paper classifies the pre and post status of each test item in the unit of route, so as to facilitate the optimization of subsequent test items. According to the state analysis before and after the execution of test items, it is found that the state after the execution of some test items is consistent with that before the execution of other items. Therefore, this topic analyzes the state of test items, inherits the end state of the previous test item through the initial state of the latter test item, and reduces the repetitive operation of route handling, so as to improve the test efficiency.
By analyzing the changes of route control status of test items before and after, the route control process can be divided into three stages: before route establishment, after route establishment and route unlocking. The closed loop status inheritance is formed before route establishment -after route establishment -route release -before route establishment, so as to reduce repeated route handling.
According to the above route process classification, the test items in Table 1 can be distinguished as follows. be executed only after the electrolytic lock operation is carried out first. Generally, items in the same state stage cannot be carried out at the same time, such as executing test item 2 first, at this time, if the route is successfully handled, test item 3 cannot be executed, because the status changes of test items 2 and 3 are from before to after the route is successfully handled. Compared with test items 2 and 3, it can be found that there is no opposition between the two preconditions. Just execute the preconditions of item 2 and then execute test item 3. At this time, the manual operation of test item 2 is also completed, it is only necessary to check the contents of test item 2. Compare test sequence 1, 2 and 3 in Table 1. First execute test item 1, handle the preconditions of test item 2, and then execute test item 3, or test item 2, which can reduce one repeated route handling operation. It can be seen that reordering the test items can reduce the repeated route handling operation, to improve the test efficiency, it is particularly important to analyze the status of each test item.

Test sequence generation
The pre execution and post execution states of test items are determined. What can be realized is that the latter test item inherits the post execution state of the previous item. Therefore, this paper studies and analyzes each test item, and graphically describes the pre and post relationship of each test item according to the analysis results. As shown in Figure 1, test items can not be executed in parallel under the same state, Only one of them can be executed. Therefore, when executing multiple test items, the implementation method is not just simple sequential execution or single cycle as shown in the figure. It can be multiple cycles, but figure 1 is applicable to all test items in Table 1 regardless of the number of cycles.
In Figure 1, multiple associated test items are connected in series according to the front and rear states to test together, so that the front test items can create execution conditions for the later test items, which can reduce repeated route handling and improve the test efficiency. As shown in Figure 2, multiple test items are connected together according to certain rules to form a test sequence [10].  Figure 2. Interlocking test items connected in series into test sequence.

Conclusion
By analyzing the status before and after the test items in the interlocking test, the status of the next test item can inherit the status of the previous test item, breaking the simple front to back test habit of traditional test items. On the premise of ensuring the comprehensiveness of the test, it is conducive to improve the test efficiency, save the test time and reduce repeated route handling operations, It is of great help to the generation of automatic test sequences.