CN110990297B - Test method and device of interlocking system and electronic equipment - Google Patents
Test method and device of interlocking system and electronic equipment Download PDFInfo
- Publication number
- CN110990297B CN110990297B CN201911335362.5A CN201911335362A CN110990297B CN 110990297 B CN110990297 B CN 110990297B CN 201911335362 A CN201911335362 A CN 201911335362A CN 110990297 B CN110990297 B CN 110990297B
- Authority
- CN
- China
- Prior art keywords
- parameter information
- tested
- test case
- test
- information
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3684—Test management for test design, e.g. generating new test cases
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/02—Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Testing Electric Properties And Detecting Electric Faults (AREA)
- Train Traffic Observation, Control, And Security (AREA)
Abstract
The application discloses a testing method of an interlocking system, which comprises the following steps: when a test instruction for testing the interlocking system is received, acquiring an initial configuration file of the interlocking system, wherein the initial configuration file comprises a station diagram of the interlocking system and first parameter information of an object to be tested in the station diagram; generating an operation instruction of an object to be tested in the operation station field diagram according to the current test case coding logic; according to the operation instruction, operating an object to be detected in the station diagram; after the current test case finishes the operation of all corresponding objects to be tested, acquiring second parameter information of the objects to be tested in the station diagram after responding to the operation instruction; and determining a test result according to the change information of the second parameter information relative to the first parameter information. The application also discloses a testing device of the interlocking system and electronic equipment.
Description
Technical Field
The present application relates to the field of railway track traffic technologies, and in particular, to a method and an apparatus for testing an interlocking system, and an electronic device.
Background
With the development of railway technology, in recent years, railway track traffic has become a main traffic mode for traveling in China. In railway traffic, various signals are required to control the normal operation of a railway.
In the current railway signal system field, due to the specificity of industry, complexity of scenes and variability of system expression modes, a manual test mode is generally adopted for black box test of the project-level interlocking system function, and the manual test mode has higher accuracy. Some related art also exist that test by detecting signal system code bit changes or parsing communication packet information.
However, in the related art, only the correctness of the internal logic operation of the interlocking system can be given a test conclusion, so that the manual test is difficult to be completely imitated, and the whole test content of the manual test cannot be covered.
Disclosure of Invention
In view of this, the present application provides a testing method, apparatus, electronic device and computer readable storage medium for an interlocking system, so as to solve the problem that in the related art, only the correctness of the internal logic operation of the contact system can be given out, it is difficult to completely simulate the manual test, and the whole testing content of the manual test cannot be covered.
To achieve the above object, according to one aspect of the present application, there is provided a method for testing an interlock system, including:
when a test instruction for testing an interlocking system is received, acquiring an initial configuration file of the interlocking system, wherein the initial configuration file comprises a station diagram of the interlocking system and first parameter information of an object to be tested in the station diagram;
generating an operation instruction for operating the object to be tested in the station yard graph according to the current test case coding logic;
operating the object to be detected in the station diagram according to the operation instruction;
after the current test case finishes the operation of all corresponding objects to be tested, acquiring second parameter information of the objects to be tested in the station diagram after the objects to be tested respond to the operation instruction;
and determining a test result according to the change information of the second parameter information relative to the first parameter information.
In one alternative, after determining the test result according to the change information of the second parameter information relative to the first parameter information, the method further includes:
judging whether the current test case has completed the test or not under the condition that the test result is passed;
if the current test case is finished, the next test case is skipped to continue testing until all the test cases are finished testing.
In one alternative, after determining the test result according to the change information of the second parameter information relative to the first parameter information, the method further includes:
judging whether the current test case can be retracted or not according to the change information under the condition that the test result is not passed;
under the condition that the current test case can be retracted, retracting an object to be tested corresponding to the current test case, and acquiring third parameter information of the retracted object to be tested in the station diagram;
determining that the rollback is successful under the condition that the third parameter information is the same as the first parameter information;
and under the condition that the third parameter information is different from the first parameter information, ending the current test case, and jumping to the next test case to continue testing until all the test cases complete testing.
In an alternative manner, after determining that the rollback is successful, if the third parameter information is the same as the first parameter information, the method further includes:
judging whether the current test case has completed the test;
and under the condition that the current test case is completed, jumping to the next test case to continue testing until all the test cases are tested.
In an alternative manner, the determining the test result according to the change information of the second parameter information relative to the first parameter information includes:
under the condition that the change information is matched with preset change information, determining that the test result is passed;
and under the condition that the change information is not matched with the preset change information, determining that the test result is not passed.
In one alternative, after determining the test result according to the change information of the second parameter information relative to the first parameter information, the method further includes:
and outputting a test result report according to the preset file format.
In an optional manner, the operating the object to be measured in the station field map according to the operation instruction includes:
inputting a first trigger instruction to a first object in the station diagram according to the operation instruction so as to determine a control command for controlling a second object in the station diagram;
controlling the second object according to the operation instruction and the control command;
or alternatively, the first and second heat exchangers may be,
according to the operation instruction, a third trigger instruction is input to the second object to determine the object to be detected;
and inputting a fourth trigger instruction to the first object according to the operation instruction so as to control the second object according to a control command corresponding to the first object.
According to a second aspect of the present application, there is provided a test device for an interlock system, comprising:
the acquisition module is used for acquiring an initial configuration file of the interlocking system when a test instruction for testing the interlocking system is received, wherein the initial configuration file comprises a station diagram of the interlocking system and first parameter information of an object to be tested in the station diagram;
the generating module is used for generating an operation instruction for operating the object to be tested in the station yard graph according to the current test case coding logic;
the operation module is used for operating the object to be detected in the station diagram according to the operation instruction;
the acquisition module is further used for acquiring second parameter information of all corresponding objects to be tested in the station diagram after the current test case finishes the operation of the objects to be tested in response to the operation instruction;
and the determining module is used for determining a test result according to the change information of the second parameter information relative to the first parameter information.
In an alternative, the apparatus further comprises:
the first judging module is used for judging whether the current test case has completed the test or not under the condition that the test result is passed;
and the first jump module is used for jumping to the next test case to continue testing if the current test case is completed, until all the test cases complete testing.
In an alternative, the apparatus further comprises:
the second judging module is used for judging whether the current test case can be retracted according to the change information when the test result is not passed;
the rollback module is used for rolling back the object to be tested corresponding to the current test case under the condition that the current test case can be rolled back, and acquiring third parameter information of the object to be tested in the station diagram after rollback;
the determining module is further configured to determine that the rollback is successful when the third parameter information is the same as the first parameter information;
and the second jump module is used for ending the current test case and jumping to the next test case to continue testing under the condition that the third parameter information is different from the first parameter information until all the test cases are tested.
In an optional manner, the second judging module is further configured to judge whether the current test case has completed the test;
and the second jump module is further used for jumping to the next test case to continue testing until all the test cases are tested under the condition that the current test case is finished.
In an optional manner, the determining module is further configured to determine that the test result is passed if the change information matches with preset change information;
the determining module is further configured to determine that the test result is failed when the change information is not matched with the preset change information.
In an alternative, the apparatus further comprises:
and the output module is used for outputting a test result report according to the preset file format.
In an alternative manner, the operation module is further configured to input a first trigger instruction to a first object in the station map according to the operation instruction, so as to determine a control command for controlling a second object in the station map;
controlling the second object according to the operation instruction and the control command;
or alternatively, the first and second heat exchangers may be,
the operation module is further configured to input a third trigger instruction to the second object according to the operation instruction, so as to determine the object to be tested;
and inputting a fourth trigger instruction to the first object according to the operation instruction so as to control the second object according to a control command corresponding to the first object.
According to a third aspect of the present application, there is provided an electronic device comprising: memory, processor and communication bus;
the memory is in communication connection with the processor through the communication bus;
the memory has stored therein computer executable instructions for execution by the processor to implement the method provided in any of the alternatives of the first aspect of the application.
According to a fourth aspect of the present application there is provided a computer readable storage medium storing computer executable instructions which, when executed, are adapted to carry out the method provided in any of the alternatives of the first aspect of the present application.
The application provides a testing method and device of an interlocking system, electronic equipment and a computer readable storage medium, wherein the testing method of the interlocking system comprises the following steps: when a test instruction for testing the interlocking system is received, acquiring an initial configuration file of the interlocking system, wherein the initial configuration file comprises a station diagram of the interlocking system and first parameter information of an object to be tested in the station diagram; generating an operation instruction of an object to be tested in the operation station field diagram according to the current test case coding logic; according to the operation instruction, operating an object to be detected in the station diagram; after the current test case finishes the operation of all corresponding objects to be tested, acquiring second parameter information of the objects to be tested in the station diagram after responding to the operation instruction; and determining a test result according to the change information of the second parameter information relative to the first parameter information. When the interlocking test system is tested, the objects in the station diagram are operated through the coding logic of the test case, and after the test case finishes the operation on all the objects to be tested, the test result of the interlocking system is determined by comparing the change of the second parameter information and the first parameter information of the objects to be tested in the station diagram; thus, the simulation is performed on the black box manually, and the change of the parameter information of the object to be tested in the station diagram is focused; the problem that the manual black box test is difficult to completely imitate in the related technology and the whole test content of the manual test cannot be covered is solved, and the accuracy of the test result and the test efficiency of the interlocking system are improved.
The foregoing description is only an overview of the present application, and is intended to be implemented in accordance with the teachings of the present application in order that the same may be more clearly understood and to make the same and other objects, features and advantages of the present application more readily apparent.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the application. Also, like reference numerals are used to designate like parts throughout the figures.
FIG. 1 is a flow chart of an implementation of a method for testing an interlock system provided by an embodiment of the present application;
FIG. 2 is a flow chart illustrating an implementation of a method for testing an interlock system according to another embodiment of the present application;
FIG. 3 is a schematic diagram of a testing device of an interlock system according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
In the description of embodiments of the present application, the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In the description of the present application, the meaning of "plurality" means at least two, for example, two, three, etc., unless specifically defined otherwise.
In the railway signal system, the man-machine interaction interface of the interlocking subsystem can be a workstation or a maintenance platform, and the state of the current station is displayed on the workstation or the maintenance platform, namely, the state is displayed on the man-machine interaction interface in a station diagram (including equipment such as a track, a signal machine, a turnout, a platform, a shielding door and the like). The main user of the workstation is a field attendant, and the attendant can control equipment in a management range (such as pulling a turnout) through operation on the workstation; the maintenance platform is mainly used for maintenance, and can also display and record the station status. When the interlocking system is tested manually, the correctness of the operation multi-interlocking logic of the operator is simulated to judge.
Fig. 1 is a flowchart of an implementation of a test method of an interlock system according to an embodiment of the present application.
Referring to fig. 1, the method for testing the interlocking system provided by the embodiment of the application can be applied to the functional test of the interlocking system by electronic equipment such as a personal digital computer, a notebook computer, an intelligent mobile terminal and the like, and comprises the following steps:
step 101, when a test instruction for testing the interlocking system is received, an initial configuration file of the interlocking system is obtained.
The initial configuration file comprises a station diagram of the interlocking system and first parameter information of an object to be tested in the station diagram.
Specifically, the initial configuration file of the interlocking system in the embodiment of the present application includes a project configuration file configured according to the actual design of the project, for example, the configuration parameters of a specific project described in a custom configuration file (ConfigFile) are defined or updated, for example, the number of stops, the names of stations, etc. of the project to be tested currently. In some alternatives, the initial configuration file may also be configured to display colors, etc. for objects to be tested and modes of operation in the yard graph. Specifically, in the embodiment of the present application, the configuration of the initial file may be configured according to actual needs according to different specific items to be tested, and in the embodiment of the present application, the specific content of the initial file is not limited.
In some embodiments, the initial profile also includes an interlock logic definition correlation file, for example, to determine under what conditions the status of which signal is, for example, green, yellow, or red; whether the switch position inside the approach should be positioned or reversed, etc. It should be noted that the signal light state or the switch position inside the approach is only used as an exemplary illustration, and is not limited to the specific content of the relevant file of the interlock logic definition.
Specifically, in the embodiment of the present application, the first parameter information includes relevant parameter information of the object to be tested in the station map generated according to different configurations of the station (for example, the number of stations and the number of equipment models) and actual testing environment information (for example, the size or resolution of the man-machine interaction interface to be operated) and the like, for example, position information and color information of the device to be tested in the station map and color information and position information of a button triggering the device to be tested to execute corresponding actions.
Specifically, in the embodiment of the application, when a test instruction for testing the interlocking system is received, the initial configuration file is loaded.
Step 102, generating an operation instruction of the object to be tested in the operation station field diagram according to the current test case coding logic.
Specifically, a Test Case refers to a description of a Test task performed on a specific software product, and represents a Test scheme, a method, a technology and a strategy. The content of the method comprises a test target, a test environment, input data, a test step, an expected result, a test script and the like, and finally a document is formed. More specifically, a test case is a set of test inputs, execution conditions, and expected results tailored for a particular goal to verify whether a particular software requirement is met. In the embodiment of the application, the test case can be used for testing a certain object to be tested (such as a single signal lamp) or a certain group of objects to be tested (such as a route arrangement) in the station diagram.
And step 103, operating the object to be detected in the station diagram according to the operation instruction.
Specifically, in the embodiment of the application, equipment or a control button in a left click station field diagram of a mouse is simulated according to an operation instruction; alternatively, a device in the station diagram is simulated by clicking the right button of the mouse according to the operation instruction, a control button is selected in a pop-up menu, and the like.
Step 104, after the current test case completes the operation of all the corresponding objects to be tested, obtaining the second parameter information of the objects to be tested in the station diagram after the objects to be tested respond to the operation instruction.
In some specific examples, one test case may need to perform a test operation on a plurality of devices to be tested, for example, when testing route arrangement, if a test item adopts a left button operation of a simulation mouse, a route establishment button needs to be clicked first, then a route start button is clicked, finally a route end button is clicked, and the operation on the three devices completes issuing a route establishment command.
Specifically, after the current test case finishes the operation on all the objects to be tested, the second parameter information in the station diagram is obtained after the response operation instruction of the objects to be tested is obtained. Specifically, in the embodiment of the present application, the second parameter information includes position information or color information of the object to be measured in the station map, and the like.
Step 105, determining the test result according to the change information of the second parameter information relative to the first parameter information.
Specifically, in the embodiment of the application, the test result of the object to be tested is determined by comparing the second parameter information and the first parameter information of the object to be tested after the response operation in the station diagram, the test scene of manually performing the black box test is completely simulated, all test contents of the manual test are covered, and the accuracy of the test result and the test efficiency of the interlocking system are improved.
The method for testing the interlocking system provided by the embodiment of the application comprises the following steps: when a test instruction for testing the interlocking system is received, acquiring an initial configuration file of the interlocking system, wherein the initial configuration file comprises a station diagram of the interlocking system and first parameter information of an object to be tested in the station diagram; generating an operation instruction of an object to be tested in the operation station field diagram according to the current test case coding logic; according to the operation instruction, operating an object to be detected in the station diagram; after the current test case finishes the operation of all corresponding objects to be tested, acquiring second parameter information of the objects to be tested in the station diagram after responding to the operation instruction; and determining a test result according to the change information of the second parameter information relative to the first parameter information. When the interlocking test system is tested, the objects in the station diagram are operated through the coding logic of the test case, and after the test case finishes the operation on all the objects to be tested, the test result of the interlocking system is determined by comparing the change of the second parameter information and the first parameter information of the objects to be tested in the station diagram; thus, the simulation is performed on the black box manually, and the change of the parameter information of the object to be tested in the station diagram is focused; the problem that the manual black box test is difficult to completely imitate in the related technology and the whole test content of the manual test cannot be covered is solved, and the accuracy of the test result and the test efficiency of the interlocking system are improved.
Fig. 2 is a flowchart of an implementation of a method for testing an interlock system according to another embodiment of the present application.
Based on the foregoing embodiments, referring to fig. 2, a method for testing an interlock system according to another embodiment of the present application includes the following steps:
step 201, when a test instruction for testing the interlocking system is received, an initial configuration file of the interlocking system is obtained.
The initial configuration file comprises a station diagram of the interlocking system and first parameter information of an object to be tested in the station diagram.
In some specific examples, the initial profile includes defining project configurable parameters in a ConfigFile, such as the number of stops, according to the actual design of the test project: 1, station name XXX and other relevant information; the first parameter information includes position information or display color information of a related object to be tested generated according to an actual design of the project and a current actual testing environment (for example, a display resolution of a man-machine interaction interface of the testing device, etc.).
Step 202, generating an operation instruction of the object to be tested in the operation station field diagram according to the current test case coding logic.
Step 203, according to the operation instruction, the object to be tested in the station diagram is operated.
Specifically, according to an operation instruction, an object to be tested in a station field diagram is operated, including:
and according to the operation instruction, inputting a first trigger instruction to a first object in the station diagram to determine a control command for controlling a second object in the station diagram.
Specifically, in the embodiment of the present application, the first object may be a control button for controlling the second object in the yard graph. The second object may be a device under test in a station diagram, such as a switch. Specifically, in the embodiment of the present application, an operation to be executed by the device to be tested is selected first, that is, a corresponding control button is selected, and then an object to be controlled by the control command is selected. For example, the position of a switch on the inner side of the approach or the position of the switch on the opposite side can be triggered firstly, and then the switch to be controlled is selected.
And controlling the second object according to the operation instruction and the control command.
Or, in some alternative embodiments,
and inputting a third trigger instruction to the second object according to the operation instruction so as to determine the object to be tested.
And inputting a fourth trigger instruction to the first object according to the operation instruction so as to control the second object according to the control command corresponding to the first object.
Specifically, in the embodiment of the present application, an object to be tested may be selected first, for example, which switch needs to be tested, and then a control command for the switch, for example, positioning or inversion, is selected.
Step 204, after the current test case completes the operation of all the corresponding objects to be tested, obtaining the second parameter information of the objects to be tested in the station diagram after the objects to be tested respond to the operation instruction.
In some specific examples, taking a test of route arrangement as an example for explanation, reading a first route A-B, judging equipment to be operated as A, judging the position of the equipment A on a human-computer interaction interface according to first attribute information of an object A to be tested in an initial configuration file in a station diagram, and operating the equipment A; after the operation of the device A is finished, judging that the device B is required to be operated, repeatedly acquiring first parameter information of the device B, judging the position of the device B on a human-computer interaction interface, and operating the device B; after the operation of all the devices of the first route A-B is completed, second parameter information of the device A and the device B in the station diagram is acquired.
Step 205, determining the test result according to the change information of the second parameter information relative to the first parameter information.
Specifically, under the condition that the change information is matched with the preset change information, the test result is determined to pass.
In some specific examples, it is desirable to determine the start signal S1 state and the inner section of the approach T1, T2, T3 state of the approach A-B according to the encoding logic of the use case. Firstly, judging that the equipment is S1, identifying the open state of the annunciator through interface images and position judgment, and comparing and judging with the expected state; judging the equipment to be T1, repeating the relevant steps to judge the correctness of the current state of the equipment; and so on until the state detection of all the devices to be checked is completed.
And under the condition that the change information is not matched with the preset change information, determining that the test result is not passed.
And 206, outputting a test result report according to the preset file format.
Specifically, in the embodiment of the present application, the preset format file includes at least one file format of xls, xlsx, doc, txt. It should be noted that, in the embodiment of the present application, the specific format of the preset format file is merely used as an exemplary illustration, and the specific format of the preset format file is not limited, for example, in some specific examples, the preset format file may also include a file in XML format.
In the embodiment of the application, the test result is output in the preset file format, so that a tester can conveniently check the test result and record.
Step 207, if the test result is passed, it is determined whether the current test case has completed the test.
Specifically, in the embodiment of the present application, by determining whether the execution of the current test case has covered all devices that need to be executed, for example, whether the test of the route arrangement is completed by all-line route testing.
Step 208, if the current test case is completed, jumping to the next test case to continue testing until all test cases complete testing.
In the embodiment of the application, by judging whether the current test case is finished or not and testing the next test case after the execution of the current test case covers all the devices to be executed, all the devices to be tested can be completely covered, missing test of the devices is avoided, and the comprehensiveness and accuracy of the device test are improved.
Step 209, if the test result is not passed, determining whether the current test case can be rolled back according to the change information.
Specifically, in the embodiment of the application, the record that the test result is failed (abnormal) can be judged according to the coding logic of the test case, and the rollback operation is performed on the current test case.
Step 210, under the condition that the current test case can be rolled back, rolling back the object to be tested corresponding to the current test case, and obtaining third parameter information of the rolled-back object to be tested in the station yard graph.
And executing rollback operation on the abnormal route according to the coding logic of the test case, and judging whether third parameter information of the related equipment in the station yard graph after rollback is identical to the first parameter information.
And determining that the rollback is successful in the case that the third parameter information is the same as the first parameter information.
Specifically, after the rollback is successful, in the embodiment of the application, whether the current test case has completed the test is further judged. And under the condition that the current test case is completed, jumping to the next test case to continue testing until all the test cases are tested.
Specifically, under the condition that the third parameter information is different from the first parameter information, ending the current test case, and jumping to the next test case to continue testing until all the test cases complete testing.
Fig. 3 is a schematic structural diagram of a testing device of an interlock system according to an embodiment of the present application.
Based on the foregoing embodiments, referring to fig. 3, a testing device 30 for an interlock system according to an embodiment of the present application includes:
the obtaining module 31 is configured to obtain an initial configuration file of the interlocking system when a test instruction for testing the interlocking system is received, where the initial configuration file includes a station diagram of the interlocking system and first parameter information of an object to be tested in the station diagram;
the generating module 32 is configured to generate an operation instruction of the object to be tested in the operation station field diagram according to the current test case coding logic;
an operation module 33, configured to operate the object to be detected in the station diagram according to the operation instruction;
the obtaining module 31 is further configured to obtain second parameter information of the object to be tested in the station map after the current test case completes the operation of all corresponding objects to be tested;
the determining module 34 is configured to determine a test result according to the change information of the second parameter information relative to the first parameter information.
In some alternatives, the apparatus 30 further comprises:
a first judging module 35, configured to judge whether the current test case has completed the test if the test result is passed;
the first skip module 36 is configured to skip to the next test case to continue testing if the current test case is completed, until all the test cases complete testing.
In some alternatives, the apparatus 30 further comprises:
a second judging module 37, configured to judge whether the current test case is retractable according to the change information if the test result is not passed;
the rollback module 38 is configured to rollback an object to be tested corresponding to the current test case and obtain third parameter information of the rolled-back object to be tested in the station yard graph when the current test case can be rolled back;
the determining module 34 is further configured to determine that the fallback is successful if the third parameter information is the same as the first parameter information;
and the second jump module 39 is configured to end the current test case and jump to the next test case to continue testing if the third parameter information is different from the first parameter information, until all the test cases complete testing.
In some alternatives, the second judging module 37 is further configured to judge whether the current test case has completed the test;
the second jump module 39 is further configured to jump to the next test case to continue testing until all the test cases complete testing, if the current test case has completed.
In some alternatives, the determining module 34 is further configured to determine that the test result is passed if the change information matches the preset change information;
the determining module 34 is further configured to determine that the test result is failed if the change information does not match the preset change information.
In some alternatives, the apparatus 30 further comprises:
and the output module 310 is configured to output a test result report according to a preset file format.
In some alternatives, the operation module 33 is further configured to input a first trigger instruction to a first object in the station diagram according to the operation instruction, so as to determine a control command for controlling a second object in the station diagram;
controlling the second object according to the operation instruction and the control command;
or alternatively, the first and second heat exchangers may be,
the operation module 33 is further configured to input a third trigger instruction to the second object according to the operation instruction, so as to determine the object to be tested;
and inputting a fourth trigger instruction to the first object according to the operation instruction so as to control the second object according to the control command corresponding to the first object.
It should be noted that, the embodiment of the apparatus of the present application has the same or corresponding technical effects as the embodiment of the method of the present application, and the description of the embodiment is omitted.
Fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Based on the foregoing embodiments, referring to fig. 4, an electronic device 40 according to an embodiment of the present application includes: a memory 41, a processor 42 and a communication bus 43;
the memory 41 is communicatively connected to the processor 42 via a communication bus 43;
the memory 41 has stored therein computer executable instructions for execution by a processor to implement the method of testing an interlock system provided in any of the alternative embodiments of the present application.
It should be noted that, the embodiment of the apparatus of the present application has the same or corresponding technical effects as the embodiment of the method of the present application, and the description thereof is omitted in this embodiment.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and for parts of one embodiment that are not described in detail, reference may be made to related descriptions of other embodiments.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, which are not described in detail herein.
The algorithms and displays presented herein are not inherently related to any particular computer, virtual system, or other apparatus. Various general-purpose systems may also be used with the teachings herein. The required structure for a construction of such a system is apparent from the description above. In addition, the present application is not directed to any particular programming language. It will be appreciated that the teachings of the present application described herein may be implemented in a variety of programming languages, and the above description of specific languages is provided for disclosure of enablement and best mode of the present application.
In the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the application may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the application, various features of the application are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be construed as reflecting the intention that: i.e., the claimed application requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this application.
Those skilled in the art will appreciate that the modules in the apparatus of the embodiments may be adaptively changed and disposed in one or more apparatuses different from the embodiments. The modules or units or components of the embodiments may be combined into one module or unit or component and, furthermore, they may be divided into a plurality of sub-modules or sub-units or sub-components. Any combination of all features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or units of any method or apparatus so disclosed, may be used in combination, except insofar as at least some of such features and/or processes or units are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings), may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features but not others included in other embodiments, combinations of features of different embodiments are meant to be within the scope of the application and form different embodiments. For example, in the following claims, any of the claimed embodiments can be used in any combination.
Various component embodiments of the application may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that a microprocessor or Digital Signal Processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components in an interlock system testing method, apparatus and electronic device according to embodiments of the present application. The present application can also be implemented as an apparatus or an apparatus program (e.g., a computer program and a computer program product) for performing a part or all of the methods described herein. Such a program embodying the present application may be stored on a computer readable medium, or may have the form of one or more signals. Such signals may be downloaded from an internet website, provided on a carrier signal, or provided in any other form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the application, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The application may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The use of the words first, second, third, etc. do not denote any order. These words may be interpreted as names.
Claims (9)
1. A method of testing an interlock system, comprising:
when a test instruction for testing an interlocking system is received, acquiring an initial configuration file of the interlocking system, wherein the initial configuration file comprises a station diagram of the interlocking system and first parameter information of an object to be tested in the station diagram, the first parameter information comprises position information and color information of equipment to be tested in the station diagram, and the equipment to be tested is the object to be tested;
generating an operation instruction for operating the object to be tested in the station yard graph according to the current test case coding logic;
operating the object to be detected in the station diagram according to the operation instruction;
after the current test case finishes the operation of all corresponding objects to be tested, obtaining second parameter information of the objects to be tested in the station diagram after responding to the operation instruction, wherein the second parameter information comprises the following steps: judging equipment to be operated, judging the position of the equipment on a human-computer interaction interface according to the first attribute information of the object to be detected in the initial configuration file in the station diagram, operating the equipment, and acquiring second parameter information of the equipment in the station diagram after the operation of all the equipment is completed;
determining a test result according to the change information of the second parameter information relative to the first parameter information;
according to the operation instruction, the operation of the object to be tested in the station diagram includes:
simulating a right mouse button to click the equipment to be tested according to the operation instruction, and selecting a control button in a pop-up menu;
after determining the test result according to the change information of the second parameter information relative to the first parameter information, the method further comprises:
judging whether the current test case can be retracted or not according to the change information under the condition that the test result is not passed; under the condition that the current test case can be retracted, retracting an object to be tested corresponding to the current test case, and acquiring third parameter information of the retracted object to be tested in the station diagram; determining that the rollback is successful under the condition that the third parameter information is the same as the first parameter information; and under the condition that the third parameter information is different from the first parameter information, ending the current test case, and jumping to the next test case to continue testing until all the test cases complete testing.
2. The method according to claim 1, wherein after the determination of the test result from the change information of the second parameter information with respect to the first parameter information, the method further comprises:
judging whether the current test case has completed the test or not under the condition that the test result is passed;
if the current test case is finished, the next test case is skipped to continue testing until all the test cases are finished testing.
3. The method of claim 1, wherein the method further comprises, after determining that rollback is successful if the third parameter information is the same as the first parameter information:
judging whether the current test case has completed the test;
and under the condition that the current test case is completed, jumping to the next test case to continue testing until all the test cases are tested.
4. A method according to any one of claims 1-3, wherein said determining a test result based on the change information of the second parameter information relative to the first parameter information comprises:
under the condition that the change information is matched with preset change information, determining that the test result is passed;
and under the condition that the change information is not matched with the preset change information, determining that the test result is not passed.
5. The method according to claim 1, wherein after the determination of the test result from the change information of the second parameter information with respect to the first parameter information, the method further comprises:
and outputting a test result report according to the preset file format.
6. The method according to claim 1, wherein operating the object to be measured in the station diagram according to the operation instruction includes:
inputting a first trigger instruction to a first object in the station diagram according to the operation instruction so as to determine a control command for controlling a second object in the station diagram;
controlling the second object according to the operation instruction and the control command;
or alternatively, the first and second heat exchangers may be,
according to the operation instruction, a third trigger instruction is input to the second object to determine the object to be detected;
and inputting a fourth trigger instruction to the first object according to the operation instruction so as to control the second object according to a control command corresponding to the first object.
7. A test device for an interlock system, comprising:
the system comprises an acquisition module, a test module and a test module, wherein the acquisition module is used for acquiring an initial configuration file of an interlocking system when receiving a test instruction for testing the interlocking system, the initial configuration file comprises a station diagram of the interlocking system and first parameter information of an object to be tested in the station diagram, the first parameter information comprises position information and color information of equipment to be tested in the station diagram, and the equipment to be tested is the object to be tested;
the generating module is used for generating an operation instruction for operating the object to be tested in the station yard graph according to the current test case coding logic;
the operation module is used for operating the object to be detected in the station diagram according to the operation instruction;
the obtaining module is further configured to obtain, after the current test case completes operation of all corresponding objects to be tested, second parameter information of the objects to be tested in the station map after the objects to be tested respond to the operation instruction, where the second parameter information is specifically used for: judging equipment to be operated, judging the position of the equipment on a human-computer interaction interface according to the first attribute information of the object to be detected in the initial configuration file in the station diagram, operating the equipment, and acquiring second parameter information of the equipment in the station diagram after the operation of all the equipment is completed;
the determining module is used for determining a test result according to the change information of the second parameter information relative to the first parameter information;
the operation module is specifically configured to:
simulating a right mouse button to click the equipment to be tested according to the operation instruction, and selecting a control button in a pop-up menu;
the apparatus further comprises:
the second judging module is used for judging whether the current test case can be retracted according to the change information under the condition that the test result does not pass;
the rollback module is used for rolling back the object to be tested corresponding to the current test case under the condition that the current test case can be rolled back, and acquiring third parameter information of the rolled-back object to be tested in the station yard graph;
the determining module is further configured to determine that the rollback is successful when the third parameter information is the same as the first parameter information;
and the second jump module is used for ending the current test case and jumping to the next test case to continue testing under the condition that the third parameter information is different from the first parameter information until all the test cases are tested.
8. An electronic device, comprising: memory, processor and communication bus;
the memory is in communication connection with the processor through the communication bus;
the memory has stored therein computer executable instructions for executing the processor to implement the method of any of claims 1-6.
9. A computer readable storage medium storing computer executable instructions which, when executed, are adapted to carry out the method of any one of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911335362.5A CN110990297B (en) | 2019-12-23 | 2019-12-23 | Test method and device of interlocking system and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911335362.5A CN110990297B (en) | 2019-12-23 | 2019-12-23 | Test method and device of interlocking system and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110990297A CN110990297A (en) | 2020-04-10 |
CN110990297B true CN110990297B (en) | 2023-10-03 |
Family
ID=70074117
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911335362.5A Active CN110990297B (en) | 2019-12-23 | 2019-12-23 | Test method and device of interlocking system and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110990297B (en) |
Families Citing this family (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113740631B (en) * | 2020-05-29 | 2023-03-28 | 比亚迪股份有限公司 | Interlock test system and method |
CN111723013A (en) * | 2020-06-22 | 2020-09-29 | 卡斯柯信号(北京)有限公司 | Test method and device based on trackside target controller simulation software information linkage |
CN111845866B (en) * | 2020-06-29 | 2022-04-19 | 通号城市轨道交通技术有限公司 | Automatic generation method and device of interlocking configuration file and electronic equipment |
CN111830944B (en) * | 2020-07-28 | 2021-10-19 | 卡斯柯信号(北京)有限公司 | Simulation test method and device |
CN112073579B (en) * | 2020-08-27 | 2022-06-10 | 北京指掌易科技有限公司 | Terminal operation playback processing method and device, terminal equipment and storage medium |
CN112446434A (en) * | 2020-12-07 | 2021-03-05 | 交控科技股份有限公司 | Interlocking equipment detection method and system based on image recognition |
CN112612704A (en) * | 2020-12-25 | 2021-04-06 | 卡斯柯信号有限公司 | Automatic testing method for interlocking software |
CN112590859B (en) * | 2021-03-03 | 2021-06-15 | 卡斯柯信号(北京)有限公司 | Turnout state testing method and device based on user interface |
CN113534013B (en) * | 2021-07-27 | 2024-02-27 | 北京全路通信信号研究设计院集团有限公司 | Method, device and storage medium for predicting switch machine wiring faults |
CN113326211B (en) * | 2021-08-04 | 2022-05-13 | 卡斯柯信号(北京)有限公司 | Test case generation method and device |
CN113835413A (en) * | 2021-09-22 | 2021-12-24 | 交控科技股份有限公司 | Interlocking automation test system, method, device and storage medium |
CN114348074B (en) * | 2022-01-19 | 2024-02-23 | 广州地铁集团有限公司 | Subway signal system regional operation workstation simulation method and computer equipment |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1693273A1 (en) * | 2005-02-22 | 2006-08-23 | Hitachi, Ltd. | Testing apparatus and testing method for an electronic interlocking system |
CN103838675A (en) * | 2014-03-21 | 2014-06-04 | 上海富欣智能交通控制有限公司 | Method for generating test cases for computer interlocking system automatically |
CN103885439A (en) * | 2014-03-21 | 2014-06-25 | 上海富欣智能交通控制有限公司 | Automated testing system for railway signal computer interlocking system |
CN109649447A (en) * | 2018-12-21 | 2019-04-19 | 中国铁道科学研究院集团有限公司通信信号研究所 | A kind of distributed autonomic station autonomous controlling machine data automatic test approach and system |
CN109800156A (en) * | 2018-12-20 | 2019-05-24 | 交控科技股份有限公司 | A kind of subway signal system automation test method based on profile command |
-
2019
- 2019-12-23 CN CN201911335362.5A patent/CN110990297B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1693273A1 (en) * | 2005-02-22 | 2006-08-23 | Hitachi, Ltd. | Testing apparatus and testing method for an electronic interlocking system |
CN103838675A (en) * | 2014-03-21 | 2014-06-04 | 上海富欣智能交通控制有限公司 | Method for generating test cases for computer interlocking system automatically |
CN103885439A (en) * | 2014-03-21 | 2014-06-25 | 上海富欣智能交通控制有限公司 | Automated testing system for railway signal computer interlocking system |
CN109800156A (en) * | 2018-12-20 | 2019-05-24 | 交控科技股份有限公司 | A kind of subway signal system automation test method based on profile command |
CN109649447A (en) * | 2018-12-21 | 2019-04-19 | 中国铁道科学研究院集团有限公司通信信号研究所 | A kind of distributed autonomic station autonomous controlling machine data automatic test approach and system |
Also Published As
Publication number | Publication date |
---|---|
CN110990297A (en) | 2020-04-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110990297B (en) | Test method and device of interlocking system and electronic equipment | |
CN106844217B (en) | Method and device for embedding point of applied control and readable storage medium | |
CN105608258B (en) | A kind of Model-based diagnosis and information flow visual simulation system and method | |
CN104850111B (en) | A kind of hardware-in―the-loop test method and system | |
US10162742B2 (en) | System and method for end to end performance response time measurement based on graphic recognition | |
CN109754663B (en) | Method and device for realizing power transformation operation and maintenance operation full-process simulation training evaluation | |
CN102707712B (en) | Electronic equipment fault diagnosis method and system | |
CN106528429A (en) | UI testing method and device | |
CN103885341B (en) | Performance analysis system based on automotive performance simulator and method | |
CN112590859B (en) | Turnout state testing method and device based on user interface | |
JP2006209354A (en) | Inspection system for vehicle software | |
KR101460860B1 (en) | GUI Test apparatus using test scenario model based on states and the method thereof | |
CN112817855B (en) | System mass measurement method, device and computer storage medium | |
CN105653445B (en) | A kind of implementation method for meeting DO 178C test results | |
EP3608786A1 (en) | Systems and methods of requirements chaining and applications thereof | |
CN116450484A (en) | Evaluation method and device based on model development software, electronic equipment and medium | |
CN107991120B (en) | Automatic ticket checker test method, terminal device and readable storage medium | |
CN114936358A (en) | Human-computer interaction based verification method and verification system | |
JP3214356B2 (en) | Test support equipment | |
CN110928537B (en) | Model evaluation method, device, equipment and computer readable medium | |
CN107449385A (en) | A kind of spacing detection method and device of part position number | |
CN114356769A (en) | Software learning method, device, equipment and storage medium | |
CN111400160B (en) | Code verification method and device and vehicle | |
CN112395201A (en) | ATS test method and device | |
WO2015083178A1 (en) | Tools of advanced model of software engineering and software testing management |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |