An automated testing method for computer interlocking system
Through automated testing methods, the problems of incomplete tests of railway signal systems and manual test errors are solved, and fast and accurate interlocking system testing is achieved, which improves the testing efficiency and accuracy.
Patent Information
- Application Number
- CN202110052316.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-01-15
- Publication Date
- 2024-12-31
- Estimated Expiration
- 2041-01-15
AI Technical Summary
In the prior art, the railway signal system is incompletely tested, and there are problems such as manual testing errors and excessive testing cycles.
The automated testing method of computer interlocking system is adopted to obtain interlocking site data and rule information, determine the approach and rules, automatically execute tests, generate test results, and realize the automatic generation and accuracy of interlocking tests.
Greatly save time and labor costs, improve test accuracy and accuracy, and ensure comprehensive testing of computer interlocking logic.
Smart Images

Figure CN112765020B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of railway signal computer interlocking test systems, and in particular to an automatic test method for a computer interlocking system. Background Art
[0002] Interlocking refers to the mutual restriction relationship established by technical means between signals, switches and routes in order to ensure the safety of train operation and shunting operations at railway stations. The route refers to the route along which trains, shunting locomotives or trains run from one place to another within the station.
[0003] With the rapid improvement and development of electronic technology, computer technology, reliability and fault-tolerant theory and technology, computer interlocking system has gradually replaced the electric centralized interlocking system and become the main development direction of the current station interlocking system. The computer interlocking system is a real-time safety control and protection system, so the system is required to have high reliability and safety, and must meet the principle of fault-oriented safety of the railway signal system. For such a high reliability, high safety, high stability, large scale, and strict safety requirements for real-time logic, it is very necessary to conduct comprehensive and strict testing before it is put into use. For a long time, in the station signal interlocking project, the system test has adopted the manual testing method. Due to the defects of low test efficiency and insufficient testing, this method is increasingly incompatible with the development level of computer interlocking technology. It is urgent to realize automatic testing instead of manual testing, so as to ensure the accuracy and comprehensiveness of interlocking testing, shorten the test cycle, and eliminate the mistakes that may be caused by manual testing.
[0004] In the prior art, automated testing has been used to replace manual testing. The test of temporary speed limit messages refers to the simulation of possible failures of speed limit during train operation, so as to ensure the safe operation of the train. In addition, after collecting various equipment status information and performing complex logical operations, the light display of railway signal machines and the action of switch equipment are controlled and tested. However, the tested items are only for one part, and not all possible situations during the operation of the train are tested. Summary of the invention
[0005] The invention provides an automated testing method for a computer interlocking system, aiming to solve the problems in the prior art of incomplete testing of a railway signal system, manual testing errors and excessively long testing cycles.
[0006] To achieve the above object, the present invention adopts the following technical solutions:
[0007] An automated testing method for a computer interlocking system of the present invention comprises the following steps:
[0008] Obtain interlocking station data and interlocking rule information, and determine N routes corresponding to the interlocking stations in the interlocking station data, where N is an integer greater than 1;
[0009] Waiting for a request to select one of the interlocking stations and at least one route corresponding to the one of the interlocking stations and at least one rule in the interlocking rule information;
[0010] In response to the request, a test result is obtained.
[0011] Obtain interlocking station data and interlocking rule information, wherein the interlocking station data includes basic station graphic element information, such as signals, switches, sections, I / O, route table information and graphic element logical connection information, and the interlocking rule number represents a unique numbering of each interlocking test rule, wherein the interlocking station data includes multiple interlocking stations, each interlocking station includes multiple routes, and each route is numbered, select one or more interlocking stations to be tested and one or more routes corresponding to the interlocking station, and one or more interlocking rules to be selected for testing the route, and compare the test results with the expected results under the rules. The expected results have only two types: negative or positive. Whether the logic test of the interlocking station under the rule is correct is the result of its two logical ANDs.
[0012] Preferably, interlocking station data and interlocking test rules are obtained, and N routes corresponding to the interlocking stations in the interlocking station data are determined, where N is an integer greater than 1, including:
[0013] Acquire interlocking station data, the interlocking station data including at least one interlocking station, the at least one interlocking station including N routes, wherein N is an integer greater than 1, and determine the route numbers of the N routes;
[0014] An interlocking test rule is obtained, wherein the interlocking test rule includes at least one rule, and a number corresponding to the at least one rule is determined to obtain interlocking rule information.
[0015] Preferably, in response to the request, obtaining a test result includes:
[0016] Determine whether the at least one rule has a preceding command, and if so, execute the preceding command;
[0017] When the pre-command does not exist or the pre-command exists and runs successfully, the execution command is run, and the execution command indicates the test operation of the at least one rule on the at least one route;
[0018] According to the execution command, the test result is obtained.
[0019] An automatic testing device for a computer interlocking system, comprising:
[0020] Acquisition module: used to acquire interlocking station data and interlocking rule information, and determine N routes corresponding to the interlocking station in the interlocking station data, where N is an integer greater than 1;
[0021] A waiting module: used for waiting for a request to select one of the interlocking stations and at least one route corresponding to the one of the interlocking stations and at least one rule in the interlocking rule information;
[0022] Response module: used to respond to the request obtained by the waiting module and obtain the test result.
[0023] Preferably, the acquisition module specifically includes:
[0024] A first acquisition unit is used to acquire interlocking station data, wherein the interlocking station data includes at least one interlocking station, and the at least one interlocking station includes N routes, wherein N is an integer greater than 1, and determines the route numbers of the N routes;
[0025] The second acquisition unit is used to acquire interlocking test rules, wherein the interlocking test rules include at least one rule, and determine the number corresponding to the at least one rule to obtain interlocking rule information.
[0026] Preferably, the response module specifically includes:
[0027] A judging unit: used for judging whether the at least one rule has a preceding command, and if so, executing the preceding command;
[0028] An operation unit: used for running an execution command when the preceding command does not exist or the preceding command exists and runs successfully, wherein the execution command indicates a test operation of the at least one rule on the at least one route;
[0029] Test result unit: used to obtain the test result according to the execution command.
[0030] An electronic device comprises a memory and a processor, wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement an automated testing method for a computer interlocking system as described in any one of the above.
[0031] A computer-readable storage medium storing a computer program, wherein the computer program enables a computer to implement an automated testing method for a computer interlocking system as described in any one of the above when executed.
[0032] The present invention has the following beneficial effects:
[0033] The present invention is an automated testing platform for computer interlocking, which realizes the automatic generation of interlocking test cases according to certain interlocking test rules, the process of automatically executing the selected rule cases according to the test personnel's independent selection of interlocking rule items, and finally exports the test result report, which can greatly save time and labor costs, improve the accuracy and precision of the test, and achieve the purpose of testing the computer interlocking logic. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 This is a first flow chart of an automated testing method for a computer interlocking system implemented in an embodiment of the present invention;
[0035] Figure 2 is a second flow chart of an automated testing method for a computer interlocking system implemented in an embodiment of the present invention;
[0036] Figure 3 This is a specific implementation flow chart of an automated testing method for a computer interlocking system implemented in an embodiment of the present invention;
[0037] Figure 4 Schematic diagram of an automated testing device for a computer interlocking system implemented in an embodiment of the present invention;
[0038] Figure 5 It is a schematic diagram of an acquisition module of an automated testing device for a computer interlocking system implemented in an embodiment of the present invention;
[0039] Figure 6 Schematic diagram of a response module of an automated testing device for a computer interlocking system implemented in an embodiment of the present invention;
[0040] Figure 7 This is a specific implementation flow chart of an automated testing device for a computer interlocking system implemented in an embodiment of the present invention;
[0041] Figure 8 The present invention is a schematic diagram of an electronic device for realizing an automated testing device for a computer interlocking system according to an embodiment of the present invention. DETAILED DESCRIPTION
[0042] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present invention.
[0043] The terms "first", "second", etc. in the claims and specification of the present application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the terms used in this way are interchangeable under appropriate circumstances. This is merely a way of distinguishing objects with the same properties in the embodiments of the present application. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, so that a process, method, system, product or apparatus that includes a series of units is not necessarily limited to those units, but may include other units not expressly listed or inherent to these processes, methods, products or apparatus.
[0044] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by technicians in the technical field to which this application belongs. The terms used in this article and in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application.
[0045] Example 1
[0046] like Figure 1 As shown, an automated testing method for a computer interlocking system comprises the following steps:
[0047] S110, acquiring interlocking station data and interlocking rule information, and determining N routes corresponding to the interlocking stations in the interlocking station data, where N is an integer greater than 1;
[0048] S120, waiting for a request to select one of the interlocking stations and at least one route corresponding to the one of the interlocking stations and at least one rule in the interlocking rule information;
[0049] S130. Respond to the request and obtain test results.
[0050] In Example 1, interlocking station data and interlocking rule numbers are obtained, wherein the interlocking station data includes basic station graphic element information, such as signals, switches, sections, I / O, route table information and graphic element logical connection information, and the interlocking rule number represents a unique numbering of each interlocking test rule, wherein the interlocking station data includes multiple interlocking stations, each interlocking station includes multiple routes, and each route is numbered, waiting to select one or more interlocking stations to be tested and one or more route numbers corresponding to the interlocking stations, as well as one or more interlocking rules to be selected for testing the route number. The test has two results: expected result and test result. The expected result is that every rule clearly defined by the rule has an expected result, that is, there are only two, negation and affirmation. For any route, the expected result is the same; the test result is the result of the actual test process, which needs to be judged in combination with the change of equipment status; whether the logic test of the interlocking station under the rule is correct is the result of its two logical ANDs, which can then be assisted in applying to situations that may occur in the actual operation of the train, and respond in time, which can greatly save time and labor costs, improve the accuracy and precision of the test, and achieve the purpose of testing computer interlocking logic.
[0051] Example 2
[0052] like Figure 2 As shown, an automated testing method for a computer interlocking system comprises:
[0053] S210, acquiring interlocking station data and interlocking rule information, and determining N routes corresponding to the interlocking stations in the interlocking station data, where N is an integer greater than 1;
[0054] S220, waiting for a request to select one of the interlocking stations and at least one route corresponding to the one of the interlocking stations and at least one rule in the interlocking rule information;
[0055] S230, determining whether the at least one rule has a preceding command, and if so, executing the preceding command;
[0056] S240, when the pre-command does not exist or the pre-command exists and runs successfully, running an execution command, wherein the execution command indicates a test operation of the at least one rule on the at least one route;
[0057] S250: Obtain test results according to the execution command.
[0058] As can be seen from Example 2, multiple rules are tested for at least one route of the interlocking station data, which also includes judging the pre-command of a certain rule. For example, there are multiple routes to choose from from the starting signal to the terminal signal. Here, the signal represents the equipment that can guide the interlocking relationship of the interlocking station. First, the starting signal is selected, and then the route number corresponding to the route is selected. One or more rules are selected according to the interlocking rules to test the route. During the test, it is first determined whether there is a pre-command for the rule. For example, the rule "position the switches one by one, and the switches move to the positioning position" has no pre-command, and its execution command It is to perform positioning operation on the turnout; for example: the rule "Occupy the turnout sections one by one, and the turnouts in the occupied sections cannot operate normally" has a pre-command, which requires the turnout to be occupied first, and then test whether the occupied turnout can operate normally, that is, its execution command is to execute positioning or reverse operation command on the occupied turnout; for example, the rule "Open the guide signal and then cancel the route, test whether the guide signal is immediately closed and unlocked (the guide signal is closed but the route is not unlocked)" has two pre-conditions, the first is to open the guide signal, and the second is to cancel the guide route after confirming that the guide signal is open. The execution command is to detect the guide signal The signal is closed and the route is unlocked. Only when the preceding command is executed successfully can the execution command test be performed on the rule. The expected results of the execution command test are "False" or "True". False means that the description of the test conclusion in the interlocking test rule is negative, for example: "Occupy the switch sections on the route one by one (including the restricted section) to test whether non-route shunting can be established (conclusion: no)". When designing this use case, its expected result value is False; True means that the description of the test conclusion in the interlocking test rule is positive, for example: "Test the guide signal route group by group" The switch loss table, whether the guide signal is closed (closed)", when designing this use case, its expected result value is True; in addition, this is only a test of one rule, and there are tests of multiple rules. The tests of one or more rules constitute a test case. After the test is completed, if the interlocking station generates a test case for the first time, the data will be stored in the database and read directly from the database when the program is started next time; if the data of the interlocking station changes, the original use case in the database will be deleted and the latest use case will be uploaded, which ensures the accuracy and comprehensiveness of the interlocking test, shortens the test cycle, and eliminates the mistakes that may be caused by manual testing.
[0059] Example 3
[0060] like Figure 3 As shown, a specific implementation may be:
[0061] S310, obtaining interlocking test rules;
[0062] According to the relevant technical standards of railway signals, the interlocking test rules are refined and organized. These test rules can be divided into the following 13 categories, each of which is divided into several rules, including basic operation of interlocking equipment, route arrangement, route selection function, route unlocking function, signal opening, route unlocking, shunting midway return unlocking, guidance function, downhill car reception and route continuation, departure line divergence, long shunting route, non-route shunting, and exhaustive testing. Each interlocking rule is numbered and the numbering format is agreed upon: SRS_xx_xx to ensure the uniqueness of the rule number. For example, there are 4 rules in the basic operation of interlocking equipment, which are numbered: SRS_01_01, SRS_01_02, etc. If there are 25 rules in the guidance function, the starting number is: SRS_08_01, and the ending number is SRS_08_25.
[0063] S320, obtaining interlocking station data;
[0064] The interlocking station data includes basic station graphic element information, such as signals, switches, sections, I / O, route table information and graphic element logical connection information. The interlocking station data is composed of multiple interlocking stations. For example, Hangzhou East Station is an interlocking station, which consists of multiple routes, and the routes are numbered.
[0065] S330. Generate test cases according to interlocking test rules.
[0066] The test case contains seven parts: test case number, route number, interlocking rule number, prefix command, execution command, expected result and whether it passes. According to the needs, select the test interlocking station and the route or routes corresponding to the interlocking station for testing. Select the rule to be tested. The rule has an expected result. First execute the prefix command of the rule. If not, do not execute it. Then run the execution command to get the test result. Whether the logic test of the interlocking station under the rule is correct is the result of its two logical ANDs, that is, the logical AND result of the test result and the expected result. Whether the test case passes indicates whether the logic AND result is correct. After the program runs, if the interlocking station generates a test case for the first time, the data will be stored in the database and read directly from the database when the program is started next time; if the data of the interlocking station changes, the original test case in the database will be deleted and the latest test case will be uploaded. During testing, the user needs to select the test rules according to their needs. On the interface, we display the interlocking test rules in a tree structure according to 13 categories, and then expand them in a list structure according to the number of interlocking rules under each category. Each column displays the number of the interlocking rule. When the number is clicked, the corresponding rule content is displayed. In addition, a selection list of route numbers is provided, which can be selected by checking the box. After selecting the test rules and routes, the program background will filter the use cases from the database and then automatically execute the test.
[0067] Example 4
[0068] like Figure 4 As shown, an automated testing device for a computer interlocking system comprises:
[0069] Acquisition module 10: used to acquire interlocking station data and interlocking rule number, and determine N access route numbers corresponding to the interlocking stations in the interlocking station data, where N is an integer greater than 1;
[0070] Waiting module 20: used for waiting for a request to select a target test interlocking station and a target test route number corresponding to the target test interlocking station and at least one rule among the interlocking rule number;
[0071] The response module 30 is used to respond to the request obtained by the waiting module and obtain the test result.
[0072] An implementation mode of the above-mentioned device may be: the acquisition module 10 acquires the interlocking station field data and the interlocking rule number. In the test, the test is performed in the form of a test case. All sub-threads are started to generate all test cases according to the interlocking station field data and the interlocking rules, and the N access numbers corresponding to the interlocking stations in the interlocking station field data are determined, where N is an integer greater than 1; the waiting module 20 waits for a request to select a target test interlocking station and a target test access number corresponding to the target test interlocking station and at least one rule in the interlocking rule number; the response module 30 responds to the request acquired by the waiting module to obtain the test result. The response module 30 also includes starting a sub-thread to execute the test case and displaying the test case status information. When the automated test is started, you can choose to pause or cancel. Temporarily, wait for the current test case to be executed and record the pause state information. Cancel, wait for the current execution of the test case to be completed, exit the thread, return to the waiting module 20, and after starting the automated test, first initialize the station field status, then start the test, and enter the response module 30.
[0073] Example 5
[0074] like Figure 5 As shown, an acquisition module 10 of an automated testing device for a computer interlocking system includes:
[0075] The first acquisition unit 12 is used to acquire interlocking station data, wherein the interlocking station data includes at least one interlocking station, and the at least one interlocking station corresponds to N routes, wherein N is an integer greater than 1, and determines the route numbers of the N routes;
[0076] The second acquisition unit 14 is used to acquire an interlocking test rule, wherein the interlocking test rule includes at least one rule, and determine a number corresponding to the at least one rule to obtain an interlocking rule number.
[0077] An implementation manner of the acquisition module 10 of the above-mentioned device may be: a first acquisition unit 12 acquires interlocking station field data, the interlocking station field data includes at least one interlocking station, the at least one interlocking station corresponds to N routes, wherein N is an integer greater than 1, and determines the route numbers of the N routes; a second acquisition unit 14 acquires interlocking test rules, the interlocking test rules include at least one rule, and determines the number corresponding to the at least one rule to obtain the interlocking rule number.
[0078] Example 6
[0079] like Figure 6 As shown, a response module 30 of an automated testing device for a computer interlocking system includes:
[0080] The judging unit 32 is used to judge whether the at least one rule has a preceding command, and if so, to execute the preceding command;
[0081] The running unit 34 is used to run an execution command when the preceding command does not exist or the preceding command exists and runs successfully, wherein the execution command indicates a test operation of the at least one rule on the target test path number;
[0082] The test result unit 36 is used to obtain the test result according to the execution command.
[0083] An implementation mode of the response module 30 of the above-mentioned device may be: a judgment unit 32 judges whether there is a preceding command for the at least one rule, and if the preceding command exists, runs the preceding command; an operation unit 34 runs an execution command when the preceding command does not exist or the preceding command exists and runs successfully, and the execution command indicates the test operation of the at least one rule on the target test path number; a test result unit 36 obtains the test result according to the execution command.
[0084] Example 7
[0085] like Figure 7 As shown, an automated testing device for a computer interlocking system specifically comprises:
[0086] S710, data configuration module: the data configuration tool provides data for the interlocking machine and the test machine. For the same interlocking station data, the tool generates XML format data for the test machine and BIN format data for the interlocking machine.
[0087] S720, label setting module: The XML data file exported by the data configuration tool contains basic data and route table data; among them, the label of the basic data<base_data> The following contains basic attribute information such as<region_height> ,<region_width> wait until<station_part> The tag is the information of the stations included in the interlocking station, such as<station_part> Under the label <station>The tag contains the properties of the site such as<station_id> ,<station_no> wait until<element_part> Label,<element_part> The attribute information of the equipment such as sections, switches, and signals is stored; the route table data is stored in the tag<route_data> And subordinate tags, each <route>A label indicates a path. <route>The tag contains the route attributes and the elements in the route and their attribute information. In addition to the elements of the route, it also contains other route or element information such as intrusion, protection, hostility, etc.<route_protect_element> ,<route_limit_element> ;
[0088] S730, test case modeling module: after having interlocking test rules, station data and test case prototypes, the generation of test cases can be modeled. In this test case generation architecture, the inputs are COMMAND, STTESTINFO, DATA and ROUTE. Through each major interlocking test rule case generator, the corresponding interlocking test case can be generated;
[0089] Among them, COMMAND corresponds to a structure. According to the information in the structure, a specific command interface can be generated, such as route command interface, turnout-related command interface, signal-related command interface, section-related command interface, open signal command interface, route locking command interface, etc.; STTESTINFO also corresponds to a structure.
[0090] DATA is the basic data and route table data. These static data are read and stored in the memory when the program starts. In addition, the ROUTE module can be constructed based on the route table data. The function of ROUTE is to obtain a collection of various route types and generate a route type interface:
[0091] Next is the implementation of the interlocking test rule generator. Based on the similarity of the rules, in the object-oriented programming of the programming language, the basic operation of the interlocking device is defined as the BASECASE class, which is the parent class of the other 12 types of rules. The design of this BASECASE class is as follows:
[0092] ◆Public member functions: including all sub-command generation functions;
[0093] ◆Public member functions: Contains all access type acquisition interfaces;
[0094] ◆Public member functions: other auxiliary functions, such as hostile condition check, judging whether it is a pick-up route, judging whether it is a departure route, judging whether it is a guide route, obtaining the approach section of the shunting route, obtaining the device ID of the section in the route, and obtaining the device ID of all elements in the route. The parameters of these functions need to be passed in a certain route data.
[0095] ◆Protected member variables: a collection of various routes;
[0096] ◆Protected member variables: a set of commands generated by a single test case;
[0097] ◆Constructor: pass in station data;
[0098] After completing the design of the BASECASE class, the remaining 12 types of rules can be inherited from the BASECASR class. In addition to reusing the functions of the BASECASE class, the functions can also be expanded. In programming languages, inheritance means: it is the most important means for object-oriented programming to make code reused, allowing programmers to expand and add functions while maintaining the original class characteristics. The new class generated in this way is called a derived class, and the inherited class is called a parent class or base class. For example: design rule category 4 and name it: RouteUnlockCase. Its design structure is as follows: RouteUnlockCase inherits from BASECASE and has various common functions of the parent class. In addition, it also has private functions such as getRouteUnlockSRS0601 to implement the corresponding interlocking rules. The test case set generated for this class is returned by the public interface getRouteUnlockCase.
[0099] S740, simulation comparison module: establish a simulation platform, simulate the equipment of the interlocking station, including signals, switches, sections, IO, etc., use simulation software to simulate the actual operating environment, after the interlocking host receives the control command, it will perform logical judgment, if its logic believes that the instruction is executable, then it will be sent to the simulator, the simulator simulates the state switching of the on-site equipment (if it is on-site, it is the state change of real equipment such as signals and switches, this does not rule out the possibility of equipment failure, but we assume that all simulations can be performed), then the simulator sends the transformed state to the interlocking host, the interlocking host performs some budgeting, and then transmits the station status to the automated test platform. With this real-time station data, it is possible to determine whether the command is executed correctly, and whether the test results are consistent with the actual field operation logic. If they are consistent, it indicates that the test has passed.
[0100] Example 8
[0101] like Figure 8 As shown, an electronic device includes a memory 801 and a processor 802, wherein the memory 801 is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor 802 to implement the above-mentioned automatic testing method of a computer interlocking system.
[0102] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the electronic device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0103] A computer-readable storage medium storing a computer program, wherein the computer program enables a computer to implement the above-mentioned automated testing method for a computer interlocking system when executed.
[0104] Exemplarily, the computer program may be divided into one or more modules / units, one or more modules / units are stored in the memory 801 and executed by the processor 802, and the I / O interface transmission of data is completed by the input interface 805 and the output interface 806 to complete the present invention. The one or more modules / units may be a series of computer program instruction segments that can complete specific functions, and the instruction segments are used to describe the execution process of the computer program in the computer device.
[0105] The computer device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The computer device may include, but is not limited to, a memory 801 and a processor 802. Those skilled in the art may understand that this embodiment is only an example of a computer device and does not constitute a limitation on the computer device. The computer device may include more or fewer components, or a combination of certain components, or different components. For example, the computer device may also include an input device 807, a network access device, a bus, etc.
[0106] The processor 802 may be a central processing unit (CPU), or other general-purpose processors 802, digital signal processors 802 (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor 802 may be a microprocessor 802 or the processor 802 may be any conventional processor 802, etc.
[0107] The memory 801 may be an internal storage unit of a computer device, such as a hard disk or memory of the computer device. The memory 801 may also be an external storage device of the computer device, such as a plug-in hard disk equipped on the computer device, a smart memory card (SmartMediaCard, SMC), a secure digital (SecureDigital, SD) card, a flash card (FlashCard), etc. Further, the memory 801 may also include both an internal storage unit of the computer device and an external storage device. The memory 801 is used to store computer programs and other programs and data required by the computer device. The memory 801 may also be used to temporarily store in the output device 808, and the aforementioned storage media include various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory ROM803, a random access memory RAM804, a disk or an optical disk.
[0108] The above description is only a specific embodiment of the present invention, but the technical features of the present invention are not limited thereto. Any changes or modifications made by any technician in the field of the present invention are included in the patent scope of the present invention.< / route> < / route> < / station>
Claims
1. An automated testing method for a computer interlocking system, characterized in that: include: Obtain interlocking station data and interlocking rule information, and determine N routes corresponding to the interlocking stations in the interlocking station data, where N is an integer greater than 1; Obtaining interlocking station data and interlocking rule information, and determining N routes corresponding to the interlocking stations in the interlocking station data, where N is an integer greater than 1, including: Acquire interlocking station data, the interlocking station data includes at least one interlocking station, the interlocking station data includes station graphic element information, route table information and graphic element logical connection information, the interlocking station data is composed of multiple interlocking stations, the at least one interlocking station includes N routes, wherein N is an integer greater than 1, and determine the route numbers of the N routes; Acquire an interlocking test rule, wherein the interlocking test rule includes at least one rule, and determine a number corresponding to the at least one rule to obtain interlocking rule information; Waiting for a request to select one of the interlocking stations and at least one route corresponding to the one of the interlocking stations and at least one rule in the interlocking rule information; In response to the request, a test case is generated according to the interlocking test rules. The test case includes seven parts: test case number, route number, interlocking rule number, preceding command, execution command, expected result and whether passed or not. According to the requirements, the test interlocking station and one or more routes corresponding to the interlocking station are selected for testing to obtain the test results.
2. The automated testing method for a computer interlocking system according to claim 1, characterized in that: In response to the request, the test results are obtained, including: Determine whether the at least one rule has a preceding command, and if so, execute the preceding command; When the pre-command does not exist or the pre-command exists and runs successfully, the execution command is run, and the execution command indicates the test operation of the at least one rule on the at least one route; According to the execution command, the test result is obtained.
3. An automated testing device for a computer interlocking system, characterized in that: include: Acquisition module: used to acquire interlocking station data and interlocking rule information, and determine N routes corresponding to the interlocking station in the interlocking station data, where N is an integer greater than 1; The interlocking station data includes station graphic element information, route table information and graphic element logical connection information, and the interlocking station data is composed of multiple interlocking stations; A waiting module: used for waiting for a request to select one of the interlocking stations and at least one route corresponding to the one of the interlocking stations and at least one rule in the interlocking rule information; Response module: used to respond to the request obtained by the waiting module, generate a test case according to the interlocking test rule, the test case includes seven parts: test case number, route number, interlocking rule number, pre-command, execution command, expected result and whether it passes, select the test interlocking station and one or more routes corresponding to the interlocking station for testing according to the requirements, and obtain the test result; The acquisition module specifically includes: A first acquisition unit is used to acquire interlocking station data, wherein the interlocking station data includes at least one interlocking station, and the at least one interlocking station includes N routes, wherein N is an integer greater than 1, and determines the route numbers of the N routes; The second acquisition unit is used to acquire interlocking test rules, wherein the interlocking test rules include at least one rule, and determine the number corresponding to the at least one rule to obtain interlocking rule information.
4. The automated testing device for a computer interlocking system according to claim 3, characterized in that: The response module specifically includes: A judging unit: used for judging whether the at least one rule has a preceding command, and if so, executing the preceding command; An operation unit: used for running an execution command when the preceding command does not exist or the preceding command exists and runs successfully, wherein the execution command indicates a test operation of the at least one rule on the at least one route; Test result unit: used to obtain the test result according to the execution command.
5. An electronic device, characterized in that: It comprises a memory and a processor, wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement an automated testing method for a computer interlocking system as described in any one of claims 1 to 2.
6. A computer-readable storage medium storing a computer program, characterized in that: The computer program enables a computer to implement an automated testing method for a computer interlocking system according to any one of claims 1 to 2 when executed by the computer.