CN109800156B - Subway signal system automatic test method based on configuration file command - Google Patents
Subway signal system automatic test method based on configuration file command Download PDFInfo
- Publication number
- CN109800156B CN109800156B CN201811563660.5A CN201811563660A CN109800156B CN 109800156 B CN109800156 B CN 109800156B CN 201811563660 A CN201811563660 A CN 201811563660A CN 109800156 B CN109800156 B CN 109800156B
- Authority
- CN
- China
- Prior art keywords
- test
- configuration file
- command
- executable
- execution
- 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
Images
Landscapes
- Debugging And Monitoring (AREA)
Abstract
The embodiment of the invention discloses a subway signal system automatic test method based on a configuration file command, which comprises the following steps: loading a configuration file set, and storing each file in the configuration file set into a memory unit after primary processing; extracting a configuration file set after primary processing in a memory unit, and acquiring execution steps of all test processes, a related command result comparison algorithm and a related command expected result; searching a related command template base according to a test execution process file in the configuration file set after the primary processing, dynamically forming an executable test step by combining the execution step of the test process, a related command result comparison algorithm and a related command expected result, and executing an automatic test. The method and the device have the advantages that accurate output of test commands is achieved, automatic comparison results and accurate positioning of message code bit positions are achieved, the problem of errors caused by artificial observation is solved, non-working time can be effectively utilized, and test tasks are executed without interruption, so that test efficiency is improved.
Description
Technical Field
The embodiment of the invention relates to the technical field of rail transit, in particular to a subway signal system automatic testing method based on a configuration file command.
Background
With the progress of computer technology and the rapid development of the Chinese society, an automatic test system has stronger and stronger requirements in subway signal test. In the traditional subway signal test, a plurality of testers generally manually complete the test task, and frequently execute repetitive commands of putting cars, handling routes, pushing train handles, observing output display, pulling switches, manually releasing routes and the like. These operations are undoubtedly tedious and time-consuming for the testing personnel, and these tests undoubtedly have the serious consequences of incorrect test results due to personal fatigue and the like, as well as inefficient work of the testing task.
However, in the existing automated test system, a test command is often written in a test program, and the automated test is realized by the test command in the test program. Because the test command is written in the test program, different test programs need to be written aiming at different tests, so that the test program cannot be used universally, and the writing workload of the test program is increased.
In the prior art, the following defects exist due to the manual operation of the test and the manual observation of the results on the computer display screen and in the message:
frequently and manually outputting the test command manually, which is easy to cause errors of the output test command and the final test result due to negligence; the result of the artificial observation output, especially the result of the code bit output in the message, is easy to cause the error of observation so as to lead to the error of the final test result; the manual test is carried out, the test task is executed, and the low speed and low efficiency execution of the test task are inevitably caused; in the automatic test process, a test program needs to be continuously written, the workload is large, and the automation degree is low.
In order to relieve the repetitive work manner of the tester and the high-speed and efficient completion of the testing task, the implementation of an automated testing system is an urgent need.
Disclosure of Invention
Because the existing method has the problems, the embodiment of the invention provides an automatic testing method based on a configuration file command.
The embodiment of the invention provides a subway signal system automatic test method based on a configuration file command, which comprises the following steps:
when a test tool is started, loading a configuration file set, carrying out primary processing on each file in the configuration file set, and storing the configuration file set after the primary processing into a memory unit;
extracting the configuration file set after the primary processing in the memory unit, and acquiring the execution steps of all the test processes, a relevant command result comparison algorithm and a relevant command expected result;
searching a related command template base according to the test execution process file in the configuration file set after the primary processing, dynamically forming an executable test step by combining the execution step of the test process, a related command result comparison algorithm and a related command expected result, and executing an automatic test according to the executable test step.
Optionally, before loading the configuration file set when the test tool is started, performing a preliminary processing on each file in the configuration file set, and storing the configuration file set after the preliminary processing in the memory unit, the method further includes:
and forming a configuration file set, wherein the configuration file set comprises a test execution process file, a test execution process algorithm file, an initialization data file and a target configuration file.
Optionally, the searching, according to the test execution process file in the configuration file set after the preliminary processing, of the relevant command template library, dynamically forming an executable test step by combining an execution step of the test process, a relevant command result comparison algorithm, and an expected result of the relevant command, and executing an automated test according to the executable test step specifically includes:
searching a related command template base according to the test execution process file in the configuration file set after the primary processing, dynamically forming an executable test step by combining the execution step of the test process, a related command result comparison algorithm and a related command expected result, re-processing the data in the configuration file set after the primary processing according to the executable test step to obtain all execution command lists of the test process, and executing an automated test according to the execution command lists.
Optionally, after searching the related command template library according to the test execution process file in the configuration file set after the preliminary processing, and dynamically forming an executable test step by combining the execution step of the test process, the related command result comparison algorithm, and the expected result of the related command, and executing an automated test according to the executable test step, the method further includes:
and sending the executable testing step to the equipment to be tested, and receiving a testing result of the equipment to be tested after the testing is executed according to the executable testing step.
Optionally, after sending the executable testing step to the device under test and receiving the testing result of the device under test after executing the testing according to the executable testing step, the method further includes:
and forming a test report according to the received test result.
Optionally, the test execution process algorithm file includes a plurality of communication interface tables, and each communication interface table stores an algorithm logic command.
Optionally, the initialization data file includes electronic map data and test configuration data.
Optionally, the target profile includes interlocking table data.
According to the technical scheme, the configuration file set is subjected to primary processing and then stored in the memory unit, execution steps of all test processes, a relevant command result comparison algorithm and relevant command expected results are conveniently obtained, the executable test steps are dynamically formed, the automatic test is conveniently executed, the test commands are accurately output, the problem of human negligence is eliminated, meanwhile, automatic comparison results and accurate positioning of message code bit positions can be realized, the problem of errors caused by human observation is eliminated, non-working time can be effectively utilized through automatic testing of a subway signal system, and test tasks are executed without interruption, so that the test efficiency is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a schematic flowchart of an automated testing method for a subway signal system based on a configuration file command according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a method for automatically testing a subway signal system based on a configuration file command according to another embodiment of the present invention;
fig. 3 is a schematic flowchart of a method for automatically testing a subway signal system based on a configuration file command according to another embodiment of the present invention.
Detailed Description
The following further describes embodiments of the present invention with reference to the accompanying drawings. The following examples are only for illustrating the technical solutions of the present invention more clearly, and the protection scope of the present invention is not limited thereby.
Fig. 1 shows a schematic flowchart of an automatic testing method for a subway signal system based on a configuration file command according to this embodiment, and includes:
s101, when a test tool is started, loading a configuration file set, carrying out primary processing on each file in the configuration file set, and storing the configuration file set after the primary processing into a memory unit.
The configuration file set consists of a plurality of excel files and is a set of all files used in the test process.
The preliminary processing is to extract data of each excel file to form an original data table, for example, for an automatic test case table, a dictionary with a case name of K value and all script lists as value is formed. The automatic test case table is a table for recording test cases in the automatic test process.
Specifically, before the preliminary processing, the configuration file set is various excel files, and after the preliminary processing, an original data table with a uniform format is formed, so that subsequent query and use are facilitated.
S102, extracting the configuration file set after the primary processing in the memory unit, and acquiring the execution steps of all the test processes, the relative command result comparison algorithm and the relative command expected result.
Specifically, the command generating unit of the test tool extracts the configuration file set which is stored in the memory unit in step S101 after the preliminary processing to form the data dictionary, and obtains detailed information such as all execution steps, related command result comparison algorithms, related command expected results and the like in the test process from the configuration file set according to each data dictionary.
S103, searching a related command template base according to a test execution process file in the configuration file set after the primary processing, dynamically forming an executable test step by combining an execution step of a test process, a related command result comparison algorithm and a related command expected result, and executing an automatic test according to the executable test step.
Specifically, the main process of the test tool searches the related command template library according to the test execution process file data to dynamically form an executable test step. The command template library is a database for storing a plurality of test commands. When searching each test execution process file data and acquiring the corresponding command template, adding the command template into the executable test step, so that after searching each test execution process file data, adding the command template into the executable test step to dynamically form a final executable test step.
After the executable test step is formed, the data is reprocessed (for example, for the upgraded parking script, the upgraded parking script is converted into a command for the tested object, that is, the executable test step is performed before the upgraded parking script is reprocessed, and the reprocessed process is that for the tested object, part of descriptions in the executable test steps are modified and converted into a command for the tested object), and then the automated test is performed. It should be noted that the system mainly forms a command template library, and the execution process is uniformly determined by configuring an excel file. The corresponding algorithm rule in command execution is determined by configuring the excel file according to a specific scene, so that the flexibility of the system and the high reusability of codes are enhanced.
Specifically, when an automatic test is performed based on a configuration file command, a plurality of command templates are packaged, an input, output and result comparison algorithm and a comparison object interface are given, a system is operated, the command, the given input, output and result comparison algorithm and the comparison object are combined in an excel table configuration file mode, an executable algorithm is dynamically generated, and related operation processes of a host and an object host are operated, wherein the detailed processes are shown in figure 2, an excel configuration file set is loaded, a template is generated through the command template set, a command generation unit generates a command and sends the command to a data processing factory for data processing, an executable test command is generated and sent to a command execution unit for executing a plurality of test tasks for executable sequencing, and a test task result file is finally generated.
The format of the final test task result file is determined by the configuration file, so that the return result of the subway signal test task is flexible and various, and meanwhile, the system dynamically generates an executable process, so that the system can cover more functions with fewer codes.
According to the embodiment, the configuration file set is subjected to primary processing and then stored in the memory unit, execution steps of all test processes, a relevant command result comparison algorithm and relevant command expected results are conveniently obtained, an executable test step is dynamically formed, an automatic test is conveniently executed, accurate output of a test command is realized, the problem of human negligence is eliminated, automatic result comparison and accurate positioning of the position of a message code bit can be realized, the problem of errors caused by human observation is eliminated, non-working time can be effectively utilized through the automatic test, and a test task is executed without interruption, so that the test efficiency is improved.
Further, on the basis of the above method embodiment, S103 specifically includes:
searching a related command template base according to the test execution process file in the configuration file set after the primary processing, dynamically forming an executable test step by combining the execution step of the test process, a related command result comparison algorithm and a related command expected result, re-processing the data in the configuration file set after the primary processing according to the executable test step to obtain all execution command lists of the test process, and executing an automated test according to the execution command lists.
All the execution command lists in the test process are obtained after the data are processed again, and subsequent automatic tests are conveniently executed.
Further, on the basis of the above embodiment of the method, after S103, the method further includes:
s104, sending the executable testing step to the equipment to be tested, and receiving a testing result of the equipment to be tested after testing is executed according to the executable testing step.
And S105, forming a test report according to the received test result.
The executable testing step is sent to the equipment to be tested, so that the equipment to be tested can automatically execute the test according to the executable testing step and generate a testing result; and the subsequent check is facilitated through the travel test report.
Further, on the basis of the above embodiment of the method, before S101, the method further includes:
s100, forming the configuration file set according to the test execution process file, the test execution process algorithm file, the initialization data file and the target configuration file.
The test execution process algorithm file comprises a plurality of communication interface tables, and each communication interface table stores an algorithm logic command.
The initialization data file comprises electronic map data and test configuration data.
The target configuration file includes interlocking table data.
Specifically, the automated test method based on the profile command includes the following steps, as shown in fig. 3:
a1, forming an excel configuration file set
The excel configuration file set is a set of all files used in the test process, and comprises the following four files:
the test execution process file is mainly an automatic test case table and mainly stores test cases required to be used in the test execution process;
the test execution process algorithm file is mainly a communication interface table and mainly stores an algorithm logic command;
the initialization data files mainly comprise electronic map data, test configuration data and the like, and mainly store the test configuration data required to be used during initialization test;
other configuration files, mainly CI interlocking table data, mainly store various items of data of CI interlocking tables which need to be configured for testing.
A2, loading excel configuration file
When the test tool is started, the data processing plant loads the configured excel file, completes the primary processing of the data of the configured excel file (the primary processing is to extract the data of each excel file to form an original data table, for example, for an automatic test case table, a dictionary with the case name of K and all the script lists of value is formed), and stores the original data table into the memory unit.
A3, extracting detailed information
The command generating unit of the test tool extracts the data stored in the memory unit (i.e. extracts the formed dictionary), and obtains detailed information such as the execution steps of all test procedures, the relevant command result comparison algorithm, the expected result of the relevant command (where the script parameters and the execution algorithm file have the expected result), and the like.
A4, forming a test command list
And searching a related command template library by the main process of the test tool according to the test execution process file data to dynamically form an executable test step. And the data is processed again (for example, for the upgrading and placing script, the upgrading and placing script is converted into a command for the tested object), and finally, a list of all execution commands in the testing process is obtained.
A5, sending a test command to each tested device, and testing to obtain a test result
And sending the related test command to the related equipment by the command execution unit of the test tool to obtain a result, and returning the result to the main process to obtain a test result.
A6, forming test report
And finally, returning a corresponding test result file according to specific requirements to form a test report.
For example: the test case named "ITC _ CM-runs each route" is executed in the following general process: the automatic test tool loads a configuration file set formed by excel files in all test processes, extracts data in the excel files to form an original data table with a uniform format, generates a test step sequence script through a test execution process in an automatic test case, receives a tested object state and sends a test command through an udp protocol to execute the test process, and finally generates a test result report.
Wherein the success sign for transacting an access is front signal development (i.e. green light or yellow light), the automated testing tool finds a corresponding algorithm logic command ({ [ & ] [0x40] } { [ > ] [6] } { [0x00] }) ({ [ & ] [0x07] } { [0x02] } according to the annunciator line in the rcvffromws _ IO page in the auto-finding communication interface table, and then processes the original data according to the configured logic command and obtains a final result.
Compared with the existing testing method, the automatic testing method provided by the embodiment greatly reduces the man-made repetitive work: most subway test tasks are generated into different test process executable programs through the configurable files and the system, and the programs are automatically executed by a computer, so that the high-speed and high-efficiency completion of the test process is realized; meanwhile, the generated result can be configured, and the diversity of the test return file is realized.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
It should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.
Claims (8)
1. A subway signal system automatic test method based on a configuration file command is characterized by comprising the following steps:
when a test tool is started, loading a configuration file set, carrying out primary processing on each file in the configuration file set, and storing the configuration file set after the primary processing into a memory unit, wherein the configuration file set consists of a plurality of excel files, before the primary processing, the configuration file set is various different excel files, and after the primary processing, an original data table with a uniform format is formed;
extracting the configuration file set after the primary processing in the memory unit, and acquiring the execution steps of all the test processes, a relevant command result comparison algorithm and a relevant command expected result;
searching a related command template base according to the test execution process file in the configuration file set after the primary processing, dynamically forming an executable test step by combining the execution step of the test process, a related command result comparison algorithm and a related command expected result, and executing an automatic test according to the executable test step.
2. The method of claim 1, wherein before loading a configuration file set when the test tool is started, performing a rough machining process on each file in the configuration file set, and storing the configuration file set after the rough machining process in the memory unit, the method further comprises:
and forming a configuration file set, wherein the configuration file set comprises a test execution process file, a test execution process algorithm file, an initialization data file and a target configuration file.
3. The method according to claim 1, wherein the searching of the relevant command template library according to the test execution process file in the configuration file set after the preliminary processing, the dynamic formation of the executable test step by combining the execution step of the test process, the relevant command result comparison algorithm and the expected result of the relevant command, and the execution of the automated test according to the executable test step specifically comprise:
searching a related command template base according to the test execution process file in the configuration file set after the primary processing, dynamically forming an executable test step by combining the execution step of the test process, a related command result comparison algorithm and a related command expected result, re-processing the data in the configuration file set after the primary processing according to the executable test step to obtain all execution command lists of the test process, and executing an automated test according to the execution command lists.
4. The method of claim 1, wherein after searching the related command template library according to the test execution process file in the set of configuration files after the preliminary processing, dynamically forming an executable test step by combining the execution step of the test process, the related command result comparison algorithm and the expected result of the related command, and executing the automated test according to the executable test step, further comprising:
and sending the executable testing step to the equipment to be tested, and receiving a testing result of the equipment to be tested after the testing is executed according to the executable testing step.
5. The method according to claim 4, wherein after sending the executable testing step to the device under test and receiving the testing result of the device under test after executing the testing according to the executable testing step, the method further comprises:
and forming a test report according to the received test result.
6. The method according to claim 2, wherein the test execution process algorithm file includes a plurality of communication interface tables, and each communication interface table stores an algorithm logic command.
7. The method of claim 2, wherein the initialization data file includes electronic map data and test configuration data.
8. The method of claim 2, wherein the target profile comprises interlocking table data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811563660.5A CN109800156B (en) | 2018-12-20 | 2018-12-20 | Subway signal system automatic test method based on configuration file command |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811563660.5A CN109800156B (en) | 2018-12-20 | 2018-12-20 | Subway signal system automatic test method based on configuration file command |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109800156A CN109800156A (en) | 2019-05-24 |
CN109800156B true CN109800156B (en) | 2022-05-06 |
Family
ID=66557347
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811563660.5A Active CN109800156B (en) | 2018-12-20 | 2018-12-20 | Subway signal system automatic test method based on configuration file command |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109800156B (en) |
Families Citing this family (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110704318B (en) * | 2019-09-27 | 2022-10-25 | 武汉中海庭数据技术有限公司 | Map data automatic testing method, terminal device and storage medium |
CN110990297B (en) * | 2019-12-23 | 2023-10-03 | 卡斯柯信号(北京)有限公司 | Test method and device of interlocking system and electronic equipment |
CN111078572B (en) * | 2019-12-23 | 2023-08-11 | 北京同有飞骥科技股份有限公司 | Automatic interaction testing method and system |
CN111845866B (en) * | 2020-06-29 | 2022-04-19 | 通号城市轨道交通技术有限公司 | Automatic generation method and device of interlocking configuration file and electronic equipment |
CN111984528A (en) * | 2020-07-21 | 2020-11-24 | 北京北方华创微电子装备有限公司 | Test method and device for machine equipment |
CN112130718B (en) * | 2020-08-21 | 2022-03-25 | 中国人民解放军32802部队 | Equipment function detection method |
CN111935307B (en) * | 2020-09-16 | 2021-01-05 | 湖南新云网科技有限公司 | Remote control method and device for hardware equipment, storage medium and transparent computing system |
CN112559372B (en) * | 2020-12-24 | 2024-05-14 | 南方电网数字平台科技(广东)有限公司 | Method, system and storage medium for generating interface test case |
CN115599699B (en) * | 2022-11-30 | 2023-03-21 | 合肥康芯威存储技术有限公司 | BIT automatic testing method based on Jenkins |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104239202A (en) * | 2013-06-09 | 2014-12-24 | 刘伟 | Non-Root testing method and system of interactive intelligent equipment |
CN105373469A (en) * | 2014-08-25 | 2016-03-02 | 广东金赋信息科技有限公司 | Interface based software automation test method |
CN105701014A (en) * | 2016-01-11 | 2016-06-22 | 上海富欣智能交通控制有限公司 | Automatic testing method for railway signal computer interlocking system |
CN107729243A (en) * | 2017-10-12 | 2018-02-23 | 上海携程金融信息服务有限公司 | API automated testing method, system, equipment and storage medium |
CN108763083A (en) * | 2018-05-30 | 2018-11-06 | 平安普惠企业管理有限公司 | Automated testing method, device, computer equipment and storage medium |
-
2018
- 2018-12-20 CN CN201811563660.5A patent/CN109800156B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104239202A (en) * | 2013-06-09 | 2014-12-24 | 刘伟 | Non-Root testing method and system of interactive intelligent equipment |
CN105373469A (en) * | 2014-08-25 | 2016-03-02 | 广东金赋信息科技有限公司 | Interface based software automation test method |
CN105701014A (en) * | 2016-01-11 | 2016-06-22 | 上海富欣智能交通控制有限公司 | Automatic testing method for railway signal computer interlocking system |
CN107729243A (en) * | 2017-10-12 | 2018-02-23 | 上海携程金融信息服务有限公司 | API automated testing method, system, equipment and storage medium |
CN108763083A (en) * | 2018-05-30 | 2018-11-06 | 平安普惠企业管理有限公司 | Automated testing method, device, computer equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN109800156A (en) | 2019-05-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109800156B (en) | Subway signal system automatic test method based on configuration file command | |
CN108897724B (en) | Function completion progress determining method and device | |
EP2960799A1 (en) | Defect localization in software integration tests | |
WO2007001108A1 (en) | System for providing feature-oriented software product line engineering environment | |
US11544176B1 (en) | Systems and methods for automatically assessing and conforming software development modules to accessibility guidelines in real-time | |
CN105930257A (en) | Method and apparatus for determining target test cases | |
CN113360144B (en) | Auxiliary processing method, device, storage medium and program product for software development | |
CN109614325B (en) | Method and device for determining control attribute, electronic equipment and storage medium | |
CN116431522A (en) | Automatic test method and system for low-code object storage gateway | |
US20190278568A1 (en) | Recording medium recording generation program, information processing apparatus, and generation method | |
CN115033434A (en) | Kernel performance theoretical value calculation method and device and storage medium | |
CN110704252A (en) | Automatic testing device and testing method based on cloud dynamic management | |
CN113791594A (en) | Configuration establishing method, system, equipment and medium of distributed control system | |
CN113902531A (en) | Automatic generation system, method, electronic device and storage medium for bid document | |
CN113743074A (en) | Data report generation method and device based on robot process automation | |
CN114125342A (en) | Emergency operation recording method and device | |
CN110633204B (en) | Program defect detection method and device | |
JP6984120B2 (en) | Load compare device, load compare program and load compare method | |
EP2573694A1 (en) | Conversion method and system | |
CN112540928A (en) | Test case layout method and device based on to-be-tested line intersection information | |
CN111881128B (en) | Big data regression verification method and big data regression verification device | |
CN113065740B (en) | High-efficiency product packaging management and control system, method and medium | |
CN110843869B (en) | Automatic analysis method for station yard graph display configuration | |
CN116149258B (en) | Numerical control machine tool code generation method based on multi-mode information and related equipment | |
CN110688542B (en) | Infrastructure searching method and device |
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 |