CN114003512A - Method and device for generating script based on train automatic control integrated verification platform - Google Patents
Method and device for generating script based on train automatic control integrated verification platform Download PDFInfo
- Publication number
- CN114003512A CN114003512A CN202111637419.4A CN202111637419A CN114003512A CN 114003512 A CN114003512 A CN 114003512A CN 202111637419 A CN202111637419 A CN 202111637419A CN 114003512 A CN114003512 A CN 114003512A
- Authority
- CN
- China
- Prior art keywords
- script
- result
- modification
- obtaining
- file
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/362—Software debugging
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3692—Test management for test results analysis
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)
- Debugging And Monitoring (AREA)
Abstract
The invention discloses a method and a device for generating a script based on an automatic control integration verification platform of a train, wherein a full-line script is obtained through an NOVA tool; detecting the full-line script through an automation tool to obtain a first detection result; obtaining a first preset modification rule, and modifying the first detection result according to the first preset modification rule to obtain a first modified copy script; obtaining a first predetermined scene format; modifying the first preset scene format of the first modified copy script through the automation tool to obtain a first scene script modification result; and obtaining a script generation result according to the first scene script modification result. The method and the device solve the technical problems that scripts generated in the prior art have the defects of empty files, inflexible interfaces, lack of key information and the like, and the generated results are modified manually, so that errors occur and the testing efficiency is low.
Description
Technical Field
The invention relates to the field related to automatic train control integrated verification, in particular to a script generation method and device based on an automatic train control integrated verification platform.
Background
The automatic train control confirmation test platform is a very important stage of indoor test of urban rail projects. In the process of train automatic control confirmation testing, the train automatic control integrated verification platform performs information interaction of I/O (input/output) code position and network communication with real signal system equipment through simulating trackside signal equipment (including a region controller, a line controller, an encoder, a shield door, a signal machine, a turnout, a track, a beacon and the like), vehicle signal equipment (including a vehicle door, a beacon antenna, a coding odometer and the like), so that the signal system equipment can simulate actual running conditions and perform various types of related tests of functions, performance, faults and the like in the running process.
For signal equipment simulation of tracksides and vehicles, the automatic train control integrated verification platform needs to be realized by using an equipment model and a corresponding test script. At present, the work of generating related test scripts is finished by an NOVA tool, and the compiling, debugging and test operation of the scripts are finished manually, so that the simulation of a test case description test scene is realized.
However, in the process of implementing the technical solution of the invention in the embodiment of the present application, it is found that the above-mentioned technology has at least the following technical problems:
the script generated by the prior art has the defects of empty files, inflexible interfaces, lack of key information and the like, and the technical problems of error and low test efficiency in manual modification of the generated result.
Disclosure of Invention
The embodiment of the application provides a method and a device for generating scripts based on an automatic train control integration verification platform, and solves the technical problems that scripts generated in the prior art have empty files, interfaces are not flexible enough, key information is lacked, and the generation result manual modification has errors and low testing efficiency.
In view of the foregoing problems, the embodiments of the present application provide a method and an apparatus for generating a script based on an integrated verification platform for automatic train control.
In a first aspect, the present application provides a method for generating a script based on an integrated verification platform for automatic train control, where the method includes: obtaining a full-line script through an NOVA tool; detecting the full-line script through an automation tool to obtain a first detection result; obtaining a first preset modification rule, and modifying the first detection result according to the first preset modification rule to obtain a first modified copy script; obtaining a first predetermined scene format; modifying the first preset scene format of the first modified copy script through the automation tool to obtain a first scene script modification result; and obtaining a script generation result according to the first scene script modification result.
On the other hand, this application still provides an integrated verification platform script generation device based on train automatic control, the device includes: a first obtaining unit, configured to obtain a full-line script through a NOVA tool; the second obtaining unit is used for detecting the full-line script through an automation tool to obtain a first detection result; a third obtaining unit, configured to obtain a first predetermined modification rule, modify the first detection result according to the first predetermined modification rule, and obtain a first modified copy script; a fourth obtaining unit configured to obtain a first predetermined scene format; the first modification unit is used for modifying the first preset scene format of the first modified copy script through the automation tool to obtain a first scene script modification result; and the first generation unit is used for obtaining a script generation result according to the first scene script modification result.
In a third aspect, the present invention provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the method of the first aspect when executing the program.
One or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages:
because the full-line script is obtained by using the NOVA tool; detecting the full-line script through an automation tool to obtain a first detection result; obtaining a first preset modification rule, and modifying the first detection result according to the first preset modification rule to obtain a first modified copy script; obtaining a first predetermined scene format; modifying the first preset scene format of the first modified copy script through the automation tool to obtain a first scene script modification result; and obtaining a script generation result according to the first scene script modification result. The method has the advantages that the generated scripts of the NOVA tool are automatically acquired and modified, relevant data are extracted from the generated scripts, the generated problem scripts are rewritten and modified, and the newly generated scripts are automatically compiled and run, so that the defects of the generated scripts of the NOVA tool and the existing simulation test tool are modified, and the effects of improving the script modification quality and improving the manual test efficiency are achieved.
The foregoing description is only an overview of the technical solutions of the present application, and the present application can be implemented according to the content of the description in order to make the technical means of the present application more clearly understood, and the following detailed description of the present application is given in order to make the above and other objects, features, and advantages of the present application more clearly understandable.
Drawings
Fig. 1 is a schematic flowchart of a script generation method based on an integrated verification platform for automatic train control according to an embodiment of the present application;
FIG. 2 is a schematic flowchart of a script test based on a script generation method of an integrated verification platform for train automatic control according to an embodiment of the present disclosure;
fig. 3 is a schematic flowchart of a process of detecting the full-line script by an automation tool based on a script generation method of an integrated verification platform for train automatic control according to an embodiment of the present application;
fig. 4 is a schematic flowchart of a method for obtaining a first predetermined modification rule based on a script generation method of an integrated verification platform for train automatic control according to an embodiment of the present application;
fig. 5 is a schematic flowchart of a method for generating a script based on an integrated verification platform for automatic train control according to an embodiment of the present application to obtain a first scenario script modification result;
fig. 6 is a schematic flowchart of a method for generating a scenario script based on an integrated verification platform for train automatic control according to an embodiment of the present application;
fig. 7 is a schematic flowchart of a detailed process for obtaining a scene script modification result based on a script generation method of an integrated verification platform for train automatic control according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of a script generation device based on an integrated verification platform for automatic train control according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of an exemplary electronic device according to an embodiment of the present application.
Description of reference numerals: a first obtaining unit 11, a second obtaining unit 12, a third obtaining unit 13, a fourth obtaining unit 14, a first modifying unit 15, a first generating unit 16, an electronic device 50, a processor 51, a memory 52, an input device 53, and an output device 54.
Detailed Description
The embodiment of the application provides a method and a device for generating scripts based on an automatic train control integration verification platform, and solves the technical problems that scripts generated in the prior art have empty files, interfaces are not flexible enough, key information is lacked, and the generation result manual modification has errors and low testing efficiency. Embodiments of the present application are described below with reference to the accompanying drawings. As can be known to those skilled in the art, with the development of technology and the emergence of new scenarios, the technical solution provided in the embodiments of the present application is also applicable to similar technical problems.
The terms "first," "second," and the like in this application are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the terms so used are interchangeable under appropriate circumstances and are merely descriptive of the various embodiments of the application and how objects of the same nature can be distinguished. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of elements is not necessarily limited to those elements, but may include other elements not expressly listed or inherent to such process, method, article, or apparatus.
Summary of the application
The automatic train control confirmation test platform is a very important stage of indoor test of urban rail projects. In the process of train automatic control confirmation testing, the train automatic control integrated verification platform performs information interaction of I/O (input/output) code position and network communication with real signal system equipment through simulating trackside signal equipment (including a region controller, a line controller, an encoder, a shield door, a signal machine, a turnout, a track, a beacon and the like), vehicle signal equipment (including a vehicle door, a beacon antenna, a coding odometer and the like), so that the signal system equipment can simulate actual running conditions and perform various types of related tests of functions, performance, faults and the like in the running process.
For signal equipment simulation of tracksides and vehicles, the automatic train control integrated verification platform needs to be realized by using an equipment model and a corresponding test script. At present, the work of generating related test scripts is finished by an NOVA tool, and the compiling, debugging and test operation of the scripts are finished manually, so that the simulation of a test case description test scene is realized. However, the scripts generated in the prior art have the defects of empty files, inflexible interfaces, lack of key information and the like, and the generated results are manually modified to have the technical problems of errors and low testing efficiency.
In view of the above technical problems, the technical solution provided by the present application has the following general idea:
the embodiment of the application provides a method for generating a script based on an automatic train control integrated verification platform, wherein the method comprises the following steps: obtaining a full-line script through an NOVA tool; detecting the full-line script through an automation tool to obtain a first detection result; obtaining a first preset modification rule, and modifying the first detection result according to the first preset modification rule to obtain a first modified copy script; obtaining a first predetermined scene format; modifying the first preset scene format of the first modified copy script through the automation tool to obtain a first scene script modification result; and obtaining a script generation result according to the first scene script modification result.
Having thus described the general principles of the present application, various non-limiting embodiments thereof will now be described in detail with reference to the accompanying drawings.
Example one
As shown in fig. 1, an embodiment of the present application provides a method for generating a script based on an integrated verification platform for automatic train control, where the method includes:
step S100: obtaining a full-line script through an NOVA tool;
step S200: detecting the full-line script through an automation tool to obtain a first detection result;
specifically, the NOVA is a module for deploying a virtual server and calculating a service in NASA development, and the full-line script refers to an executable file written according to a certain format. And after opening a Blank _ chronogram. xlsxsxx file, operating a NOVA tool to generate a script named A _ CONF _ ATP, wherein the script named A _ CONF _ ATP is the full-line script. The automation tool is a tool capable of carrying out automatic integrity detection and automatic script file modification, and the integrity detection of the full-line script is carried out through the automation tool.
Further, after detecting the generated a _ CONF _ ATP script, the automation tool scans the script file, and determines whether there is a global reference file (keyword ". GLO"), two relative path reference files (keyword ". LIS"), a line controller file (keyword ". lc.se"), a clock synchronization file (keyword ". ntp.se"), a train automatic monitoring file (keyword ". ats.se"), three interlock files (keyword ". cbi.se"), two zone controller files (keyword ". zc.se"), a signal input file (keyword ". CIN"), and a motion input file (keyword ". TOR") in the script file generated by scanning the suffix name of the file, and obtains the first detection result according to the integrity detection result. And providing basic data support for subsequent script processing through the acquisition of the full-line script and the first detection result.
Step S300: obtaining a first preset modification rule, and modifying the first detection result according to the first preset modification rule to obtain a first modified copy script;
specifically, the first predetermined modification rule is a rule for performing automatic modification of a defect script, and at least includes: automatically modifying the rules of the parent file, automatically establishing the rules of the parent array data, modifying the rules of the clock synchronization file, modifying the rules of the interlocking file, automatically modifying the rules of the signal input file and the action input file, and the like. And modifying the defect file in the first detection result according to the first preset modification rule, and copying after modification is finished.
Step S400: obtaining a first predetermined scene format;
step S500: modifying the first preset scene format of the first modified copy script through the automation tool to obtain a first scene script modification result;
step S600: and obtaining a script generation result according to the first scene script modification result.
Specifically, the first predetermined scene format is a scene format obtained according to a scene set in the test case, and a script copy file of the current modified script is automatically generated according to the number of lines of a scene summary page in the test case minus one. And the automation tool repeatedly modifies the script according to the first preset scene format, and automatically contrasts and modifies each file script one by one according to the written scene codes until each scene is covered and modified into a corresponding scene name. And when all the script files are subjected to scene modification, obtaining the first scene script modification result according to the scene-based file script. Further, after obtaining a script generation result according to the first scene script modification result, the automation tool compiles the running scripts one by one, and according to the detection of the corresponding parameter values of the specific icon and the recording tool of the driver driving interface, the running scripts are compared with an expected result, if the running scripts are the same, the test result column of the step is backfilled to OK, and if the running scripts are different, the test result column is backfilled to NOK until all the test scripts and the result scanning and backfilling are finished. The method has the advantages that the generated scripts of the NOVA tool are automatically acquired and modified, relevant data are extracted from the generated scripts, the generated problem scripts are rewritten and modified, and the newly generated scripts are automatically compiled and run, so that the defects of the generated scripts of the NOVA tool and the existing simulation test tool are modified, and the effects of improving the script modification quality and improving the manual test efficiency are achieved.
Further, as shown in fig. 2, step S700 in the embodiment of the present application further includes:
step S710: performing script backfill detection on the first scene script modification result to obtain a first script backfill detection result;
step S720: when the first script backfill detection result meets a first preset requirement, obtaining a first test case expected phenomenon;
step S730: compiling and running according to the script backfill result to obtain a first test result;
step S740: and backfilling a test report according to the first test result and the expected phenomenon of the first test case.
Specifically, the first scene script is backfilled, the backfilling detection of the script is carried out through the automation tool, the first script backfilling detection result is obtained, the first preset requirement is the requirement that the scene scripts are backfilled completely, when the first script backfilling detection result meets the first preset requirement, it is indicated that all scene script files are backfilled completely, at the moment, compiling and running of the script are automatically carried out through the automation tool, and the first test result is obtained according to detection of corresponding parameter values of a specific icon and a recording tool of a driver driving interface. And obtaining the expected phenomenon of the first test case according to the expected phenomenon described by the test case, and backfilling a test report by comparing the first test result with the expected phenomenon of the first test case. And backfilling the test result column of the step to be OK when the first test result is the same, and backfilling to be NOK when the first test result is different until all the test scripts and the result are scanned and backfilled. Through automatic testing, the time for manually modifying the script and compiling, debugging and testing operation is greatly reduced, the efficiency of modifying and testing the script is improved, and the technical effects of saving project time and cost are achieved.
Further, as shown in fig. 3, the detecting of the full-line script by the automation tool is performed to obtain a first detection result, in step S200 of this embodiment of the present application, further includes:
step S210: obtaining a first preset keyword set;
step S220: performing integrity detection on the full-line script through the automation tool based on the first preset keyword set to obtain a first integrity detection result;
step S230: scanning the full-line script content through the automation tool to obtain a first content scanning result;
step S240: and obtaining the first detection result according to the first integrity detection result and the first content scanning result.
Specifically, the first predetermined keyword set is a script file suffix keyword, and the first predetermined keyword set includes: a global reference file (keyword ". GLO"), a relative path reference file (keyword ". LIS"), a line controller file (keyword "lc.se"), a clock synchronization file (keyword "ntp.se"), a train automatic monitoring file (keyword "ats.se"), an interlock file (keyword "cbi.se"), a zone controller file (keyword "zc.se"), a signal input file (keyword ". CIN"), and an action input file (keyword ". TOR"). The integrity detection of the full-line script is performed through the first preset keyword set, and besides detecting whether the full-line script has the first preset keyword set, the integrity detection also detects whether the number of each keyword is matched, and the number of the keywords is as follows: a global reference file (keyword ". GLO"), two relative path reference files (keyword ". LIS"), a line controller file (keyword "lc.se"), a clock synchronization file (keyword "ntp.se"), a train automatic monitoring file (keyword "ats.se"), three interlocking files (keyword "cbi.se"), two zone controller files (keyword "zc.se"), a signal input file (keyword ". CIN"), and an action input file (keyword ". TOR"). And when the number of the keywords of the full-line script is not matched with the first preset keyword set, the full-line script is considered to be incomplete. And after the integrity detection is carried out, carrying out content scanning on the full-line script to obtain a first content scanning result. And obtaining the first integrity detection result and the first content scanning result to obtain the first detection result. Through integrity detection and content scanning, support of integrity and content basic data is provided for subsequent script processing.
Further, as shown in fig. 4, in obtaining the first predetermined modification rule, step S300 in this embodiment of the present application further includes:
step S310: acquiring a first preset keyword, and setting a modified parent file rule according to the first preset keyword;
step S320: acquiring a second preset keyword, and setting and establishing a parent array data rule according to the second preset keyword;
step S330: and obtaining the first preset modification rule according to the modification parent file rule and the establishment parent array data rule.
Specifically, the first predetermined keyword is "END", the second predetermined keyword is "abcisssa", and the modified parent file rule is that the scanned automatic train monitoring file is searched by the automation tool according to the code specification for the keyword END as a stop time code (a code in a fixed format), and the stop time code is added and stored according to the searched code. The established mother array data rule is that the modified automatic train monitoring file is used as a mother, the specific position data behind the mother is captured by a keyword 'ABCISSA' (namely coordinate axis offset distance), and an array is established for storage. And taking the modified parent file rule and the established parent array data rule as the first preset modification rule. And modifying the first detection result according to the first preset modification rule.
Further, as shown in fig. 5, in step S300 of obtaining a first scenario script modification result, the method further includes:
step S340: capturing the IP data of the clock synchronization row IP address column of the first detection result to obtain a first capturing result;
step S350: according to the first grabbing result, carrying out data backfill on the IP position of the clock synchronization file to obtain a first clock synchronization file modification result;
step S360: capturing position data of the interlocked file of the first detection result to obtain a first position data capturing result;
step S370: acquiring first array data through the parent array data rule, and modifying the interlocking file according to the first position data capturing result and the first array data based on a first preset rule to acquire a first interlocking file modification result;
step S380: and obtaining the first scene script modification result through the first clock synchronization file modification result and the first interlocking file modification result.
Specifically, to perform automated modification of files lacking critical information, the clock synchronization file is modified first. And according to the content scanning result of the first detection result, acquiring the first grabbing result by grabbing the IP data of the clock synchronization row IP address column in the address plan file. And backfilling the IP position of the clock synchronization file according to the first capturing result, and storing the file as three clock synchronization files named in the same way. When the interlocking file is modified, capturing position data in the interlocking file to obtain a first position data capturing result, establishing an array according to the established parent array data rule to obtain first array data, wherein the first preset rule is a comparison modification rule, and the rule is as follows: comparing the first position data capture result with the first array data, and if the first position data capture result is the same as the first array data, changing the last data value of the data into the value minus 200. Then looking down from this value, a first value different from this value is obtained, which is changed to this value plus 200. And sequentially searching and modifying according to a rule until no numerical value is found, and storing the modified file. And obtaining the first scene script modification result through the first clock synchronization file modification result and the first interlocking file modification result, so as to automatically rewrite and modify the generated problem script, thereby achieving the effects of improving the script modification quality and improving the manual test efficiency.
Further, as shown in fig. 6, step S380 in this embodiment of the present application further includes:
step S381: acquiring a signal input file and an action input file according to the first detection result;
step S382: obtaining a third preset keyword, and performing data filling on the signal input file and the action input file according to the second preset keyword and the third preset keyword to obtain a first filling result;
step S383: and obtaining the first scene script modification result according to the first filling-in result.
Further, as shown in fig. 7, step S380 in this embodiment of the present application further includes:
step S384: obtaining the interface file type information of the first detection result;
step S385: modifying the interface file of the first detection result according to the type information of the interface file to obtain a first interface file modification result;
step S386: and obtaining the first scene script modification result according to the first interface file modification result.
Specifically, the third predetermined keyword is "TARGET ABSCISSA", the signal input file and the action input file are obtained according to the first detection result, codes in the written template file are written into the two files respectively, then the array data minus 50 and the array data captured in the third step are sequentially filled in according to the keywords "ABSCISSA" and "TARGET ABSCISSA", respectively, the first filling result is obtained, and the first filling result is used as the first scene script modification result. Further, after the interface file is automatically modified, a final first scene script modification result is obtained. And performing different processing according to different interface file types, wherein the interface file types comprise an interface file between a road controller and an automatic train control system and an interface file between a zone controller and the automatic train control system. When the type of the interface file is the interface file between the line controller and the automatic train control system, and the existing items are the latest baselines, the finished master code is directly pasted and the file is saved; and when the interface file type is an interface file between the zone controller and the train automatic control system, taking xml as a basis, taking ZC-CC as a key word, scanning a structure name in an interface protocol between the zone controller and the train automatic control system in the interface file, storing the structure name into another array, scanning the file, if corresponding information can be searched in the file according to the structure name of the array element, not modifying, and otherwise, inserting missing structures according to the written mother code format sequence of the file and storing the file. And obtaining the modification result of the first scene script according to the modification result of the interface file. And modifying and rewriting the defect script generated by the NOVA tool through the automatic tool, and compiling, running and testing the test script at the same time, so as to realize the automatic test of the train automatic control integrated verification platform. By the method, the test process of the script of the automatic control integrated verification platform of the train can be delivered to a computer to be automatically executed to the greatest extent, the debugging and compiling quality of script modification is improved, and the technical effect of improving the working efficiency is achieved.
To sum up, the method and the device for generating the script based on the train automatic control integration verification platform provided by the embodiment of the application have the following technical effects:
1. because the full-line script is obtained by using the NOVA tool; detecting the full-line script through an automation tool to obtain a first detection result; obtaining a first preset modification rule, and modifying the first detection result according to the first preset modification rule to obtain a first modified copy script; obtaining a first predetermined scene format; modifying the first preset scene format of the first modified copy script through the automation tool to obtain a first scene script modification result; and obtaining a script generation result according to the first scene script modification result. The method has the advantages that the generated scripts of the NOVA tool are automatically acquired and modified, relevant data are extracted from the generated scripts, the generated problem scripts are rewritten and modified, and the newly generated scripts are automatically compiled and run, so that the defects of the generated scripts of the NOVA tool and the existing simulation test tool are modified, and the effects of improving the script modification quality and improving the manual test efficiency are achieved.
2. Due to the adoption of an automatic testing mode, the time for manually modifying the script and compiling, debugging and testing the running is greatly reduced, and the technical effects of improving the efficiency of modifying and testing the script and saving the time cost of a project are achieved.
Example two
Based on the same inventive concept as the method for generating the script based on the train automatic control integrated verification platform in the foregoing embodiment, the present invention further provides a device for generating the script based on the train automatic control integrated verification platform, as shown in fig. 8, the device includes:
a first obtaining unit 11, wherein the first obtaining unit 11 is used for obtaining a full-line script through an NOVA tool;
a second obtaining unit 12, where the second obtaining unit 12 is configured to perform detection on the full-line script through an automation tool to obtain a first detection result;
a third obtaining unit 13, where the third obtaining unit 13 is configured to obtain a first predetermined modification rule, and modify the first detection result according to the first predetermined modification rule to obtain a first modified copy script;
a fourth obtaining unit 14, said fourth obtaining unit 14 being configured to obtain a first predetermined scene format;
a first modifying unit 15, where the first modifying unit 15 is configured to modify the first predetermined scenario format of the first modified copy scenario through the automation tool, so as to obtain a first scenario modification result;
a first generating unit 16, where the first generating unit 16 is configured to obtain a script generating result according to the first scenario script modification result.
Further, the apparatus further comprises:
a fifth obtaining unit, configured to perform script backfill detection on the first scene script modification result to obtain a first script backfill detection result;
a sixth obtaining unit, configured to obtain a first test case expected phenomenon when the first script backfill detection result meets a first predetermined requirement;
the seventh obtaining unit is used for compiling and running according to the script backfill result to obtain a first test result;
and the first backfill unit is used for backfilling a test report according to the first test result and the first test case expectation phenomenon.
Further, the apparatus further comprises:
an eighth obtaining unit, configured to obtain a first predetermined keyword set;
a ninth obtaining unit, configured to perform, by the automation tool, integrity detection on the full-line script based on the first predetermined keyword set, and obtain a first integrity detection result;
a tenth obtaining unit, configured to perform content scanning on the full-line script through the automation tool to obtain a first content scanning result;
an eleventh obtaining unit, configured to obtain the first detection result according to the first integrity detection result and the first content scanning result.
Further, the apparatus further comprises:
a twelfth obtaining unit, configured to obtain a first predetermined keyword, and set a modified parent file rule according to the first predetermined keyword;
a thirteenth obtaining unit, configured to obtain a second predetermined keyword, and set and establish a parent array data rule according to the second predetermined keyword;
a fourteenth obtaining unit, configured to obtain the first predetermined modification rule according to the modified parent file rule and the established parent array data rule.
Further, the apparatus further comprises:
the first grabbing unit is used for grabbing the IP data of the clock synchronization row IP address column of the first detection result to obtain a first grabbing result;
the second backfilling unit is used for backfilling data at the IP position of the clock synchronization file according to the first grabbing result to obtain a first clock synchronization file modification result;
the second grabbing unit is used for grabbing the position data of the interlocked file of the first detection result to obtain a first position data grabbing result;
a fifteenth obtaining unit, configured to obtain first array data according to the parent array data rule, and modify an interlocking file according to the first position data capture result and the first array data based on a first predetermined rule, to obtain a first interlocking file modification result;
a sixteenth obtaining unit, configured to obtain the first scene script modification result according to the first clock synchronization file modification result and the first interlocking file modification result.
Further, the apparatus further comprises:
a seventeenth obtaining unit, configured to obtain a signal input file and an action input file according to the first detection result;
an eighteenth obtaining unit, configured to obtain a third predetermined keyword, perform data filling in on the signal input file and the motion input file according to the second predetermined keyword and the third predetermined keyword, and obtain a first filling result.
A nineteenth obtaining unit, configured to obtain the first scene script modification result according to the first fill-in result.
Further, the apparatus further comprises:
a twentieth obtaining unit, configured to obtain the interface file type information of the first detection result;
a twenty-first obtaining unit, configured to modify the interface file of the first detection result according to the interface file type information, and obtain a first interface file modification result;
a twenty-second obtaining unit, configured to obtain the first scene script modification result according to the first interface file modification result.
Various changes and specific examples of the script generating method based on the train automatic control integrated verification platform in the first embodiment of fig. 1 are also applicable to the script generating device based on the train automatic control integrated verification platform in the present embodiment, and through the foregoing detailed description of the script generating method based on the train automatic control integrated verification platform, those skilled in the art can clearly know the implementation method of the script generating device based on the train automatic control integrated verification platform in the present embodiment, so that the detailed description is omitted here for the sake of brevity of the description.
Exemplary electronic device
The electronic apparatus of the embodiment of the present application is described below with reference to fig. 9.
Fig. 9 illustrates a schematic structural diagram of an electronic device according to an embodiment of the present application.
Based on the inventive concept of the script generation method based on the train automatic control integrated verification platform in the foregoing embodiment, the present invention further provides an electronic device, and the electronic device according to the embodiment of the present application is described below with reference to fig. 9. The electronic device may be a removable device itself or a stand-alone device independent thereof, on which a computer program is stored which, when being executed by a processor, carries out the steps of any of the methods as described hereinbefore.
As shown in fig. 9, the electronic device 50 includes one or more processors 51 and a memory 52.
The processor 51 may be a Central Processing Unit (CPU) or other form of processing unit having data processing capabilities and/or instruction execution capabilities, and may control other components in the electronic device 50 to perform desired functions.
The memory 52 may include one or more computer program products that may include various forms of computer-readable storage media, such as volatile memory and/or non-volatile memory. The volatile memory may include, for example, Random Access Memory (RAM), cache memory (cache), and/or the like. The non-volatile memory may include, for example, Read Only Memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium and executed by the processor 51 to implement the methods of the various embodiments of the application described above and/or other desired functions.
In one example, the electronic device 50 may further include: an input device 53 and an output device 54, which are interconnected by a bus system and/or other form of connection mechanism (not shown).
The embodiment of the invention provides a method for generating a script based on an automatic train control integrated verification platform, wherein the method comprises the following steps: obtaining a full-line script through an NOVA tool; detecting the full-line script through an automation tool to obtain a first detection result; obtaining a first preset modification rule, and modifying the first detection result according to the first preset modification rule to obtain a first modified copy script; obtaining a first predetermined scene format; modifying the first preset scene format of the first modified copy script through the automation tool to obtain a first scene script modification result; and obtaining a script generation result according to the first scene script modification result. The problems that the scripts generated in the prior art are empty, interfaces are not flexible enough, key information is lacking and the like are overcome, errors exist in manual modification of generated results, and testing efficiency is low are solved, the problem that the scripts generated by an NOVA tool are automatically acquired and modified, relevant data are extracted from the generated scripts, the generated scripts are rewritten and modified, automatic compiling operation is conducted on the newly generated scripts, the defects of the scripts generated by the NOVA tool and the existing simulation testing tool are modified, and therefore script modification quality is improved, and manual testing efficiency is improved.
Through the above description of the embodiments, those skilled in the art will clearly understand that the present application can be implemented by software plus necessary general-purpose hardware, and certainly can also be implemented by special-purpose hardware including special-purpose integrated circuits, special-purpose CPUs, special-purpose memories, special-purpose components and the like. Generally, functions performed by computer programs can be easily implemented by corresponding hardware, and specific hardware structures for implementing the same functions may be various, such as analog circuits, digital circuits, or dedicated circuits. However, for the present application, the implementation of a software program is more preferable. Based on such understanding, the technical solutions of the present application may be substantially embodied in the form of a software product, which is stored in a readable storage medium, such as a floppy disk, a usb disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk of a computer, and includes several instructions for causing a computer device to execute the method according to the embodiments of the present application.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product.
The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored on or transmitted from a computer-readable storage medium to another computer-readable storage medium, which may be magnetic (e.g., floppy disks, hard disks, tapes), optical (e.g., DVDs), or semiconductor (e.g., Solid State Disks (SSDs)), among others.
It should be appreciated that reference throughout this specification to "one embodiment" or "an embodiment" means that a particular feature, structure or characteristic described in connection with the embodiment is included in at least one embodiment of the present application. Thus, the appearances of the phrases "in one embodiment" or "in an embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. It should be understood that, in the various embodiments of the present application, the sequence numbers of the above-mentioned processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
Additionally, the terms "system" and "network" are often used interchangeably herein. The term "and/or" herein is merely an association describing an associated object, meaning that three relationships may exist, e.g., a and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
It should be understood that in the embodiment of the present application, "B corresponding to a" means that B is associated with a, from which B can be determined. It should also be understood that determining B from a does not mean determining B from a alone, but may be determined from a and/or other information.
Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be embodied in electronic hardware, computer software, or combinations of both, and that the components and steps of the examples have been described in a functional general in the foregoing description for the purpose of illustrating clearly the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In short, the above description is only a preferred embodiment of the present disclosure, and is not intended to limit the scope of the present disclosure. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims (9)
1. A method for generating a script based on an automatic control integration verification platform of a train is characterized by comprising the following steps:
obtaining a full-line script through an NOVA tool;
detecting the full-line script through an automation tool to obtain a first detection result;
obtaining a first preset modification rule, and modifying the first detection result according to the first preset modification rule to obtain a first modified copy script;
obtaining a first predetermined scene format;
modifying the first preset scene format of the first modified copy script through the automation tool to obtain a first scene script modification result;
and obtaining a script generation result according to the first scene script modification result.
2. The method of claim 1, wherein the method further comprises:
performing script backfill detection on the first scene script modification result to obtain a first script backfill detection result;
when the first script backfill detection result meets a first preset requirement, obtaining a first test case expected phenomenon;
compiling and running according to the script backfill result to obtain a first test result;
and backfilling a test report according to the first test result and the expected phenomenon of the first test case.
3. The method of claim 1, wherein the detecting of the full-line script by the automation tool to obtain a first detection result further comprises:
obtaining a first preset keyword set;
performing integrity detection on the full-line script through the automation tool based on the first preset keyword set to obtain a first integrity detection result;
scanning the full-line script content through the automation tool to obtain a first content scanning result;
and obtaining the first detection result according to the first integrity detection result and the first content scanning result.
4. The method of claim 1, wherein the obtaining a first predetermined modification rule further comprises:
acquiring a first preset keyword, and setting a modified parent file rule according to the first preset keyword;
acquiring a second preset keyword, and setting and establishing a parent array data rule according to the second preset keyword;
and obtaining the first preset modification rule according to the modification parent file rule and the establishment parent array data rule.
5. The method of claim 4, wherein the obtaining a first scenario script modification result further comprises:
capturing the IP data of the clock synchronization row IP address column of the first detection result to obtain a first capturing result;
according to the first grabbing result, carrying out data backfill on the IP position of the clock synchronization file to obtain a first clock synchronization file modification result;
capturing position data of the interlocked file of the first detection result to obtain a first position data capturing result;
acquiring first array data through the parent array data rule, and modifying the interlocking file according to the first position data capturing result and the first array data based on a first preset rule to acquire a first interlocking file modification result;
and obtaining the first scene script modification result through the first clock synchronization file modification result and the first interlocking file modification result.
6. The method of claim 5, wherein the method further comprises:
acquiring a signal input file and an action input file according to the first detection result;
obtaining a third preset keyword, and performing data filling on the signal input file and the action input file according to the second preset keyword and the third preset keyword to obtain a first filling result;
and obtaining the first scene script modification result according to the first filling-in result.
7. The method of claim 1, wherein the method further comprises:
obtaining the interface file type information of the first detection result;
modifying the interface file of the first detection result according to the type information of the interface file to obtain a first interface file modification result;
and obtaining the first scene script modification result according to the first interface file modification result.
8. A script generation device based on a train automatic control integrated verification platform is characterized by comprising:
a first obtaining unit, configured to obtain a full-line script through a NOVA tool;
the second obtaining unit is used for detecting the full-line script through an automation tool to obtain a first detection result;
a third obtaining unit, configured to obtain a first predetermined modification rule, modify the first detection result according to the first predetermined modification rule, and obtain a first modified copy script;
a fourth obtaining unit configured to obtain a first predetermined scene format;
the first modification unit is used for modifying the first preset scene format of the first modified copy script through the automation tool to obtain a first scene script modification result;
and the first generation unit is used for obtaining a script generation result according to the first scene script modification result.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the steps of the method of any of claims 1-7 are implemented when the program is executed by the processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111637419.4A CN114003512B (en) | 2021-12-30 | 2021-12-30 | Method and device for generating script based on train automatic control integrated verification platform |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111637419.4A CN114003512B (en) | 2021-12-30 | 2021-12-30 | Method and device for generating script based on train automatic control integrated verification platform |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114003512A true CN114003512A (en) | 2022-02-01 |
CN114003512B CN114003512B (en) | 2022-05-13 |
Family
ID=79932436
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111637419.4A Active CN114003512B (en) | 2021-12-30 | 2021-12-30 | Method and device for generating script based on train automatic control integrated verification platform |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114003512B (en) |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2013062956A1 (en) * | 2011-10-26 | 2013-05-02 | Google Inc. | Automatically testing a program executable on a graphics card |
CN103885439A (en) * | 2014-03-21 | 2014-06-25 | 上海富欣智能交通控制有限公司 | Automated testing system for railway signal computer interlocking system |
CN104484269A (en) * | 2014-11-27 | 2015-04-01 | 北京广利核系统工程有限公司 | Method for automatically generating testing script |
CN105912469A (en) * | 2016-04-11 | 2016-08-31 | 卡斯柯信号有限公司 | Automatic detection method of testing scripts for rail transit vehicle-mounted controller software |
CN106874209A (en) * | 2017-03-15 | 2017-06-20 | 上汽通用汽车有限公司 | The generation method and device of test script |
CN107463500A (en) * | 2017-08-09 | 2017-12-12 | 网易(杭州)网络有限公司 | Adjustment method, medium, system and the computing device of test script |
CN109542775A (en) * | 2018-11-05 | 2019-03-29 | 广州云测信息技术有限公司 | A kind of generation and execution method and device of test script |
CN111221728A (en) * | 2019-12-31 | 2020-06-02 | 卡斯柯信号有限公司 | Self-adaptive test script system and method for rail transit automatic control software |
WO2020220184A1 (en) * | 2019-04-29 | 2020-11-05 | 深圳市大疆创新科技有限公司 | Visual programming control apparatus, programmable control device and control method therefor, computer readable storage medium, and programming control system |
CN113535543A (en) * | 2021-06-09 | 2021-10-22 | 卡斯柯信号有限公司 | Test data generation method, device, equipment and medium for TACS system |
-
2021
- 2021-12-30 CN CN202111637419.4A patent/CN114003512B/en active Active
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2013062956A1 (en) * | 2011-10-26 | 2013-05-02 | Google Inc. | Automatically testing a program executable on a graphics card |
CN103885439A (en) * | 2014-03-21 | 2014-06-25 | 上海富欣智能交通控制有限公司 | Automated testing system for railway signal computer interlocking system |
CN104484269A (en) * | 2014-11-27 | 2015-04-01 | 北京广利核系统工程有限公司 | Method for automatically generating testing script |
CN105912469A (en) * | 2016-04-11 | 2016-08-31 | 卡斯柯信号有限公司 | Automatic detection method of testing scripts for rail transit vehicle-mounted controller software |
CN106874209A (en) * | 2017-03-15 | 2017-06-20 | 上汽通用汽车有限公司 | The generation method and device of test script |
CN107463500A (en) * | 2017-08-09 | 2017-12-12 | 网易(杭州)网络有限公司 | Adjustment method, medium, system and the computing device of test script |
CN109542775A (en) * | 2018-11-05 | 2019-03-29 | 广州云测信息技术有限公司 | A kind of generation and execution method and device of test script |
WO2020220184A1 (en) * | 2019-04-29 | 2020-11-05 | 深圳市大疆创新科技有限公司 | Visual programming control apparatus, programmable control device and control method therefor, computer readable storage medium, and programming control system |
CN111221728A (en) * | 2019-12-31 | 2020-06-02 | 卡斯柯信号有限公司 | Self-adaptive test script system and method for rail transit automatic control software |
CN113535543A (en) * | 2021-06-09 | 2021-10-22 | 卡斯柯信号有限公司 | Test data generation method, device, equipment and medium for TACS system |
Non-Patent Citations (2)
Title |
---|
HIROYUKI KIRINUKI: "COLOR: Correct Locator Recommender for Broken Test Scripts using Various Clues in Web Application", 《IEEE INTERNATIONAL CONFERENCE ON SOFTWARE ANALYSIS, EVOLUTION AND REENGINEERING (SANER)》 * |
王嗣策: "车载ATP测试平台的测试脚本自动生成方法的研究", 《CNKI优秀硕士学位论文全文库 工程科技Ⅱ辑》 * |
Also Published As
Publication number | Publication date |
---|---|
CN114003512B (en) | 2022-05-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103294594B (en) | A kind of wrong report of the static analysis based on test removing method | |
US8560985B1 (en) | Configuration-based merging of coverage data results for functional verification of integrated circuits | |
JP2014203314A (en) | ECU simulation device | |
CN106776338B (en) | Test method, test device and server | |
CN111506509A (en) | Automatic testing method, device, equipment and storage medium for automobile software unit | |
CN103180834A (en) | An automated operating system test framework | |
CN104021072A (en) | Machine and methods for evaluating failing software programs | |
JP2009169828A (en) | Test case creation device and creation program | |
CN114003512B (en) | Method and device for generating script based on train automatic control integrated verification platform | |
CN109387193B (en) | Indoor map updating method and device | |
Rana et al. | Early verification and validation according to iso 26262 by combining fault injection and mutation testing | |
CN110704318B (en) | Map data automatic testing method, terminal device and storage medium | |
Yasmine et al. | Towards formal verification of autonomous driving supervisor functions | |
CN112988565A (en) | Interface automation test method and device, computer equipment and storage medium | |
CN118363873B (en) | Test method, device and equipment of debugging module and readable storage medium | |
CN113886191B (en) | Real-time tracking data processing method and device for automatic driving system | |
CN112527657B (en) | Method and equipment for automatic pile insertion in unit test | |
EP4287027A1 (en) | Method and system for generating test cases for an engineering program | |
CN115617677A (en) | Ramp testing method and device for automatic driving vehicle | |
Staron et al. | Automotive software development | |
Lind et al. | CompSize: A model-based and automated approach to size estimation of embedded software components | |
CN117008495A (en) | Ultrasonic perception simulation test method and system in automatic parking | |
CN116095163A (en) | Batch message sending method and device, electronic equipment and storage medium | |
CN118363873A (en) | Test method, device and equipment of debugging module and readable storage medium | |
CN116521808A (en) | Analysis method and system of simulation map |
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 |