CN110704323B - Automatic data testing method and device based on rail transit line data - Google Patents

Automatic data testing method and device based on rail transit line data Download PDF

Info

Publication number
CN110704323B
CN110704323B CN201910943893.6A CN201910943893A CN110704323B CN 110704323 B CN110704323 B CN 110704323B CN 201910943893 A CN201910943893 A CN 201910943893A CN 110704323 B CN110704323 B CN 110704323B
Authority
CN
China
Prior art keywords
test
data
line
rail transit
test case
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
Application number
CN201910943893.6A
Other languages
Chinese (zh)
Other versions
CN110704323A (en
Inventor
刘志翔
刘波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Traffic Control Technology TCT Co Ltd
Original Assignee
Traffic Control Technology TCT Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Traffic Control Technology TCT Co Ltd filed Critical Traffic Control Technology TCT Co Ltd
Priority to CN201910943893.6A priority Critical patent/CN110704323B/en
Publication of CN110704323A publication Critical patent/CN110704323A/en
Application granted granted Critical
Publication of CN110704323B publication Critical patent/CN110704323B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • YGENERAL 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

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)
  • Train Traffic Observation, Control, And Security (AREA)

Abstract

The embodiment of the invention provides a data automation test method and device based on rail transit line data, wherein the method comprises the following steps: calling a pre-established line basic data scene model library, acquiring a test case configuration file according to the line basic data scene model library, and simulating various test scenes in a rail transit line, wherein the line basic data scene model library is pre-established based on rail transit line data, and the test case is pre-set in the test case configuration file; calling interface functions from a pre-established rule base, and testing the correctness of data in various test scenes in the simulated track traffic line based on the rule base after running test cases in test case configuration files in various test scenes in the simulated track traffic line, wherein the rule base is pre-packaged with the interface functions of all operation methods corresponding to different test case configuration files. The data test can be automatically completed, the test operation is simplified, and the test cost is reduced.

Description

Automatic data testing method and device based on rail transit line data
Technical Field
The invention relates to the technical field of rail transit, in particular to a data automation test method and device based on rail transit line data.
Background
In order to improve the safety and the field executability of the track traffic signal system in each engineering project, a data testing stage is added before the integrated testing (interface and code bit testing) and confirmation testing (system function testing) stages of the original engineering indoor testing process, namely, logic rule checking is carried out on the data of the project in the initial stage of engineering testing.
Currently, for data verification of a vehicle-mounted engineering of a CBTC (Communication Based Train Control communication-based train control) system, related data problems are reversely checked by integrating test and confirming defect exposure in the test process.
However, for engineering data with large data volume and relatively short construction period, the related data problems are reversely pushed and checked through defect exposure in the integrated test and confirmation test process, the workload is very large, the stage of finding out the data defects is relatively lagged, and the positioning period of the problems is relatively long. For example, after release of the version of the project data, the engineering room can enter the formal test flow after setting up the indoor test environment according to the project data, and often the problem of data causes excessive blocking of the use cases in the subsequent test stage, so that the round of test is terminated prematurely; the new version release needs to be reorganized and the release flow is executed, so that the test is low in efficiency and high in cost, the correctness of the tested result cannot be guaranteed due to the high error rate of the data, and the engineering data cannot be comprehensively tested possibly due to the limitation of the subsequent stage test.
Disclosure of Invention
Aiming at the problems existing in the prior art, the embodiment of the invention provides a data automation test method and device based on rail transit line data.
The embodiment of the invention provides a data automation test method based on rail transit line data, which comprises the following steps:
invoking a pre-established line basic data scene model library, acquiring a test case configuration file according to the line basic data scene model library, and simulating various test scenes in a rail transit line, wherein the line basic data scene model library is pre-established based on rail transit line data, and the test case is pre-set in the test case configuration file;
calling interface functions from a pre-established rule base, and testing the correctness of data in various test scenes in the simulated track traffic line based on the rule base after the test cases in the test case configuration file are operated in various test scenes in the simulated track traffic line, wherein the interface functions of all operation methods corresponding to different test case configuration files are pre-packaged in the rule base.
Optionally, before invoking the pre-established line base data scene model library, the method further comprises:
acquiring track traffic line data;
and according to the rail transit railway line data, a line basic data scene model library is pre-established, and the line basic data scene model library aims at simulating and constructing all rail transit line data into a complete rail transit project model, wherein the constructed complete rail transit project model comprises all test scenes in the rail transit line required in the test.
Optionally, a method function for acquiring the test case configuration file is provided in the pre-established line basic data scene model library;
correspondingly, the obtaining the test case configuration file according to the line basic data scene model library comprises the following steps:
and acquiring the test case configuration file by utilizing a method function for acquiring the test case configuration file provided in the line basic data scene model library.
Optionally, the rule base includes rules which are preset in the test case configuration file and correspond to the data correctly in various test scenes in the track traffic line corresponding to each test case;
correspondingly, after the interface function is called from the pre-established rule base and the test cases in the test case configuration file are operated in various test scenes in the simulated track traffic line, the correctness of the data in the various test scenes in the simulated track traffic line is tested based on the rule base, and the method comprises the following steps:
for any one test scene in the simulated track traffic line as a current test scene, calling an interface function from a pre-established rule base, running test cases in the test case configuration file in the current test scene, matching the current test scene with a rule corresponding to the data in the current test scene corresponding to the test case in the rule base, if the data in the current test scene are correct, otherwise, the data in the current test scene are incorrect;
if the data in various test scenes in the simulated track traffic line are correct, the test case in the current operation passes the test, otherwise, the test case in the current operation does not pass the test.
Optionally, after calling an interface function from a rule base established in advance and running the test cases in the test case configuration file in various test scenes in the simulated track traffic line, testing the correctness of the data in the various test scenes in the simulated track traffic line based on the rule base, the method further comprises:
and outputting and displaying test results for testing the correctness of the data in various test scenes in the simulated rail transit line.
Optionally, the outputting and displaying the test result for testing the correctness of the data in various test scenes in the simulated rail transit line includes:
and for the test cases which do not pass the test, displaying the reasons of the test case test failure and the positions of incorrect data in the test results.
Optionally, after calling an interface function from a rule base established in advance and running the test cases in the test case configuration file in various test scenes in the simulated track traffic line, testing the correctness of the data in the various test scenes in the simulated track traffic line based on the rule base, the method further comprises:
and automatically recording a test process and a test result for testing the correctness of the data in various test scenes in the simulated track traffic line in a log file, and printing out the log file.
The embodiment of the invention provides a data automation testing device based on rail transit line data, which comprises:
the system comprises an acquisition module, a test case configuration file and a simulation module, wherein the acquisition module is used for calling a pre-established line basic data scene model library, acquiring the test case configuration file and simulating various test scenes in a rail transit line according to the line basic data scene model library, the line basic data scene model library is pre-established based on rail transit line data, and the test case is pre-set in the test case configuration file;
the test module is used for calling interface functions from a rule base established in advance, testing correctness of data in various test scenes in the simulated track traffic line is tested based on the rule base after the test cases in the test case configuration file are operated in various test scenes in the simulated track traffic line, wherein the interface functions of all operation methods corresponding to different test case configuration files are packaged in the rule base in advance.
The embodiment of the invention provides an electronic device, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor realizes the steps of the method when executing the computer program.
According to the data automation test method and device based on the track traffic line data, the test case configuration file is obtained and various test scenes in the track traffic line are simulated by calling the pre-established line basic data scene model library, wherein the line basic data scene model library is pre-established based on the track traffic line data, test cases are pre-set in the test case configuration file, interface functions are called from the pre-established rule library, the test cases in the test case configuration file are operated in various test scenes in the simulated track traffic line, and the correctness of the data in the various test scenes in the simulated track traffic line is tested, and the interface functions of all operation methods corresponding to the different test case configuration files are pre-packaged in the rule library, so that the data test can be automatically completed, the test operation is simplified, and the test cost is reduced.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic flow chart of a data automation test method based on rail transit line data according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a data automation testing device based on rail transit line data according to an embodiment of the present invention;
fig. 3 is a schematic physical structure of an electronic device according to an embodiment of the invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Fig. 1 is a schematic flow chart of a data automation test method based on track traffic line data according to an embodiment of the present invention, as shown in fig. 1, where the data automation test method based on track traffic line data according to the embodiment includes:
s1, calling a pre-established line basic data scene model library, acquiring a test case configuration file according to the line basic data scene model library, and simulating various test scenes in a rail transit line, wherein the line basic data scene model library is pre-established based on rail transit line data, and the test case is pre-set in the test case configuration file.
It should be noted that, the execution subject of the data automation test method based on the rail transit line data in this embodiment is a processor.
It can be appreciated that in a specific application, a line basic data scene model library can be pre-established based on the rail transit railway line data, and the line basic data scene model library is used for simulating and constructing all rail transit line data into a complete rail transit project model, wherein the constructed complete rail transit project model comprises all test scenes in the rail transit line required in the test; and then acquiring a test case configuration file and simulating various test scenes in the rail transit line according to the line basic data scene model library. The step can be understood as that the test case configuration file is obtained (the test case is preset in the test case configuration file), the simulation of the test environment is completed, the test scene restoration of the project data is realized, and the test personnel can more intuitively check the logic connection relation of the data.
It can be understood that the test case configuration file is pre-configured based on a line basic data scene model library sample, the line basic data scene model library sample is established by a rail traffic line data sample, and a test case for testing is pre-set in the test case configuration file.
S2, calling interface functions from a rule base established in advance, and testing correctness of data in various test scenes in the simulated track traffic line based on the rule base after the test cases in the test case configuration file are operated in various test scenes in the simulated track traffic line, wherein the rule base is pre-packaged with the interface functions of all operation methods corresponding to different test case configuration files.
It can be understood that a rule base may be pre-established, in which interface functions of all operation methods corresponding to different test case configuration files are pre-packaged, and the rule base includes rules that correctly correspond to data in various test scenarios in the rail transit lines corresponding to each test case preset in the test case configuration files. In this way, the embodiment can call the interface function from the rule base established in advance, run each test case in the test case configuration file in various test scenes in the simulated track traffic line, and test the correctness of the data in various test scenes in the simulated track traffic line based on the rule base after each test case in the test case configuration file is run in various test scenes in the simulated track traffic line.
According to the data automation test method based on the track traffic line data, the test case configuration file is obtained and various test scenes in the track traffic line are simulated by calling the pre-established line basic data scene model library, wherein the line basic data scene model library is pre-established based on the track traffic line data, test cases are pre-set in the test case configuration file, interface functions are called from the pre-established rule library, test cases in the test case configuration file are operated in various test scenes in the simulated track traffic line, the correctness of data in various test scenes in the simulated track traffic line is tested, and interface functions of all operation methods corresponding to different test case configuration files are pre-packaged in the rule library, so that data test can be automatically completed, test operation is simplified, test staff only need to pay attention to input and output, do not need to write scripts, and also need to participate in test processes and maintenance, and therefore test cost can be reduced.
Further, on the basis of the foregoing embodiment, before the step S1, the method in this embodiment may further include:
acquiring track traffic line data;
and according to the rail transit railway line data, a line basic data scene model library is pre-established, and the line basic data scene model library aims at simulating and constructing all rail transit line data into a complete rail transit project model, wherein the constructed complete rail transit project model comprises all test scenes in the rail transit line required in the test.
Specifically, the track traffic line data can be obtained by reading a file storing all the data of the track traffic line in the CBTC system.
In this way, the embodiment can pre-establish the line basic data scene model library according to the rail transit railway line data.
Further, on the basis of the foregoing embodiment, a method function for acquiring a test case configuration file may be provided in the pre-established line base data scene model library;
accordingly, the "obtaining the test case configuration file according to the line basic data scene model library" in the step S1 may include:
and acquiring the test case configuration file by utilizing a method function for acquiring the test case configuration file provided in the line basic data scene model library.
Thus, the embodiment can obtain the configuration file of the test case.
Further, on the basis of the above embodiment, the rule base includes rules that correspond to data correctly in various test scenarios in the rail transit line corresponding to each test case preset in the test case configuration file;
accordingly, the step S2 may specifically include:
for any one test scene in the simulated track traffic line as a current test scene, calling an interface function from a pre-established rule base, running test cases in the test case configuration file in the current test scene, matching the current test scene with a rule corresponding to the data in the current test scene corresponding to the test case in the rule base, if the data in the current test scene are correct, otherwise, the data in the current test scene are incorrect;
if the data in various test scenes in the simulated track traffic line are correct, the test case in the current operation passes the test, otherwise, the test case in the current operation does not pass the test.
In a specific application, various test scenarios in the simulated rail transit line in the embodiment may include: functional scenes, data scenes, tool scenes, and the like, which are not limited in this embodiment.
In this way, the embodiment can realize that after each test case in the test case configuration file is operated in various test scenes in the simulated track traffic line, the correctness of data in various test scenes in the simulated track traffic line is tested based on the rule base.
Further, on the basis of the foregoing embodiment, after the step S2, the method of this embodiment may further include:
and outputting and displaying test results for testing the correctness of the data in various test scenes in the simulated rail transit line.
In a specific application, for a test case that does not pass the test, the embodiment may display the reason of the test failure of the test case and the location of incorrect data in the test result. Further, the position of incorrect data can be displayed in a line electronic map system of the CBTC system, so that relevant personnel can conveniently and quickly locate the problem position.
It can be understood that the test results for testing the correctness of the data in various test scenes in the simulated track traffic line are output and displayed, so that the test results and subsequent maintenance can be conveniently checked by the testers, and convenience is provided for the testers.
Further, on the basis of the foregoing embodiment, after the step S2, the method of this embodiment may further include:
and automatically recording a test process and a test result for testing the correctness of the data in various test scenes in the simulated track traffic line in a log file, and printing out the log file.
It can be understood that the test process and the test result for testing the correctness of the data in various test scenes in the simulated track traffic line are automatically recorded in the log file, and the log file is printed and output, so that a tester can conveniently inquire the test operation process, and the test data is debugged according to the condition of the test operation process.
The automatic data testing method based on the rail transit line data can automatically complete data testing, simplify testing operation, enable testers to pay attention to input and output, enable the testers to not write scripts or participate in testing process and maintenance, reduce testing cost, enable the testers to conveniently check testing results and follow-up maintenance, and provide convenience for the testers.
Fig. 2 is a schematic structural diagram of a data automation testing device based on track traffic line data according to an embodiment of the present invention, and as shown in fig. 2, the data automation testing device based on track traffic line data according to the embodiment includes: an acquisition module 21 and a test module 22; wherein:
the obtaining module 21 is configured to call a pre-established line basic data scene model library, obtain a test case configuration file according to the line basic data scene model library, and simulate various test scenes in a rail transit line, where the line basic data scene model library is pre-established based on rail transit line data, and the test case configuration file is pre-set with a test case;
the test module 22 is configured to call an interface function from a rule base established in advance, and test the correctness of data in various test scenarios in the simulated track traffic line based on the rule base after running the test cases in the test case configuration file in various test scenarios in the simulated track traffic line, where the rule base is pre-packaged with the interface functions of all operation methods corresponding to different test case configuration files.
Specifically, the obtaining module 21 invokes a pre-established line basic data scene model library, obtains a test case configuration file according to the line basic data scene model library, and simulates various test scenes in a rail transit line, wherein the line basic data scene model library is pre-established based on rail transit line data, and the test case is pre-set in the test case configuration file; the test module 22 calls interface functions from a rule base established in advance, tests correctness of data in various test scenes in the simulated track traffic line based on the rule base after running the test cases in the test case configuration file in various test scenes in the simulated track traffic line, wherein the rule base is pre-packaged with the interface functions of all operation methods corresponding to different test case configuration files.
It should be noted that, the execution subject of the data automation test method based on the rail transit line data in this embodiment is a processor.
It may be appreciated that, in a specific application, the present embodiment may pre-establish a line base data scene model library based on the rail transit railway line data, where the line base data scene model library is intended to simulate all rail transit line data to construct a complete rail transit project model, where the complete rail transit project model constructed includes all test scenes in the rail transit line required in the test; and then acquiring a test case configuration file and simulating various test scenes in the rail transit line according to the line basic data scene model library. The obtaining module 21 obtains the test case configuration file (the test case is preset in the test case configuration file), completes the simulation of the test environment, realizes the test scene restoration of the project data, and can enable the testers to more intuitively check the logical connection relation of the data.
It can be understood that the test case configuration file is pre-configured based on a line basic data scene model library sample, the line basic data scene model library sample is established by a rail traffic line data sample, and a test case for testing is pre-set in the test case configuration file.
It can be understood that, in this embodiment, a rule base may be pre-established, where interface functions of all operation methods corresponding to different test case configuration files are pre-packaged in the rule base, and the rule base includes rules corresponding to data correctly in various test scenarios in the rail transit lines corresponding to each test case preset in the test case configuration file. In this way, the embodiment can call the interface function from the rule base established in advance, run each test case in the test case configuration file in various test scenes in the simulated track traffic line, and test the correctness of the data in various test scenes in the simulated track traffic line based on the rule base after each test case in the test case configuration file is run in various test scenes in the simulated track traffic line.
According to the data automation testing device based on the track traffic line data, the acquisition module is used for calling the pre-established line basic data scene model library to acquire the test case configuration file and simulate various testing scenes in the track traffic line, wherein the line basic data scene model library is pre-established based on the track traffic line data, the test case is pre-set in the test case configuration file, the testing module is used for calling the interface function from the pre-established rule library, running the test case in the test case configuration file in various testing scenes in the simulated track traffic line, testing the correctness of the data in the various testing scenes in the simulated track traffic line, and the rule library is pre-packaged with the interface function of all operation methods corresponding to the different test case configuration files, so that data testing can be automatically completed, testing operation is simplified, testing staff only need to pay attention to input and output, script writing is not needed, and testing process and maintenance are not needed, and testing cost can be reduced.
Further, on the basis of the foregoing embodiment, the apparatus according to this embodiment may further include not shown in the drawings:
the building module is used for obtaining the track traffic line data; and according to the rail transit railway line data, a line basic data scene model library is pre-established, and the line basic data scene model library aims at simulating and constructing all rail transit line data into a complete rail transit project model, wherein the constructed complete rail transit project model comprises all test scenes in the rail transit line required in the test.
Specifically, the building module may obtain the track traffic line data by reading a file storing all the track traffic line data in the CBTC system.
In this way, the embodiment can pre-establish the line basic data scene model library according to the rail transit railway line data.
Further, on the basis of the foregoing embodiment, a method function for acquiring a test case configuration file may be provided in the pre-established line base data scene model library;
accordingly, the "acquire test case configuration file according to the line basic data scene model library" in the acquiring module 21 may include:
and acquiring the test case configuration file by utilizing a method function for acquiring the test case configuration file provided in the line basic data scene model library.
Thus, the embodiment can obtain the configuration file of the test case.
Further, on the basis of the above embodiment, the rule base includes rules that correspond to data correctly in various test scenarios in the rail transit line corresponding to each test case preset in the test case configuration file;
accordingly, the test module 22 may be particularly useful for
For any one test scene in the simulated track traffic line as a current test scene, calling an interface function from a pre-established rule base, running test cases in the test case configuration file in the current test scene, matching the current test scene with a rule corresponding to the data in the current test scene corresponding to the test case in the rule base, if the data in the current test scene are correct, otherwise, the data in the current test scene are incorrect;
if the data in various test scenes in the simulated track traffic line are correct, the test case in the current operation passes the test, otherwise, the test case in the current operation does not pass the test.
In a specific application, various test scenarios in the simulated rail transit line in the embodiment may include: functional scenes, data scenes, tool scenes, and the like, which are not limited in this embodiment.
In this way, the embodiment can realize that after each test case in the test case configuration file is operated in various test scenes in the simulated track traffic line, the correctness of data in various test scenes in the simulated track traffic line is tested based on the rule base.
Further, on the basis of the foregoing embodiment, the apparatus according to this embodiment may further include not shown in the drawings:
and the display module is used for outputting and displaying test results for testing the correctness of the data in various test scenes in the simulated track traffic line.
In a specific application, the display module can display the reason of the test failure of the test case and the position of incorrect data in the test result for the test case which does not pass the test; further, the display module can display the position of incorrect data in a line electronic map system of the CBTC system, so that related personnel can conveniently and quickly locate the problem position.
It can be understood that the test results for testing the correctness of the data in various test scenes in the simulated track traffic line are output and displayed, so that the test results and subsequent maintenance can be conveniently checked by the testers, and convenience is provided for the testers.
Further, on the basis of the foregoing embodiment, the apparatus according to this embodiment may further include not shown in the drawings:
and the printing module is used for automatically recording the test process and the test result for testing the correctness of the data in various test scenes in the simulated track traffic line in the log file and printing out the log file.
It can be understood that the test process and the test result for testing the correctness of the data in various test scenes in the simulated track traffic line are automatically recorded in the log file, and the log file is printed and output, so that a tester can conveniently inquire the test operation process, and the test data is debugged according to the condition of the test operation process.
The automatic data testing device based on the rail transit line data can automatically complete data testing, simplifies testing operation, enables testers to pay attention to input and output, does not need to write scripts and participate in testing process and maintenance, can reduce testing cost, can facilitate testers to check testing results and follow-up maintenance, and provides convenience for testers.
The data automatic testing device based on the rail transit line data provided by the embodiment of the invention can be used for executing the technical scheme of the method embodiment, and the implementation principle and the technical effect are similar and are not repeated here.
Fig. 3 shows a schematic physical structure of an electronic device according to an embodiment of the present invention, and as shown in fig. 3, the electronic device may include a memory 302, a processor 301, a bus 303, and a computer program stored in the memory 302 and capable of running on the processor 301, where the processor 301 and the memory 302 complete communication with each other through the bus 303. The steps of implementing the above method when the processor 301 executes the computer program include, for example: invoking a pre-established line basic data scene model library, acquiring a test case configuration file according to the line basic data scene model library, and simulating various test scenes in a rail transit line, wherein the line basic data scene model library is pre-established based on rail transit line data, and the test case is pre-set in the test case configuration file; calling interface functions from a pre-established rule base, and testing the correctness of data in various test scenes in the simulated track traffic line based on the rule base after the test cases in the test case configuration file are operated in various test scenes in the simulated track traffic line, wherein the interface functions of all operation methods corresponding to different test case configuration files are pre-packaged in the rule base.
An embodiment of the present invention provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the above method, for example, comprising: invoking a pre-established line basic data scene model library, acquiring a test case configuration file according to the line basic data scene model library, and simulating various test scenes in a rail transit line, wherein the line basic data scene model library is pre-established based on rail transit line data, and the test case is pre-set in the test case configuration file; calling interface functions from a pre-established rule base, and testing the correctness of data in various test scenes in the simulated track traffic line based on the rule base after the test cases in the test case configuration file are operated in various test scenes in the simulated track traffic line, wherein the interface functions of all operation methods corresponding to different test case configuration files are pre-packaged in the rule base.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the 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 scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (8)

1. An automated testing method based on rail transit line data is characterized by comprising the following steps:
invoking a pre-established line basic data scene model library, acquiring a test case configuration file according to the line basic data scene model library, and simulating various test scenes in a rail transit line, wherein the line basic data scene model library is pre-established based on rail transit line data, and the test case is pre-set in the test case configuration file;
calling interface functions from a pre-established rule base, and testing the correctness of data in various test scenes in the simulated track traffic line based on the rule base after running the test cases in the test case configuration files in various test scenes in the simulated track traffic line, wherein the rule base is pre-packaged with the interface functions of all operation methods corresponding to different test case configuration files;
before invoking the pre-established line base data scene model library, the method further comprises:
acquiring track traffic line data;
according to the rail transit railway line data, a line basic data scene model library is pre-established, the line basic data scene model library is used for simulating all rail transit line data to construct a complete rail transit project model, and the constructed complete rail transit project model comprises all test scenes in the rail transit line required in the test;
providing a method function for acquiring a test case configuration file in the pre-established line basic data scene model library;
correspondingly, the obtaining the test case configuration file according to the line basic data scene model library comprises the following steps:
and acquiring the test case configuration file by utilizing a method function for acquiring the test case configuration file provided in the line basic data scene model library.
2. The automatic testing method of data based on rail transit line data according to claim 1, wherein the rule base comprises rules which are preset in the test case configuration file and correspond to data correctly in various test scenes in the rail transit line corresponding to each test case;
correspondingly, after the interface function is called from the pre-established rule base and the test cases in the test case configuration file are operated in various test scenes in the simulated track traffic line, the correctness of the data in the various test scenes in the simulated track traffic line is tested based on the rule base, and the method comprises the following steps:
for any one test scene in the simulated track traffic line as a current test scene, calling an interface function from a pre-established rule base, running test cases in the test case configuration file in the current test scene, matching the current test scene with a rule corresponding to the data in the current test scene corresponding to the test case in the rule base, if the data in the current test scene are correct, otherwise, the data in the current test scene are incorrect;
if the data in various test scenes in the simulated track traffic line are correct, the test case in the current operation passes the test, otherwise, the test case in the current operation does not pass the test.
3. The automated test method of data based on rail transit line data of claim 1, wherein after calling an interface function from a pre-established rule base and running the test cases in the test case configuration file in various test scenarios in the simulated rail transit line, the method further comprises, after testing the correctness of the data in the various test scenarios in the simulated rail transit line based on the rule base:
and outputting and displaying test results for testing the correctness of the data in various test scenes in the simulated rail transit line.
4. The automated testing method of data based on rail transit line data according to claim 3, wherein outputting and displaying the test results for testing the correctness of the data in the various test scenarios in the simulated rail transit line comprises:
and for the test cases which do not pass the test, displaying the reasons of the test case test failure and the positions of incorrect data in the test results.
5. The automated test method of data based on rail transit line data of claim 1, wherein after calling an interface function from a pre-established rule base and running the test cases in the test case configuration file in various test scenarios in the simulated rail transit line, the method further comprises, after testing the correctness of the data in the various test scenarios in the simulated rail transit line based on the rule base:
and automatically recording a test process and a test result for testing the correctness of the data in various test scenes in the simulated track traffic line in a log file, and printing out the log file.
6. An automated testing device based on rail transit line data, comprising:
the system comprises an acquisition module, a test case configuration file and a simulation module, wherein the acquisition module is used for calling a pre-established line basic data scene model library, acquiring the test case configuration file and simulating various test scenes in a rail transit line according to the line basic data scene model library, the line basic data scene model library is pre-established based on rail transit line data, and the test case is pre-set in the test case configuration file;
the test module is used for calling interface functions from a rule base established in advance, testing correctness of data in various test scenes in the simulated track traffic line based on the rule base after the test cases in the test case configuration file are operated in various test scenes in the simulated track traffic line, wherein the rule base is pre-packaged with the interface functions of all operation methods corresponding to different test case configuration files;
before invoking the pre-established line base data scene model library, the method further comprises:
acquiring track traffic line data;
according to the rail transit railway line data, a line basic data scene model library is pre-established, the line basic data scene model library is used for simulating all rail transit line data to construct a complete rail transit project model, and the constructed complete rail transit project model comprises all test scenes in the rail transit line required in the test;
providing a method function for acquiring a test case configuration file in the pre-established line basic data scene model library;
correspondingly, the obtaining the test case configuration file according to the line basic data scene model library comprises the following steps:
and acquiring the test case configuration file by utilizing a method function for acquiring the test case configuration file provided in the line basic data scene model library.
7. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any one of claims 1 to 5 when the computer program is executed.
8. A non-transitory computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method according to any one of claims 1 to 5.
CN201910943893.6A 2019-09-30 2019-09-30 Automatic data testing method and device based on rail transit line data Active CN110704323B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910943893.6A CN110704323B (en) 2019-09-30 2019-09-30 Automatic data testing method and device based on rail transit line data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910943893.6A CN110704323B (en) 2019-09-30 2019-09-30 Automatic data testing method and device based on rail transit line data

Publications (2)

Publication Number Publication Date
CN110704323A CN110704323A (en) 2020-01-17
CN110704323B true CN110704323B (en) 2023-05-23

Family

ID=69197671

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910943893.6A Active CN110704323B (en) 2019-09-30 2019-09-30 Automatic data testing method and device based on rail transit line data

Country Status (1)

Country Link
CN (1) CN110704323B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111708345A (en) * 2020-05-14 2020-09-25 北京西南交大盛阳科技股份有限公司 Simulation test system, test method and test device for signal equipment
CN112099472A (en) * 2020-09-03 2020-12-18 通号城市轨道交通技术有限公司 Automatic testing method and device, electronic equipment and storage medium
CN112731910B (en) * 2021-03-31 2021-07-30 卡斯柯信号(北京)有限公司 Simulation test method and device for vehicle-mounted equipment
CN113253708A (en) * 2021-06-07 2021-08-13 卡斯柯信号(北京)有限公司 Method and device for automatically generating simulation tool configuration file for signal system test
CN113706126B (en) * 2021-09-13 2024-04-30 浙江众合科技股份有限公司 Track traffic construction processing method and device based on GIS and BIM

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103678104A (en) * 2012-09-17 2014-03-26 腾讯科技(深圳)有限公司 Data-based automatic testing method and data-based automatic testing device
CN106802862A (en) * 2016-12-14 2017-06-06 中国铁路总公司 Train operation control system security critical software automatically testing platform
CN107807844A (en) * 2017-10-31 2018-03-16 北京新能源汽车股份有限公司 Generation method, device and the computer-readable recording medium of traffic test scene

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8239835B2 (en) * 2007-05-07 2012-08-07 Infosys Limited Automated software testing framework using independent test scripts

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103678104A (en) * 2012-09-17 2014-03-26 腾讯科技(深圳)有限公司 Data-based automatic testing method and data-based automatic testing device
CN106802862A (en) * 2016-12-14 2017-06-06 中国铁路总公司 Train operation control system security critical software automatically testing platform
CN107807844A (en) * 2017-10-31 2018-03-16 北京新能源汽车股份有限公司 Generation method, device and the computer-readable recording medium of traffic test scene

Also Published As

Publication number Publication date
CN110704323A (en) 2020-01-17

Similar Documents

Publication Publication Date Title
CN110704323B (en) Automatic data testing method and device based on rail transit line data
US20210011840A1 (en) Software testing method, system, apparatus, device medium, and computer program product
CN112817872A (en) Development test system and method
CN108802511B (en) Method and system for testing battery management unit
US20190251219A1 (en) Correlating verification scenario coverage with hardware coverage events
CN111679868A (en) Automobile software model integration method, device, equipment and storage medium
CN111382055B (en) Automatic unit testing method and device based on unified description language
CN111198811A (en) Page automatic test method and device, electronic equipment and storage medium
CN113572658A (en) Vehicle control signal testing method and device, electronic equipment and storage medium
US9274933B2 (en) Pretest setup planning
CN112260885A (en) Industrial control protocol automatic test method, system, device and readable storage medium
CN116090380B (en) Automatic method and device for verifying digital integrated circuit, storage medium and terminal
CN109739760B (en) Code debugging test method and device and storage medium
CN108965053B (en) Method, device and system for testing software pressure of upper computer
US10909013B2 (en) TTCN-based test system and method for testing test-cases, non-transitory computer-readable recording medium
CN116257437A (en) ADAS system defect verification method and device based on real vehicle data reinjection
CN113986263A (en) Code automation test method, device, electronic equipment and storage medium
CN108536587A (en) A kind of automated testing method and system based on Appium
Hwang et al. Black-box testing tool of railwaysignalling system software with a focus on user convenience
CN111752823A (en) Method, device and equipment for testing vehicle-mounted power supply application software
RU2817186C1 (en) System for confirming tests and testing embedded software of electronic devices
Hwang et al. Interoperability test methodology for a train control system using interface channels
CN117931647A (en) Automatic test method, device, electronic equipment and storage medium
CN116431470A (en) ATS automatic test method, equipment and medium based on scripting language
Park et al. Static Analysis Deployment Model for Code Quality on R&D Projects of SW Development

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