CN111797018A - STP test environment deployment method and device - Google Patents
STP test environment deployment method and device Download PDFInfo
- Publication number
- CN111797018A CN111797018A CN202010620551.3A CN202010620551A CN111797018A CN 111797018 A CN111797018 A CN 111797018A CN 202010620551 A CN202010620551 A CN 202010620551A CN 111797018 A CN111797018 A CN 111797018A
- Authority
- CN
- China
- Prior art keywords
- software
- tested
- input
- code
- version number
- 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.)
- Pending
Links
- 238000012360 testing method Methods 0.000 title claims abstract description 140
- 238000000034 method Methods 0.000 title claims abstract description 70
- 230000004044 response Effects 0.000 claims description 22
- 238000012545 processing Methods 0.000 claims description 20
- 238000012986 modification Methods 0.000 claims description 6
- 230000004048 modification Effects 0.000 claims description 6
- 238000013522 software testing Methods 0.000 claims description 5
- 238000012423 maintenance Methods 0.000 abstract description 2
- 238000004590 computer program Methods 0.000 description 10
- 238000010586 diagram Methods 0.000 description 9
- 238000004891 communication Methods 0.000 description 6
- 230000008901 benefit Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 238000013461 design Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000007613 environmental effect Effects 0.000 description 2
- 230000003137 locomotive effect Effects 0.000 description 2
- 238000012544 monitoring process Methods 0.000 description 2
- 230000002159 abnormal effect Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
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/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/3664—Environments for testing or debugging software
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3684—Test management for test design, e.g. generating new test cases
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)
- Debugging And Monitoring (AREA)
- Stored Programmes (AREA)
Abstract
The embodiment of the invention provides a method and a device for deploying an STP test environment, relates to the technical field of STP maintenance, and is used for improving the efficiency and accuracy of deploying the STP test environment. The method comprises the following steps: receiving a test application; analyzing the test application to determine environment deployment data; judging whether the MD5 code of each software to be tested is consistent with the corresponding actual MD5 code one by one; if the software to be tested is consistent with the software to be tested, downloading the software to be tested from the CC library; judging whether the version number of each data packet is consistent with the corresponding actual version number one by one; if the data packets are consistent, downloading the data packets from the CC library; downloading a configuration file from a CC library; and under the condition that the software to be tested with the inconsistent MD5 codes does not exist and the data package with the inconsistent version number does not exist, deploying the test environment based on the software to be tested, the data package and the configuration file. The embodiment of the invention is used for STP test environment deployment.
Description
Technical Field
The invention relates to the technical field of maintenance of wireless shunting locomotive signals and monitoring systems, in particular to a STP test environment deployment method and device.
Background
The radio shunting locomotive signal and monitoring System (STP) is one safety protection system for station shunting operation. The STP test is directly related to the safety of station shunting operation, and has very main significance. The environment deployment is an essential important link in the STP test work, a correct and comprehensive test environment can provide a powerful guarantee for the test of the STP, and a wrong test environment can cause inaccurate test results and even serious safety accidents.
Currently, the environment deployment of STP testing is generally done manually by testers. The testing personnel manually compare whether the content of the test application form is consistent with the information of the software to be tested in the configuration library, and when the information is consistent, the corresponding software to be tested is manually downloaded from the configuration library to the server according to the process, and finally, the software to be tested, data, configuration files and the like are manually input into the corresponding industrial personal computer, the server and the vehicle-mounted host to complete the deployment of the STP testing environment. Because the whole course of deploying the STP test environment is completed manually at present, the efficiency is very low, and errors easily occur to influence the accuracy of the STP test environment.
Disclosure of Invention
In view of this, the present invention provides a method and an apparatus for deploying an STP test environment, which are used to improve efficiency and accuracy of deploying the STP test environment.
In order to achieve the above object, the embodiments of the present invention provide the following technical solutions:
in a first aspect, an embodiment of the present invention provides an STP test environment deployment method, including:
receiving a test application;
analyzing the test application to determine environment deployment information corresponding to the test application, wherein the environment deployment information comprises: the software testing method comprises the following steps that at least one piece of software to be tested, a message digest algorithm MD5 code of each piece of software to be tested, at least one data packet, a version number of each data packet and a configuration file are obtained;
judging whether the MD5 code of each software to be tested is consistent with the corresponding actual MD5 code one by one, wherein the actual MD5 code corresponding to any software to be tested is the MD5 code of the software to be tested, which is stored in a software configuration management tool (CC) library;
if the MD5 code of any software to be tested is consistent with the corresponding actual MD5 code, downloading the software to be tested from the CC library;
judging whether the version number of each data packet is consistent with the corresponding actual version number one by one, wherein the actual version number corresponding to any data packet is the version number of the data packet stored in the CC library;
if the version number of any data packet is consistent with the corresponding actual version number, downloading the data packet from the CC library;
downloading the configuration file from the CC library;
and under the condition that the software to be tested with the MD5 code inconsistent with the corresponding actual MD5 code does not exist, and the data package with the version number inconsistent with the corresponding actual version number does not exist, deploying the test environment corresponding to the test application based on the software to be tested, the data package and the configuration file downloaded from the CC library.
As an optional implementation manner of the embodiment of the present invention, the method further includes:
if the MD5 code of any software to be tested is inconsistent with the corresponding actual MD5 code, outputting first prompt information;
the first prompt message is used for prompting that the MD5 code of the software to be tested has an error.
As an optional implementation manner of the embodiment of the present invention, the method further includes:
if the version number of any data packet is not consistent with the corresponding actual version number, outputting second prompt information;
the second prompt message is used for prompting that the version number of the data packet has an error.
As an optional implementation manner of the embodiment of the present invention, the method further includes:
and returning the test application under the condition that the software to be tested with the MD5 code inconsistent with the corresponding actual MD5 code exists and/or the data packet with the version number inconsistent with the corresponding actual version number exists.
As an optional implementation manner of the embodiment of the present invention, the deploying, based on the environment deployment data, the test environment corresponding to the test application includes:
displaying a first interface, the first interface comprising a first control;
receiving a first input of a user, wherein the first input is an input of the first control;
and responding to the first input, and storing each software to be tested, each data packet and the configuration file to corresponding positions according to a preset format.
As an optional implementation manner of the embodiment of the present invention, after storing, based on the first input, each software to be tested, each data packet, and the configuration file according to a preset format to a target location, the method further includes:
displaying a second interface, the second interface comprising a second control and a third control;
receiving a second input of the second control by the user, and starting a test program in response to the second input;
or;
and receiving a third input of the third control by the user, and returning to the first interface in response to the third input.
As an optional implementation manner of the embodiment of the present invention, the first interface further includes a fourth control, and the method further includes:
receiving a fourth input of the user, wherein the fourth input is an input of the fourth control;
responding to the fourth input, and displaying a software list to be tested, wherein the software list comprises all software to be tested;
receiving input of a user to target software to be tested in the software to be tested list;
and restarting the test program after updating the target software to be tested to the corresponding position.
As an optional implementation manner of the embodiment of the present invention, the first interface further includes a fifth control, and the method further includes:
receiving a fifth input of the user, wherein the fifth input is an input to the fifth control;
in response to the fifth input, displaying a first profile list, the first profile list including all historical profiles;
receiving user input of a target historical configuration file in the first configuration file list;
displaying a target historical profile in the first profile list in response to a user input of the target historical profile;
and receiving the modification of the target historical configuration file, and saving the modified configuration file.
As an optional implementation manner of the embodiment of the present invention, the first interface further includes a sixth control, and the method further includes:
receiving a sixth input of the user, wherein the sixth input is an input to the sixth control;
in response to the sixth input, displaying a second list of profiles, the second list of profiles comprising all profiles;
receiving user input of a target configuration file in the second configuration file list;
and restarting the test program after updating the target configuration file to the corresponding position.
In a second aspect, an embodiment of the present invention provides an STP test environment deployment apparatus, including:
the device comprises a receiving unit, a processing unit and a processing unit, wherein the receiving unit is used for receiving a test application, and the test application carries data information;
the analysis unit is used for analyzing the test application to determine environment deployment information corresponding to the test application, and the environment deployment information comprises: the software testing method comprises the following steps that at least one piece of software to be tested, a message digest algorithm MD5 code of each piece of software to be tested, at least one data packet, a version number of each data packet and a configuration file are obtained;
the judging unit is used for judging whether the MD5 code of each software to be tested is consistent with the corresponding actual MD5 code one by one, and the actual MD5 code corresponding to any software to be tested is the MD5 code of the software to be tested stored in the software configuration management tool CC library;
the downloading unit is used for downloading the software to be tested from the CC library when the MD5 code of any software to be tested is consistent with the corresponding actual MD5 code;
the judging unit is further configured to judge whether the version number of each data packet is consistent with a corresponding actual version number one by one, where the actual version number corresponding to any data packet is the version number of the data packet stored in the CC library;
the downloading unit is further configured to download the data packet from the CC library when the version number of any data packet is consistent with the corresponding actual version number;
the downloading unit is further configured to download the configuration file from the CC library;
and the processing unit is used for deploying the test environment corresponding to the test application based on the software to be tested, the data package and the configuration file downloaded from the CC library under the condition that the software to be tested with the MD5 code inconsistent with the corresponding actual MD5 code does not exist and the data package with the version number inconsistent with the corresponding actual version number does not exist.
As an optional implementation manner of the embodiment of the present invention, the determining unit is further configured to output a first prompt message when the MD5 code of any software to be tested is inconsistent with the corresponding actual MD5 code;
the first prompt message is used for prompting that the MD5 code of the software to be tested has an error.
As an optional implementation manner of the embodiment of the present invention, the determining unit is further configured to output a second prompt message when the version number of any data packet is inconsistent with the corresponding actual version number;
the second prompt message is used for prompting that the version number of the data packet has an error.
As an optional implementation manner of the embodiment of the present invention, the processing unit is further configured to return the test application in a case that there exists software to be tested whose MD5 code does not conform to the corresponding actual MD5 code and/or there exists a data packet whose version number does not conform to the corresponding actual version number.
As an optional implementation manner of the embodiment of the present invention, the apparatus further includes:
the display unit is used for displaying a first interface, and the first interface comprises a first control;
the receiving unit is further configured to receive a first input of a user, where the first input is an input to the first control;
the processing unit is specifically configured to respond to the first input and store each software to be tested, each data packet, and the configuration file to a corresponding location according to a preset format.
As an optional implementation manner of the embodiment of the present invention, the display unit is further configured to display a second interface after storing, based on the first input, each piece of software to be tested, each data packet, and the configuration file to a target location according to a preset format, where the second interface includes a second control and a third control;
the receiving unit is further configured to receive a second input of the second control from the user; the processing unit is further used for responding to the second input to start a test program;
or;
the receiving unit is further configured to receive a third input of the third control from the user; the display unit is further configured to return to the first interface in response to the third input.
As an optional implementation manner of the embodiment of the present invention, the first interface further includes a fourth control;
the receiving unit is further configured to receive a fourth input of the user, where the fourth input is an input to the fourth control;
the display unit is further used for responding to the fourth input and displaying a software list to be tested, wherein the software list comprises all software to be tested;
the receiving unit is further used for receiving the input of the user to the target software to be tested in the software to be tested list;
the processing unit is further configured to restart the test program after the target software to be tested is updated to the corresponding location.
As an optional implementation manner of the embodiment of the present invention, the first interface further includes a fifth control;
the receiving unit is further configured to receive a fifth input of a user, where the fifth input is an input to the fifth control;
the display unit is further configured to display a first configuration file list in response to the fifth input, where the first configuration file list includes all historical configuration files;
the receiving unit is further configured to receive an input of a user for a target historical profile in the first profile list;
the display unit is further used for responding to the input of a user to a target historical configuration file in the first configuration file list, and displaying the target historical configuration file;
the receiving unit is further configured to receive a modification to the target historical configuration file, and store the modified configuration file;
the display unit is also used for displaying a sixth control;
the receiving unit is further configured to receive a sixth input of the user, where the sixth input is an input to the sixth control;
the processing unit is further configured to respond to the sixth input, restart the test program after the modified configuration file is updated to the corresponding location, and save the modified configuration file as a historical configuration file.
As an optional implementation manner of the embodiment of the present invention, the first interface further includes a sixth control;
the receiving unit is configured to receive a sixth input of the user, where the sixth input is an input to the sixth control;
the display unit is further configured to display a second configuration file list in response to the sixth input, where the second configuration file list includes all configuration files;
the receiving unit is further configured to receive an input of a user to a target profile in the second profile list;
the processing unit is further configured to restart the test program after the target configuration file is updated to the corresponding location.
In a third aspect, an embodiment of the present invention provides an electronic device, including: a memory for storing a computer program and a processor; the processor is configured to execute the STP test environment deployment method according to the first aspect or any embodiment of the first aspect when the computer program is called.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the STP test environment deployment method according to the first aspect or any of the embodiments of the first aspect.
After receiving a test application, the STP test environment deployment method provided by the embodiment of the invention firstly analyzes the test application to determine environment deployment information corresponding to the test application, then judging whether the MD5 code of each software to be tested is consistent with the corresponding actual MD5 code one by one, judging whether the version number of each data packet is consistent with the corresponding actual version number one by one, and downloading the software to be tested with the MD5 code consistent with the corresponding actual MD5 code, the data packet with the version number consistent with the corresponding actual version number and the configuration file from the software configuration management tool library, and finally, when the software to be tested without the MD5 code inconsistent with the corresponding actual MD5 code does not exist, and under the condition that no data packet with the version number inconsistent with the corresponding actual version number exists, deploying the test environment corresponding to the test application based on the software to be tested, the data packet and the configuration file downloaded from the CC library. Compared with the environment deployment for manually completing the STP test in the prior art, the STP test environment deployment method provided by the embodiment of the invention can automatically complete the deployment of the corresponding test environment only by inputting the test request, so that the efficiency and the accuracy for deploying the STP test environment are improved.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings.
Fig. 1 is a flowchart illustrating steps of an STP test environment deployment method according to an embodiment of the present invention;
fig. 2 is a second flowchart illustrating steps of a STP test environment deployment method according to an embodiment of the present invention;
fig. 3 is one of the schematic scenarios of the STP test environment deployment method according to the embodiment of the present invention;
fig. 4 is a second scenario diagram of the STP test environment deployment method according to the embodiment of the present invention;
fig. 5 is a third scenario diagram of the STP test environment deployment method according to the embodiment of the present invention;
fig. 6 is a third flowchart illustrating steps of a STP test environment deployment method according to an embodiment of the present invention;
fig. 7 is a fourth scenario diagram of the STP test environment deployment method according to the embodiment of the present invention;
fig. 8 is a fourth flowchart illustrating steps of a STP test environment deployment method according to an embodiment of the present invention;
fig. 9 is a fifth scenario diagram of the STP test environment deployment method according to the embodiment of the present invention;
fig. 10 is a flowchart illustrating steps of a STP test environment deployment method according to an embodiment of the present invention;
fig. 11 is a schematic structural diagram of an STP test environment deployment apparatus according to an embodiment of the present invention;
fig. 12 is a second schematic structural diagram of an STP test environment deployment device according to an embodiment of the present invention;
fig. 13 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present invention.
Detailed Description
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, 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.
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.
The terms "first" and "second," and the like, in the description and in the claims of the present invention are used for distinguishing between synchronized objects, and are not used to describe a particular order of objects. For example, the first interface and the second interface, etc. are for distinguishing different interfaces, rather than for describing a particular order of the interfaces.
In the embodiments of the present invention, words such as "exemplary" or "for example" are used to mean serving as examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "e.g.," an embodiment of the present invention is not necessarily to be construed as preferred or advantageous over other embodiments or designs. Rather, use of the word "exemplary" or "such as" is intended to present concepts related in a concrete fashion. Further, in the description of the embodiments of the present invention, "a plurality" means two or more unless otherwise specified.
The embodiment of the invention provides a STP test environment deployment method. Specifically, referring to fig. 1, the STP test environment deployment method provided in the embodiment of the present invention includes the following steps S101 to S112:
s101, receiving a test application.
Specifically, the test application receiving may be a test application received by the network interface from another device, or a test application input by the user through an external device such as a keyboard, a mouse, or a microphone.
S102, analyzing the test application to determine environment deployment data corresponding to the test application.
Wherein the environment deployment material comprises: at least one software to be tested, a Message Digest Algorithm (MD 5) code for each software to be tested, at least one data packet, a version number for each data packet, and a configuration file.
Specifically, the corresponding relationship between the test application and the environment deployment data may be established and stored, and when the test application is received, the environment deployment data corresponding to the test application is determined by searching the corresponding relationship between the test application and the environment deployment data according to the test application.
Optionally, the test application is analyzed to determine that the environment deployment information corresponding to the test application can be displayed after the environment deployment information corresponding to the test application is determined, so that a worker can check the environment deployment information corresponding to the test application, the environment deployment information error corresponding to the test application is avoided, and the test accuracy is improved.
S103, judging whether the MD5 code of each software to be tested is consistent with the corresponding actual MD5 code one by one.
The actual MD5 code corresponding to any software to be tested is the MD5 code of the software to be tested, which is stored in a software configuration management tool (ClearCase, CC) library.
In the above step S103, if the MD5 code of any one of the software to be tested matches the corresponding actual MD5 code, the following step S104 is executed, and if the MD5 code of any one of the software to be tested does not match the corresponding actual MD5 code, the following step S105 is executed.
And S104, downloading the software to be tested from the CC library.
And S105, outputting the first prompt message.
Illustratively, the environmental deployment profile includes: the method comprises the steps that software to be tested 1, software to be tested 2 and software to be tested 3 are provided, the MD5 code of the software to be tested 1 is MD5 code 1, the MD5 code of the software to be tested 2 is MD5 code 2, the MD5 code of the software to be tested 3 is MD5 code 3, the MD5 code of the software to be tested 1 stored in a CC library is MD5 code 1, the MD5 code of the software to be tested 2 is MD5 code 4, and the MD5 code of the software to be tested 3 is MD5 code 3, whether the MD5 code of each software to be tested is consistent with the corresponding actual MD5 code is judged one by one according to the sequence of the software to be tested 1, the software to be tested 2 and the software to be tested 3, and because the MD5 code (MD5 code 1) of the software to be tested 1 is consistent with the corresponding actual MD5 code (MD5 code 1); since the MD5 code (MD5 code 2) of the software to be tested 2 does not coincide with the corresponding actual MD5 code (MD5 code 4), the first prompt information is output, and since the MD5 code (MD5 code 3) of the software to be tested 3 coincides with the corresponding actual MD5 code (MD5 code 3), the software to be tested 3 is downloaded from the CC library, and finally only the software to be tested 1 and the software to be tested 3 are downloaded from the CC library.
And S106, judging whether the version number of each data packet is consistent with the corresponding actual version number one by one.
And the actual version number corresponding to any data packet is the version number of the data packet stored in the CC library.
In the above step S106, if the MD5 code of any one of the software to be tested matches the corresponding actual MD5 code, the following step S107 is executed, and if the MD5 code of any one of the software to be tested does not match the corresponding actual MD5 code, the following step S108 is executed.
S107, downloading the data packet from the CC library.
And S108, outputting second prompt information.
Illustratively, the environmental deployment profile includes: the method comprises the following steps that a data packet A, a data packet B and a data packet C are provided, the version number of the data packet A is A, the version number of the data packet B is B, the version number of the data packet C is C, the version number of the data packet A stored in a CC library is A, the version number of the data packet B is D and the version number of the data packet C is C, whether the version number of each data packet is consistent with the corresponding actual version number or not is judged one by one according to the sequence of the data packet A, the data packet B and the data packet C, and the data packet A is downloaded from the CC library because the version number (A) of the data packet A is consistent with the corresponding actual version number (A); and (3) downloading the data packet A and the data packet C from the CC library because the version number (B) of the data packet B is not consistent with the corresponding actual version number (B), and the version number (C) of the data packet C is consistent with the corresponding actual version number (C).
S109, downloading the configuration file from the CC library.
It should be noted that, in the embodiment of the present invention, the order of downloading the software to be tested, the data package, and the configuration file from the CC library is not limited, the software to be tested, the data package, and the configuration file may be downloaded in any order, two of the software to be tested, the data package, and the configuration file may also be downloaded at the same time, and then the other one of the software to be tested, the data package, and the configuration file may also be downloaded at the same time. That is, in the embodiment of the present invention, the execution order of steps S103, S106, and S109 is not limited, and steps S103, S106, and S109 may be executed in any order.
In addition, before the steps S103, S106, and S109 are started to be executed, the STP test environment deployment method provided in the embodiment of the present invention may further include:
and clearing or newly building a folder for storing each software to be tested, each data packet and the configuration file.
S110, judging whether a data packet with the software to be tested or the version number inconsistent with the corresponding actual version number exists, wherein the MD5 code is inconsistent with the corresponding actual MD5 code.
In the above step S110, if there is no software to be tested whose MD5 code is inconsistent with the corresponding actual MD5 code, and there is no data packet whose version number is inconsistent with the corresponding actual version number, the following step S111 is executed, and if there is software to be tested whose MD5 code is inconsistent with the corresponding actual MD5 code, and/or there is a data packet whose version number is inconsistent with the corresponding actual version number, the following step S112 is executed.
And S111, deploying a test environment corresponding to the test application based on the software to be tested, the data packet and the configuration file downloaded from the CC library.
And S112, returning the test application.
After receiving a test application, the STP test environment deployment method provided by the embodiment of the invention firstly analyzes the test application to determine environment deployment information corresponding to the test application, then judging whether the MD5 code of each software to be tested is consistent with the corresponding actual MD5 code one by one, judging whether the version number of each data packet is consistent with the corresponding actual version number one by one, and downloading the software to be tested with the MD5 code consistent with the corresponding actual MD5 code, the data packet with the version number consistent with the corresponding actual version number and the configuration file from the software configuration management tool library, and finally, when the software to be tested without the MD5 code inconsistent with the corresponding actual MD5 code does not exist, and under the condition that no data packet with the version number inconsistent with the corresponding actual version number exists, deploying the test environment corresponding to the test application based on the software to be tested, the data packet and the configuration file downloaded from the CC library. Compared with the environment deployment for manually completing the STP test in the prior art, the STP test environment deployment method provided by the embodiment of the invention can automatically complete the deployment of the corresponding test environment only by inputting the test request, so that the efficiency and the accuracy for deploying the STP test environment are improved.
Further, referring to fig. 2, the step S111 (deploying the test environment corresponding to the test application based on the software to be tested, the data package and the configuration file downloaded from the CC library) includes:
s201, determining whether the communication state between the STP test environment deployment device and the environment deployment target machine is normal.
Specifically, the environment deployment target machine in the embodiment of the present invention is a device that deploys each software to be tested, each data package, and the configuration file.
Specifically, whether the communication state between the STP test environment deployment device and the environment deployment target machine is normal or not may be determined through the ping operation.
In the above step S201, if the communication state between the STP test environment deployment device and the environment deployment target machine is normal, the following step S202 is performed, and if the communication state between the STP test environment deployment device and the environment deployment target machine is abnormal, the following step S203 is performed.
And S202, displaying the first interface.
Wherein the first interface includes a first control.
Illustratively, as shown in fig. 3, the first control 31 may be a "one-key deployment" control.
And S203, outputting prompting information for prompting the communication state abnormity.
Illustratively, the prompt message may also include an IP address of the communication status anomaly.
And S204, receiving a first input of a user.
Wherein the first input is an input to the first control.
Specifically, the first input in the embodiment of the present invention may specifically be a click operation of the first control by the user, or a voice instruction input by the user, or a specific gesture input by the user. In some embodiments of the present invention, the specific gesture may be any one of a single-tap gesture, a sliding gesture, a pressure recognition gesture, a long-press gesture, an area change gesture, a double-press gesture, and a double-tap gesture.
S205, responding to the first input, and storing the to-be-tested software, the data packets and the configuration file to corresponding positions according to a preset format.
Namely, storing each software to be tested, each data packet and the configuration file into the environment deployment target machine according to a preset format.
And S206, displaying a second interface.
Wherein the second interface includes a second control and a third control.
Illustratively, referring to fig. 4, the second interface may further include a prompt "whether to start the test program", the second control 41 is a control "yes" for selecting to start the test program, and the third control 42 is a control "no" for selecting not to start the test program.
The following step S207 or S208 is performed according to the user input:
and S207, receiving a second input of the user to the second control, and starting a test program in response to the second input.
S208, receiving a third input of the user to the third control, and returning to the first interface in response to the third input.
The second input and the third input in the embodiment of the present invention may also be a click operation of a control by a user, or a voice instruction input by the user, or a specific gesture input by the user.
Compared with the method of manually storing the software to be tested, the data packets and the configuration file to the environment deployment target machine, the embodiment can automatically store the software to be tested, the data packets and the configuration file to the corresponding positions, and therefore the embodiment can further improve the efficiency and accuracy of deploying the STP test environment.
Optionally, the first interface in the above embodiment further includes: a fourth control.
Illustratively, referring to fig. 5, the fourth control 51 may be a "software deployment" control.
Referring to fig. 6, the STP test environment deployment method provided in the embodiment of the present invention further includes:
and S61, receiving a fourth input of the user.
Wherein the fourth input is an input to the fourth control.
And S62, responding to the fourth input, and displaying a software list to be tested, wherein the software list comprises all software to be tested.
Specifically, the software to be tested in the software to be tested list can be displayed in a classified manner according to the classification of the software. The classification of the software to be tested may include: ground software to be tested, vehicle-mounted software to be tested, terminal software to be tested, interlocking software to be tested and the like.
And S63, receiving the input of the user to the target software to be tested in the list of the software to be tested.
And S64, restarting the test program after updating the target software to be tested to the corresponding position.
Optionally, the first interface in the above embodiment further includes: and a fifth control.
Illustratively, referring to FIG. 7, the fifth control 71 may be a "History configuration" control.
Referring to fig. 8, the STP test environment deployment method provided in the embodiment of the present invention further includes:
and S81, receiving a fifth input of the user.
Wherein the fifth input is an input to the fifth control.
S82, responding to the fifth input, and displaying a first configuration file list.
Wherein the first profile list includes all historical profiles.
Specifically, the historical configuration files in the first configuration file list may be displayed in a classified manner according to the classification of the configuration files. The classification of the configuration file may include: a ground profile, a vehicle profile, a terminal profile, an interlock profile, etc.
And S83, receiving the input of the user to the target historical configuration file in the first configuration file list.
S84, responding to the input of the target historical configuration file in the first configuration file list by the user, and displaying the target historical configuration file.
And S85, receiving the modification of the target historical configuration file and saving the modified configuration file.
Optionally, the first interface in the above embodiment further includes: a sixth control.
Illustratively, referring to fig. 9, the sixth control 91 may be a "configuration deployment" control.
Referring to fig. 10, the STP test environment deployment method provided in the embodiment of the present invention further includes:
and S91, receiving a sixth input of the user.
Wherein the sixth input is an input to the sixth control.
S92, in response to the sixth input, displaying a second list of profiles.
Wherein the second list of profiles comprises all profiles.
And S93, receiving the input of the user to the target configuration file in the second configuration file list.
And S94, restarting the test program after updating the target configuration file to the corresponding position.
Based on the same inventive concept, as an implementation of the foregoing method, an embodiment of the present invention further provides an STP test environment deployment apparatus, where an embodiment of the apparatus corresponds to the foregoing method embodiment, and for convenience of reading, details in the foregoing method embodiment are not repeated in this apparatus embodiment one by one, but it should be clear that the apparatus in this embodiment can correspondingly implement all the contents in the foregoing method embodiment.
Fig. 11 is a schematic structural diagram of an STP test environment deployment apparatus according to an embodiment of the present invention, and as shown in fig. 11, an STP test environment deployment apparatus 1100 according to the embodiment includes:
a receiving unit 1101, configured to receive a test application, where the test application carries data information;
an analyzing unit 1102, configured to analyze the test application to determine an environment deployment material corresponding to the test application, where the environment deployment material includes: the software testing method comprises the following steps that at least one piece of software to be tested, a message digest algorithm MD5 code of each piece of software to be tested, at least one data packet, a version number of each data packet and a configuration file are obtained;
the determining unit 1103 is configured to determine whether the MD5 code of each software to be tested is consistent with the corresponding actual MD5 code one by one, where the actual MD5 code corresponding to any software to be tested is the MD5 code of the software to be tested stored in the software configuration management tool CC library;
the downloading unit 1104 is used for downloading the software to be tested from the CC library when the MD5 code of any software to be tested is consistent with the corresponding actual MD5 code;
the determining unit 1103 is further configured to determine whether the version number of each data packet is consistent with a corresponding actual version number one by one, where the actual version number corresponding to any data packet is the version number of the data packet stored in the CC library;
the downloading unit 1104 is further configured to download any data packet from the CC library when the version number of the data packet is consistent with the corresponding actual version number;
the downloading unit 1104 is further configured to download the configuration file from the CC library;
the processing unit 1105 is configured to deploy the test environment corresponding to the test application based on the software to be tested, the data package, and the configuration file downloaded from the CC library, in the case that there is no software to be tested whose MD5 code is inconsistent with the corresponding actual MD5 code, and there is no data package whose version number is inconsistent with the corresponding actual version number.
As an optional implementation manner of the embodiment of the present invention, the determining unit 1103 is further configured to output a first prompt message when the MD5 code of any software to be tested is inconsistent with the corresponding actual MD5 code;
the first prompt message is used for prompting that the MD5 code of the software to be tested has an error.
As an optional implementation manner of the embodiment of the present invention, the determining unit 1103 is further configured to output a second prompt message when the version number of any data packet is inconsistent with the corresponding actual version number;
the second prompt message is used for prompting that the version number of the data packet has an error.
As an optional implementation manner of the embodiment of the present invention, the processing unit 1105 is further configured to return the test application in a case that there exists software to be tested whose MD5 code does not conform to the corresponding actual MD5 code and/or there exists a data packet whose version number does not conform to the corresponding actual version number.
As an optional implementation manner of the embodiment of the present invention, referring to fig. 12, the STP test environment deployment apparatus 1100 further includes:
a display unit 1106, configured to display a first interface, where the first interface includes a first control;
the receiving unit 1101 is further configured to receive a first input of a user, where the first input is an input to the first control;
the processing unit 1105 is specifically configured to respond to the first input, and store each software to be tested, each data packet, and the configuration file to a corresponding location according to a preset format.
As an optional implementation manner of the embodiment of the present invention, the display unit 1106 is further configured to display a second interface after storing, based on the first input, each piece of software to be tested, each data packet, and the configuration file to a target location according to a preset format, where the second interface includes a second control and a third control;
the receiving unit 1101 is further configured to receive a second input to the second control from the user; the processing unit 1105, further configured to start a test program in response to the second input;
or;
the receiving unit 1101 is further configured to receive a third input to the third control from the user; the display unit 1106 is further configured to return to the first interface in response to the third input.
As an optional implementation manner of the embodiment of the present invention, the first interface further includes a fourth control;
the receiving unit 1101 is further configured to receive a fourth input of the user, where the fourth input is an input to the fourth control;
the display unit 1106 is further configured to display a software list to be tested in response to the fourth input, where the software list includes all software to be tested;
the receiving unit 1101 is further configured to receive an input of a user to a target software to be tested in the software to be tested list;
the processing unit 1105 is further configured to restart the test program after the target software to be tested is updated to the corresponding location.
As an optional implementation manner of the embodiment of the present invention, the first interface further includes a fifth control;
the receiving unit is further configured to receive a fifth input of a user, where the fifth input is an input to the fifth control;
the display unit 1106 is further configured to display a first configuration file list in response to the fifth input, where the first configuration file list includes all historical configuration files;
the receiving unit 1101 is further configured to receive an input of a user to a target history profile in the first profile list;
the display unit 1106 is further configured to display a target historical profile in the first profile list in response to a user input of the target historical profile;
the receiving unit 1101 is further configured to receive a modification to the target history configuration file.
The processing unit 1105 is further configured to save the modified configuration file.
As an optional implementation manner of the embodiment of the present invention, the first interface further includes a sixth control;
the receiving unit 1101 is configured to receive a sixth input of the user, where the sixth input is an input to the sixth control;
the display unit 1106 is further configured to display a second configuration file list in response to the sixth input, where the second configuration file list includes all configuration files;
the receiving unit 1101 is further configured to receive an input of a user to a target profile in the second profile list;
the processing unit 1105 is further configured to restart the test program after the target configuration file is updated to the corresponding location.
The STP test environment deployment apparatus provided in this embodiment may execute the STP test environment deployment method provided in the foregoing method embodiment, and the implementation principle and the technical effect are similar, and are not described herein again.
Based on the same inventive concept, the embodiment of the invention also provides electronic equipment. Fig. 13 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, and as shown in fig. 13, the electronic device according to the embodiment includes: a memory 131 and a processor 132, the memory 131 being for storing computer programs; the processor 132 is configured to execute the steps of the STP test environment deployment method according to the above-described method embodiments when the computer program is called.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when being executed by a processor, the computer program implements the STP test environment deployment method described in the above method embodiments.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media having computer-usable program code embodied in the medium.
The processor may be a Central Processing Unit (CPU), other general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware component, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.
Computer readable media include both permanent and non-permanent, removable and non-removable storage media. Storage media may implement information storage by any method or technology, and the information may be computer-readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include transitory computer readable media (transmyedia) such as modulated data signals and carrier waves.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.
Claims (10)
1. An STP test environment deployment method is characterized by comprising the following steps:
receiving a test application;
analyzing the test application to determine environment deployment information corresponding to the test application, wherein the environment deployment information comprises: the software testing method comprises the following steps that at least one piece of software to be tested, a message digest algorithm MD5 code of each piece of software to be tested, at least one data packet, a version number of each data packet and a configuration file are obtained;
judging whether the MD5 code of each software to be tested is consistent with the corresponding actual MD5 code one by one, wherein the actual MD5 code corresponding to any software to be tested is the MD5 code of the software to be tested, which is stored in a software configuration management tool (CC) library;
if the MD5 code of any software to be tested is consistent with the corresponding actual MD5 code, downloading the software to be tested from the CC library;
judging whether the version number of each data packet is consistent with the corresponding actual version number one by one, wherein the actual version number corresponding to any data packet is the version number of the data packet stored in the CC library;
if the version number of any data packet is consistent with the corresponding actual version number, downloading the data packet from the CC library;
downloading the configuration file from the CC library;
and under the condition that the software to be tested with the MD5 code inconsistent with the corresponding actual MD5 code does not exist, and the data package with the version number inconsistent with the corresponding actual version number does not exist, deploying the test environment corresponding to the test application based on the software to be tested, the data package and the configuration file downloaded from the CC library.
2. The method of claim 1, further comprising:
if the MD5 code of any software to be tested is inconsistent with the corresponding actual MD5 code, outputting first prompt information;
the first prompt message is used for prompting that the MD5 code of the software to be tested has an error.
3. The method of claim 1, further comprising:
if the version number of any data packet is not consistent with the corresponding actual version number, outputting second prompt information;
the second prompt message is used for prompting that the version number of the data packet has an error.
4. The method of claim 1, further comprising:
and returning the test application under the condition that the software to be tested with the MD5 code inconsistent with the corresponding actual MD5 code exists and/or the data packet with the version number inconsistent with the corresponding actual version number exists.
5. The method according to any one of claims 1-4, wherein said deploying the test environment corresponding to the test application based on the software to be tested, the data package and the configuration file downloaded from the CC library comprises:
displaying a first interface, the first interface comprising a first control;
receiving a first input of a user, wherein the first input is an input of the first control;
and responding to the first input, and storing each software to be tested, each data packet and the configuration file to corresponding positions according to a preset format.
6. The method of claim 5, wherein after storing each software to be tested, each data package, and the configuration file to a target location according to a preset format based on the first input, the method further comprises:
displaying a second interface, the second interface comprising a second control and a third control;
receiving a second input of the second control by the user, and starting a test program in response to the second input;
or;
and receiving a third input of the third control by the user, and returning to the first interface in response to the third input.
7. The method of claim 5, wherein the first interface further comprises a fourth control, the method further comprising:
receiving a fourth input of the user, wherein the fourth input is an input of the fourth control;
responding to the fourth input, and displaying a software list to be tested, wherein the software list comprises all software to be tested;
receiving input of a user to target software to be tested in the software to be tested list;
and restarting the test program after updating the target software to be tested to the corresponding position.
8. The method of claim 5, wherein the first interface further comprises a fifth control, the method further comprising:
receiving a fifth input of the user, wherein the fifth input is an input to the fifth control;
in response to the fifth input, displaying a first profile list, the first profile list including all historical profiles;
receiving user input of a target historical configuration file in the first configuration file list;
displaying a target historical profile in the first profile list in response to a user input of the target historical profile;
and receiving the modification of the target historical configuration file, and saving the modified configuration file.
9. The method of claim 5, wherein the first interface further comprises a sixth control, the method further comprising:
receiving a sixth input of the user, wherein the sixth input is an input to the sixth control;
in response to the sixth input, displaying a second list of profiles, the second list of profiles comprising all profiles;
receiving user input of a target configuration file in the second configuration file list;
and restarting the test program after updating the target configuration file to the corresponding position.
10. An STP test environment deployment device, comprising:
the device comprises a receiving unit, a processing unit and a processing unit, wherein the receiving unit is used for receiving a test application, and the test application carries data information;
the analysis unit is used for analyzing the test application to determine environment deployment information corresponding to the test application, and the environment deployment information comprises: the software testing method comprises the following steps that at least one piece of software to be tested, a message digest algorithm MD5 code of each piece of software to be tested, at least one data packet, a version number of each data packet and a configuration file are obtained;
the judging unit is used for judging whether the MD5 code of each software to be tested is consistent with the corresponding actual MD5 code one by one, and the actual MD5 code corresponding to any software to be tested is the MD5 code of the software to be tested stored in the software configuration management tool CC library;
the downloading unit is used for downloading the software to be tested from the CC library when the MD5 code of any software to be tested is consistent with the corresponding actual MD5 code;
the judging unit is further configured to judge whether the version number of each data packet is consistent with a corresponding actual version number one by one, where the actual version number corresponding to any data packet is the version number of the data packet stored in the CC library;
the downloading unit is further configured to download the data packet from the CC library when the version number of any data packet is consistent with the corresponding actual version number;
the downloading unit is further configured to download the configuration file from the CC library;
and the processing unit is used for deploying the test environment corresponding to the test application based on the software to be tested, the data package and the configuration file downloaded from the CC library under the condition that the software to be tested with the MD5 code inconsistent with the corresponding actual MD5 code does not exist and the data package with the version number inconsistent with the corresponding actual version number does not exist.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010620551.3A CN111797018A (en) | 2020-07-01 | 2020-07-01 | STP test environment deployment method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010620551.3A CN111797018A (en) | 2020-07-01 | 2020-07-01 | STP test environment deployment method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111797018A true CN111797018A (en) | 2020-10-20 |
Family
ID=72809807
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010620551.3A Pending CN111797018A (en) | 2020-07-01 | 2020-07-01 | STP test environment deployment method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111797018A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20230244587A1 (en) * | 2022-01-31 | 2023-08-03 | Volvo Car Corporation | Computer-Implemented Method for Performing a System Assessment |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030182652A1 (en) * | 2001-12-21 | 2003-09-25 | Custodio Gabriel T. | Software building and deployment system and method |
US20130318397A1 (en) * | 2012-05-23 | 2013-11-28 | Shawn Jamison | Automated Build, Deploy, and Testing Environment for Firmware |
CN105677410A (en) * | 2016-01-05 | 2016-06-15 | 太仓市同维电子有限公司 | Method for downloading test program through server |
CN109388535A (en) * | 2018-10-09 | 2019-02-26 | 郑州云海信息技术有限公司 | A kind of storing performance testing method, device and application server |
US20190294528A1 (en) * | 2018-03-26 | 2019-09-26 | Ca, Inc. | Automated software deployment and testing |
CN110825645A (en) * | 2019-11-11 | 2020-02-21 | 卡斯柯信号(北京)有限公司 | Assembly line type full-process automatic testing method |
-
2020
- 2020-07-01 CN CN202010620551.3A patent/CN111797018A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030182652A1 (en) * | 2001-12-21 | 2003-09-25 | Custodio Gabriel T. | Software building and deployment system and method |
US20130318397A1 (en) * | 2012-05-23 | 2013-11-28 | Shawn Jamison | Automated Build, Deploy, and Testing Environment for Firmware |
CN105677410A (en) * | 2016-01-05 | 2016-06-15 | 太仓市同维电子有限公司 | Method for downloading test program through server |
US20190294528A1 (en) * | 2018-03-26 | 2019-09-26 | Ca, Inc. | Automated software deployment and testing |
CN109388535A (en) * | 2018-10-09 | 2019-02-26 | 郑州云海信息技术有限公司 | A kind of storing performance testing method, device and application server |
CN110825645A (en) * | 2019-11-11 | 2020-02-21 | 卡斯柯信号(北京)有限公司 | Assembly line type full-process automatic testing method |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20230244587A1 (en) * | 2022-01-31 | 2023-08-03 | Volvo Car Corporation | Computer-Implemented Method for Performing a System Assessment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107657177B (en) | Vulnerability detection method and device | |
CN109710508B (en) | Test method, test device, test apparatus, and computer-readable storage medium | |
CN107766236B (en) | Test task automatic management method, device, equipment and storage medium | |
CN109062667B (en) | Simulator identification method, simulator identification equipment and computer readable medium | |
CN108197476B (en) | Vulnerability detection method and device for intelligent terminal equipment | |
CN107729750A (en) | With reference to configuration information and the Android simulator detection method and device of ardware feature | |
CN112634973A (en) | Data rereading method and system of storage medium, terminal device and storage medium | |
CN112149136A (en) | loT device firmware vulnerability detection method and system and electronic device | |
CN110032505B (en) | Software quality determination apparatus and method, and non-transitory computer readable medium | |
CN111797018A (en) | STP test environment deployment method and device | |
CN110414218B (en) | Kernel detection method and device, electronic equipment and storage medium | |
CN115686961A (en) | Processor testing method and device and electronic equipment | |
CN110704311A (en) | Application program testing method and device, electronic equipment and readable storage medium | |
CN110889116A (en) | Advertisement blocking method and device and electronic equipment | |
CN109560964B (en) | Equipment compliance checking method and device | |
CN110990833B (en) | SDK safety detection method and related equipment | |
CN110908701B (en) | Firmware version switching method and device, storage medium and electronic equipment | |
US11397662B2 (en) | Method for debugging computer program, device employing method, and storage medium | |
CN117272308A (en) | Software security test method, device, equipment, storage medium and program product | |
CN115795489A (en) | Software vulnerability static analysis method and device based on hardware-level process tracking | |
CN116302964A (en) | Safety test method, test equipment and medium of software system | |
CN115840707A (en) | Flash test method, device and medium | |
CN113342600A (en) | Method and device for monitoring program dependent plug-in | |
CN115314413A (en) | CAN signal testing method and device | |
CN113918384A (en) | Data saving method, device, equipment and storage medium |
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 |