CN110704323A - Data automatic testing method and device based on rail transit line data - Google Patents

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

Info

Publication number
CN110704323A
CN110704323A CN201910943893.6A CN201910943893A CN110704323A CN 110704323 A CN110704323 A CN 110704323A CN 201910943893 A CN201910943893 A CN 201910943893A CN 110704323 A CN110704323 A CN 110704323A
Authority
CN
China
Prior art keywords
test
data
rail transit
line
transit line
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.)
Granted
Application number
CN201910943893.6A
Other languages
Chinese (zh)
Other versions
CN110704323B (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 automatic testing method and a 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 and simulating various test scenes in the rail transit line according to the line basic data scene model library, wherein the line basic data scene model library is pre-established based on the rail transit line data, and test cases are preset 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 rail transit line based on the rule base after running test cases in the test case configuration files in various test scenes in the simulated rail transit line, wherein the rule base is packaged with the interface functions of all operation methods corresponding to different test case configuration files in advance. The data test can be automatically completed, the test operation is simplified, and the test cost is reduced.

Description

Data automatic 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 automatic testing method and device based on rail transit line data.
Background
In order to improve the safety and field performability of the rail transit signal system in each engineering project, a data test stage is added before an integration test (interface and code bit test) and a confirmation test (system function test) stage of an original engineering indoor test flow, namely, logic rule check is carried out on the data of the project at the initial stage of the engineering test.
At present, data verification for CBTC (Communication Based Train Control) system vehicle-mounted engineering is to reversely inquire related data problems through integration test and defect exposure in the process of confirmation test.
However, for engineering data with large data volume and short construction period, the defect exposure in the test process is confirmed through integrated test, and the related data problems are reversely inquired, so that the workload is very large, the stage of finding the data defects is delayed, and the positioning period of the problems is long. For example, after the version of the project data is released, the formal test process can be entered only after the indoor test environment is built according to the project data in the engineering room, and often, due to data problems, too many cases are blocked in the subsequent test stage, and the current test is ended too early; the new version release needs to be reorganized, and the release process is executed, so that the test efficiency is low, the cost is high, the correctness of the tested result cannot be ensured due to the high error rate of the data, and the engineering data cannot be comprehensively tested due to the limitation of the test at the subsequent stage.
Disclosure of Invention
Aiming at the problems in the prior art, the embodiment of the invention provides a data automatic testing method and device based on rail transit line data.
The embodiment of the invention provides a data automatic testing method based on rail transit line data, which comprises the following steps:
calling a pre-established line basic data scene model library, acquiring a test case configuration file and simulating various test scenes in a rail transit line according to the line basic data scene model library, wherein the line basic data scene model library is pre-established based on rail transit line data, and test cases are 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 rail transit line based on the rule base after the test cases in the test case configuration files are operated in various test scenes in the simulated rail transit line, wherein the rule base is packaged with the interface functions of all operation methods corresponding to different test case configuration files in advance.
Optionally, before invoking the pre-established line basic data scene model library, the method further includes:
acquiring rail transit line data;
and according to the rail transit railway line data, a line basic data scene model base is pre-established, wherein the line basic data scene model base aims to simulate 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 lines required in the test.
Optionally, a method function for obtaining a test case configuration file is provided in the pre-established line basic data scene model library;
correspondingly, the obtaining of the test case configuration file according to the line basic data scene model library includes:
and acquiring the test case configuration file by using the method function for acquiring the test case configuration file provided in the line basic data scene model library.
Optionally, the rule base includes rules for correctly corresponding data in various test scenes in the rail transit line corresponding to each preset test case in the test case configuration file;
correspondingly, the step of calling an interface function from a pre-established rule base, and after the test cases in the test case configuration file are operated in various test scenes in the simulated rail transit line, testing the correctness of data in various test scenes in the simulated rail transit line based on the rule base comprises the following steps:
taking any one test scene in the simulated rail transit lines as a current test scene, calling an interface function from a pre-established rule base, operating a test case in the test case configuration file in the current test scene, matching the current test scene with a rule corresponding to correct data in the current test scene corresponding to the test case which is operated at the present time in the rule base, if the current test scene is matched with the rule corresponding to correct data in the current test scene, judging that the data in the current test scene is correct, and if the current test scene is not matched with the rule, judging that the data in the current test scene is incorrect;
if the data in various test scenes in the simulated rail transit line are correct, the test case running this time passes the test, otherwise, the test case running this time does not pass the test.
Optionally, after invoking an interface function from a pre-established rule base, running a test case in the test case configuration file in various test scenes in the simulated rail transit line, and testing the correctness of data in various test scenes in the simulated rail transit line based on the rule base, the method further includes:
and outputting and displaying the test result of the correctness of the data in various test scenes in the rail transit line simulated by the test.
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 reason of the test failure of the test cases and the position of the incorrect data in the test result.
Optionally, after invoking an interface function from a pre-established rule base, running a test case in the test case configuration file in various test scenes in the simulated rail transit line, and testing the correctness of data in various test scenes in the simulated rail transit line based on the rule base, the method further includes:
and automatically recording the test process and the test result for testing the correctness of the data in various test scenes in the simulated rail transit line in a log file, and printing and outputting the log file.
The embodiment of the invention provides a data automatic testing device based on rail transit line data, which comprises:
the system comprises an acquisition module, a data processing module and a data processing module, wherein the acquisition module is used for calling a pre-established line basic data scene model library, acquiring a 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 test cases are preset in the test case configuration file;
the test module is used for calling interface functions from a pre-established rule base, testing the correctness of data in various test scenes in the simulated rail transit line based on the rule base after the test cases in the test case configuration files are operated in various test scenes in the simulated rail transit line, wherein the rule base is packaged with the interface functions of all operation methods corresponding to different test case configuration files in advance.
An embodiment of the present invention provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the steps of the method are implemented.
The method and the device for automatically testing data based on track traffic line data, provided by the embodiment of the invention, acquire a test case configuration file and simulate various test scenes in a track traffic line by calling a 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 preset in the test case configuration file, interface functions are called from a 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, the correctness of data in various test scenes in the simulated track traffic line is tested, and the rule library is pre-packaged with the interface functions of all operation methods corresponding to different test case configuration files, 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 in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
Fig. 1 is a schematic flow chart of a data automation testing method based on rail transit line data according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of an automatic data testing apparatus based on rail transit line data according to an embodiment of the present invention;
fig. 3 is a schematic physical structure diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a schematic flowchart illustrating a method for automatically testing data based on track transportation line data according to an embodiment of the present invention, and as shown in fig. 1, the method for automatically testing data based on track transportation line data according to the embodiment includes:
s1, calling a pre-established line basic data scene model library, 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, wherein the line basic data scene model library is pre-established based on the rail transit line data, and the test case configuration file is preset with a test case.
It should be noted that, the executing body of the data automation test method based on the rail transit line data in this embodiment is a processor.
It can be understood that, in a specific application, a line basic data scene model base can be pre-established based on rail transit railway line data, the line basic data scene model base aims to simulate and construct all rail transit line data into a complete rail transit project model, and the constructed complete rail transit project model comprises all test scenes in the rail transit lines required in a test; and then acquiring a test case configuration file according to the line basic data scene model library and simulating various test scenes in the rail transit line. 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 reduction of the project data is realized, and testers can more visually check the logical connection relation of the data.
It can be understood that the test case configuration file is formed by pre-configuring on the basis of a line basic data scene model library sample, the line basic data scene model library sample is established by a rail transit line data sample, and a test case for testing is pre-set in the test case configuration file.
S2, calling interface functions from a pre-established rule base, and testing the correctness of data in various test scenes in the simulated rail transit line based on the rule base after the test cases in the test case configuration files are operated in various test scenes in the simulated rail transit line, wherein the rule base is packaged with the interface functions of all operation methods corresponding to different test case configuration files in advance.
It can be understood that a rule base may be pre-established, 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 for correctly corresponding data in various test scenes in the rail transit lines corresponding to the test cases preset in the test case configuration files. In this way, the present embodiment may call an interface function from a pre-established rule base, run each test case in the test case configuration file in various test scenarios in the simulated rail transit line, and test the correctness of data in various test scenarios in the simulated rail transit line based on the rule base after running each test case in the test case configuration file in various test scenarios in the simulated rail transit line.
The method for automatically testing data based on data of a rail transit line provided by this embodiment obtains a test case configuration file and simulates various test scenarios in the rail transit line by calling a pre-established line basic data scenario model library, wherein the line basic data scenario model library is pre-established based on data of the rail transit line, a test case is pre-set in the test case configuration file, an interface function is called from a pre-established rule library, the test case in the test case configuration file is run in various test scenarios in the simulated rail transit line, and the correctness of data in various test scenarios in the simulated rail transit line is tested, wherein the rule library is pre-packaged with interface functions corresponding to all operation methods of different test case configuration files, thereby automatically completing data testing, the test operation is simplified, and the test personnel only need to pay attention to input and output without writing scripts or participating in the test process and maintenance, so that the test cost can be reduced.
Further, on the basis of the foregoing embodiment, before the step S1, the method according to this embodiment may further include:
acquiring rail transit line data;
and according to the rail transit railway line data, a line basic data scene model base is pre-established, wherein the line basic data scene model base aims to simulate 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 lines required in the test.
Specifically, the track traffic line data can be obtained by reading a file in which all data of the track traffic line are stored in the CBTC system.
Therefore, the method and the device can establish the line basic data scene model base in advance according to the rail transit railway line data.
Further, on the basis of the above embodiment, a method function for obtaining a test case configuration file may be provided in the pre-established line basic data scene model library;
accordingly, the step S1 of "obtaining a test case configuration file according to the line basic data scene model library" may include:
and acquiring the test case configuration file by using the method function for acquiring the test case configuration file provided in the line basic data scene model library.
Thus, the embodiment can realize the acquisition of the test case configuration file.
Further, on the basis of the above embodiment, the rule base includes rules for correctly corresponding data in various test scenes in the rail transit lines corresponding to the test cases preset in the test case configuration file;
correspondingly, the step S2 may specifically include:
taking any one test scene in the simulated rail transit lines as a current test scene, calling an interface function from a pre-established rule base, operating a test case in the test case configuration file in the current test scene, matching the current test scene with a rule corresponding to correct data in the current test scene corresponding to the test case which is operated at the present time in the rule base, if the current test scene is matched with the rule corresponding to correct data in the current test scene, judging that the data in the current test scene is correct, and if the current test scene is not matched with the rule, judging that the data in the current test scene is incorrect;
if the data in various test scenes in the simulated rail transit line are correct, the test case running this time passes the test, otherwise, the test case running this time does not pass the test.
In a specific application, various test scenarios in the rail transit line simulated in this embodiment may include: function scenarios, data scenarios, tool scenarios, etc., which are not limited in this embodiment.
In this way, the method and the device can test the correctness of data in various test scenes in the simulated rail transit line based on the rule base after various test cases in the test case configuration file are operated in various test scenes in the simulated rail transit line.
Further, on the basis of the foregoing embodiment, after the step S2, the method according to this embodiment may further include:
and outputting and displaying the test result of the correctness of the data in various test scenes in the rail transit line simulated by the test.
In a specific application, for a test case that does not pass a test, the embodiment may display, in a test result, a reason why the test case fails in the test and a location of incorrect data. Further, the position of incorrect data can be displayed in a line electronic map system of the CBTC system, and related personnel can conveniently and quickly locate the problem position.
It can be understood that the test results of the correctness of the data in various test scenes in the rail transit line simulated by the test are output and displayed, so that the test results and the subsequent maintenance can be conveniently checked by the tester, and convenience is provided for the tester.
Further, on the basis of the foregoing embodiment, after the step S2, the method according to this embodiment may further include:
and automatically recording the test process and the test result for testing the correctness of the data in various test scenes in the simulated rail transit line in a log file, and printing and outputting 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 rail transit line are automatically recorded in the log file, and the log file is printed and output, so that the test personnel can conveniently inquire the test operation process, and can subsequently debug the test data according to the test operation process condition, and the like.
The automatic data testing method based on the rail transit line data can automatically complete data testing, simplifies testing operation, and enables a tester to pay attention to input and output without writing scripts or participating in testing and maintenance, so that testing cost can be reduced, the tester can conveniently check testing results and follow-up maintenance, and convenience is provided for the tester.
Fig. 2 is a schematic structural diagram of a data automatic testing device based on rail transit line data according to an embodiment of the present invention, and as shown in fig. 2, the data automatic testing device based on rail transit 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 a test case is pre-set in the test case configuration file;
the test module 22 is configured to call an interface function from a pre-established rule base, and test correctness of data in various test scenarios in the simulated rail transit line based on the rule base after the test cases in the test case configuration file are run in various test scenarios in the simulated rail transit line, where the rule base is pre-packaged with interface functions corresponding to all operation methods of different test case configuration files.
Specifically, the obtaining module 21 calls 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 test cases are pre-set in the test case configuration file; the test module 22 calls interface functions from a pre-established rule base, and after the test cases in the test case configuration files are operated in various test scenes in the simulated rail transit line, the correctness of data in various test scenes in the simulated rail transit line is tested based on the rule base, wherein the rule base is pre-packaged with the interface functions corresponding to all operation methods of different test case configuration files.
It should be noted that, the executing body of the data automation test method based on the rail transit line data in this embodiment is a processor.
It can be understood that, in a specific application, the present embodiment may pre-establish a line basic data scene model base based on rail transit railway line data, where the line basic data scene model base is intended to simulate all rail transit line data to construct a complete rail transit project model, and the constructed complete rail transit project model includes all test scenes in rail transit lines required in a test; and then acquiring a test case configuration file according to the line basic data scene model library and simulating various test scenes in the rail transit line. The obtaining module 21 obtains a test case configuration file (in which a test case is preset), completes simulation of a test environment, realizes test scene restoration of project data, and enables testers to view logical connection relations of the data more intuitively.
It can be understood that the test case configuration file is formed by pre-configuring on the basis of a line basic data scene model library sample, the line basic data scene model library sample is established by a rail transit 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, 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 for correctly corresponding to data in various test scenes in a track traffic line corresponding to each test case preset in the test case configuration files. In this way, the present embodiment may call an interface function from a pre-established rule base, run each test case in the test case configuration file in various test scenarios in the simulated rail transit line, and test the correctness of data in various test scenarios in the simulated rail transit line based on the rule base after running each test case in the test case configuration file in various test scenarios in the simulated rail transit line.
The data automation test device based on the rail transit line data provided by this embodiment calls a pre-established line basic data scene model library through an obtaining module, obtains a test case configuration file and simulates various test scenes in the rail transit line, wherein the line basic data scene model library is pre-established based on the rail transit line data, test cases are pre-set in the test case configuration file, the test module calls interface functions from a pre-established rule library, runs the test cases in the test case configuration file in various test scenes in the simulated rail transit line, tests correctness of data in various test scenes in the simulated rail transit line, wherein the rule library is pre-packaged with the interface functions of all operation methods corresponding to different test case configuration files, thereby automatically completing data test, the test operation is simplified, and the test personnel only need to pay attention to input and output without writing scripts or participating in the test process and maintenance, so that the test cost can be reduced.
Further, on the basis of the above embodiment, the apparatus of this embodiment may further include:
the system comprises an establishing module, a data processing module and a data processing module, wherein the establishing module is used for acquiring rail transit line data; and according to the rail transit railway line data, a line basic data scene model base is pre-established, wherein the line basic data scene model base aims to simulate 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 lines required in the test.
Specifically, the establishing module may obtain the data of the rail transit line by reading a file in which all data of the rail transit line are stored in the CBTC system.
Therefore, the method and the device can establish the line basic data scene model base in advance according to the rail transit railway line data.
Further, on the basis of the above embodiment, a method function for obtaining a test case configuration file may be provided in the pre-established line basic data scene model library;
accordingly, the obtaining module 21 "obtaining the test case configuration file according to the line basic data scene model library" may include:
and acquiring the test case configuration file by using the method function for acquiring the test case configuration file provided in the line basic data scene model library.
Thus, the embodiment can realize the acquisition of the test case configuration file.
Further, on the basis of the above embodiment, the rule base includes rules for correctly corresponding data in various test scenes in the rail transit lines corresponding to the test cases preset in the test case configuration file;
accordingly, the test module 22 may be particularly useful for
Taking any one test scene in the simulated rail transit lines as a current test scene, calling an interface function from a pre-established rule base, operating a test case in the test case configuration file in the current test scene, matching the current test scene with a rule corresponding to correct data in the current test scene corresponding to the test case which is operated at the present time in the rule base, if the current test scene is matched with the rule corresponding to correct data in the current test scene, judging that the data in the current test scene is correct, and if the current test scene is not matched with the rule, judging that the data in the current test scene is incorrect;
if the data in various test scenes in the simulated rail transit line are correct, the test case running this time passes the test, otherwise, the test case running this time does not pass the test.
In a specific application, various test scenarios in the rail transit line simulated in this embodiment may include: function scenarios, data scenarios, tool scenarios, etc., which are not limited in this embodiment.
In this way, the method and the device can test the correctness of data in various test scenes in the simulated rail transit line based on the rule base after various test cases in the test case configuration file are operated in various test scenes in the simulated rail transit line.
Further, on the basis of the above embodiment, the apparatus of this embodiment may further include:
and the display module is used for outputting and displaying the test results of the correctness of the data in various test scenes in the rail transit line simulated by the test.
In specific application, the display module can display the reason of test failure and the position of incorrect data of the test case in a 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 quickly locate the problem position.
It can be understood that the test results of the correctness of the data in various test scenes in the rail transit line simulated by the test are output and displayed, so that the test results and the subsequent maintenance can be conveniently checked by the tester, and convenience is provided for the tester.
Further, on the basis of the above embodiment, the apparatus of this embodiment may further include:
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 rail transit line into a log file and printing and outputting 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 rail transit line are automatically recorded in the log file, and the log file is printed and output, so that the test personnel can conveniently inquire the test operation process, and can subsequently debug the test data according to the test operation process condition, and the like.
The data automatic testing device based on the rail transit line data can automatically complete data testing, simplifies testing operation, and testers only need to pay attention to input and output, do not need to write scripts, do not need to participate in the testing process and maintenance, so that testing cost can be reduced, the testers can conveniently check testing results and follow-up maintenance, and convenience is provided for the 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, the implementation principle and the technical effect are similar, and the details are not repeated here.
Fig. 3 is a schematic physical structure diagram of an electronic device according to an embodiment of the present invention, 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 executable on the processor 301, where the processor 301 and the memory 302 communicate with each other through the bus 303. The processor 301, when executing the computer program, implements the steps of the above method, for example, including: calling a pre-established line basic data scene model library, acquiring a test case configuration file and simulating various test scenes in a rail transit line according to the line basic data scene model library, wherein the line basic data scene model library is pre-established based on rail transit line data, and test cases are 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 rail transit line based on the rule base after the test cases in the test case configuration files are operated in various test scenes in the simulated rail transit line, wherein the rule base is packaged with the interface functions of all operation methods corresponding to different test case configuration files in advance.
An embodiment of the present invention provides a non-transitory computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the steps of the above method, for example, including: calling a pre-established line basic data scene model library, acquiring a test case configuration file and simulating various test scenes in a rail transit line according to the line basic data scene model library, wherein the line basic data scene model library is pre-established based on rail transit line data, and test cases are 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 rail transit line based on the rule base after the test cases in the test case configuration files are operated in various test scenes in the simulated rail transit line, wherein the rule base is packaged with the interface functions of all operation methods corresponding to different test case configuration files in advance.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
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.
Finally, 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 (10)

1. An automatic test method based on rail transit line data is characterized by comprising the following steps:
calling a pre-established line basic data scene model library, acquiring a test case configuration file and simulating various test scenes in a rail transit line according to the line basic data scene model library, wherein the line basic data scene model library is pre-established based on rail transit line data, and test cases are 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 rail transit line based on the rule base after the test cases in the test case configuration files are operated in various test scenes in the simulated rail transit line, wherein the rule base is packaged with the interface functions of all operation methods corresponding to different test case configuration files in advance.
2. The rail transit line data-based data automated testing method of claim 1, wherein prior to invoking the pre-established line-based data scenario model library, the method further comprises:
acquiring rail transit line data;
and according to the rail transit railway line data, a line basic data scene model base is pre-established, wherein the line basic data scene model base aims to simulate 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 lines required in the test.
3. The rail transit line data-based data automated testing method of claim 2, wherein a method function for obtaining a test case configuration file is provided in the pre-established line base data scene model library;
correspondingly, the obtaining of the test case configuration file according to the line basic data scene model library includes:
and acquiring the test case configuration file by using the method function for acquiring the test case configuration file provided in the line basic data scene model library.
4. The rail transit line data-based data automation test method according to claim 1, characterized in that the rule base contains rules corresponding to correct data in various test scenes in the rail transit line corresponding to each test case preset in the test case configuration file;
correspondingly, the step of calling an interface function from a pre-established rule base, and after the test cases in the test case configuration file are operated in various test scenes in the simulated rail transit line, testing the correctness of data in various test scenes in the simulated rail transit line based on the rule base comprises the following steps:
taking any one test scene in the simulated rail transit lines as a current test scene, calling an interface function from a pre-established rule base, operating a test case in the test case configuration file in the current test scene, matching the current test scene with a rule corresponding to correct data in the current test scene corresponding to the test case which is operated at the present time in the rule base, if the current test scene is matched with the rule corresponding to correct data in the current test scene, judging that the data in the current test scene is correct, and if the current test scene is not matched with the rule, judging that the data in the current test scene is incorrect;
if the data in various test scenes in the simulated rail transit line are correct, the test case running this time passes the test, otherwise, the test case running this time does not pass the test.
5. The method for automatically testing data based on rail transit line data according to claim 1, wherein after calling an interface function from a pre-established rule base, running test cases in the test case configuration file in various test scenes in the simulated rail transit line, and testing correctness of data in various test scenes in the simulated rail transit line based on the rule base, the method further comprises:
and outputting and displaying the test result of the correctness of the data in various test scenes in the rail transit line simulated by the test.
6. The rail transit line data-based data automatic test method according to claim 5, wherein the outputting and displaying the test results for testing the correctness of the data in various test scenes in the simulated rail transit line comprises:
and for the test cases which do not pass the test, displaying the reason of the test failure of the test cases and the position of the incorrect data in the test result.
7. The method for automatically testing data based on rail transit line data according to claim 1, wherein after calling an interface function from a pre-established rule base, running test cases in the test case configuration file in various test scenes in the simulated rail transit line, and testing correctness of data in various test scenes in the simulated rail transit line based on the rule base, the method further comprises:
and automatically recording the test process and the test result for testing the correctness of the data in various test scenes in the simulated rail transit line in a log file, and printing and outputting the log file.
8. An automatic test degree device based on rail transit line data, characterized by includes:
the system comprises an acquisition module, a data processing module and a data processing module, wherein the acquisition module is used for calling a pre-established line basic data scene model library, acquiring a 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 test cases are preset in the test case configuration file;
the test module is used for calling interface functions from a pre-established rule base, testing the correctness of data in various test scenes in the simulated rail transit line based on the rule base after the test cases in the test case configuration files are operated in various test scenes in the simulated rail transit line, wherein the rule base is packaged with the interface functions of all operation methods corresponding to different test case configuration files in advance.
9. 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 steps of the method according to any of claims 1 to 7 are implemented when the computer program is executed by the processor.
10. A non-transitory computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.
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 true CN110704323A (en) 2020-01-17
CN110704323B 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)

Cited By (6)

* 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
CN112540928A (en) * 2020-12-21 2021-03-23 交控科技股份有限公司 Test case layout method and device based on to-be-tested line intersection information
CN112731910A (en) * 2021-03-31 2021-04-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
CN113706126A (en) * 2021-09-13 2021-11-26 浙江众合科技股份有限公司 Rail transit construction processing method and device based on GIS and BIM

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080282231A1 (en) * 2007-05-07 2008-11-13 Infosys Techonologies Ltd. Automated software testing framework using independent test scripts
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

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080282231A1 (en) * 2007-05-07 2008-11-13 Infosys Techonologies Ltd. Automated software testing framework using independent test scripts
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

Cited By (8)

* 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
CN112540928A (en) * 2020-12-21 2021-03-23 交控科技股份有限公司 Test case layout method and device based on to-be-tested line intersection information
CN112731910A (en) * 2021-03-31 2021-04-30 卡斯柯信号(北京)有限公司 Simulation test method and device for vehicle-mounted equipment
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
CN113706126A (en) * 2021-09-13 2021-11-26 浙江众合科技股份有限公司 Rail transit construction processing method and device based on GIS and BIM
CN113706126B (en) * 2021-09-13 2024-04-30 浙江众合科技股份有限公司 Track traffic construction processing method and device based on GIS and BIM

Also Published As

Publication number Publication date
CN110704323B (en) 2023-05-23

Similar Documents

Publication Publication Date Title
CN110704323B (en) Automatic data testing method and device based on rail transit line data
US8606538B2 (en) Method of testing an electronic system
CN108802511B (en) Method and system for testing battery management unit
CN113572658A (en) Vehicle control signal testing method and device, electronic equipment and storage medium
CN111198811A (en) Page automatic test method and device, electronic equipment and storage medium
Alferidah et al. Automated software testing tools
US9274933B2 (en) Pretest setup planning
CN107622013B (en) Distributed system testing method and device
CN115455564A (en) Virtual automobile automatic simulation method and device based on assembly line
US10909013B2 (en) TTCN-based test system and method for testing test-cases, non-transitory computer-readable recording medium
CN114564381A (en) Complete machine production and test method for Internet of things equipment
CA3144852A1 (en) Automatic generation of integrated test procedures using system test procedures
CN113986263A (en) Code automation test method, device, electronic equipment and storage medium
CN111782499B (en) Test case generation method and system
CN111752823A (en) Method, device and equipment for testing vehicle-mounted power supply application software
CN115589407B (en) File transmission verification method based on PLM-DNC integrated system
Hwang et al. Black-box testing tool of railwaysignalling system software with a focus on user convenience
Hwang et al. Interoperability test methodology for a train control system using interface channels
RU2817186C1 (en) System for confirming tests and testing embedded software of electronic devices
Shi et al. The application of uml in the modeling of automation laboratory management system
CN115269384A (en) Integration test method, system, electronic device and storage medium
Park et al. Static Analysis Deployment Model for Code Quality on R&D Projects of SW Development
KR20240018239A (en) Simulator for verifying and testing an autonomous navigation system, and method for verifying and testing an autonomous navigation system using the simulator
CN116107903A (en) Method, device, equipment and medium for testing vehicle-end service function
CN117785695A (en) Error reporting detection method, device, equipment and storage medium based on software integration

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