CN110688305A - Test environment synchronization method, device, medium and electronic equipment - Google Patents

Test environment synchronization method, device, medium and electronic equipment Download PDF

Info

Publication number
CN110688305A
CN110688305A CN201910817291.6A CN201910817291A CN110688305A CN 110688305 A CN110688305 A CN 110688305A CN 201910817291 A CN201910817291 A CN 201910817291A CN 110688305 A CN110688305 A CN 110688305A
Authority
CN
China
Prior art keywords
subsystem
test environment
subsystems
identifications
configuration item
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910817291.6A
Other languages
Chinese (zh)
Other versions
CN110688305B (en
Inventor
严歌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Puhui Enterprise Management Co Ltd
Original Assignee
Ping An Puhui Enterprise Management Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Puhui Enterprise Management Co Ltd filed Critical Ping An Puhui Enterprise Management Co Ltd
Priority to CN201910817291.6A priority Critical patent/CN110688305B/en
Publication of CN110688305A publication Critical patent/CN110688305A/en
Application granted granted Critical
Publication of CN110688305B publication Critical patent/CN110688305B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3664Environments for testing or debugging software

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)

Abstract

The disclosure relates to the technical field of system integration testing, and discloses a testing environment synchronization method, a testing environment synchronization device, a testing environment synchronization medium and electronic equipment. The method comprises the following steps: acquiring configuration item parameter values of subsystems in a first test environment, wherein the first test environment comprises at least one subsystem, and each subsystem in the subsystems has at least one configuration item parameter value; acquiring subsystem identifications of subsystems in a second test environment to be established; and synchronizing the configuration item parameter values of the subsystems in the first test environment to the second test environment based on the configuration item parameter values of the subsystems and the subsystem identifications of the subsystems. Under the condition that the corresponding test environment is established, if the test environment is to be newly added, the corresponding configuration item parameter values in the original test environment are directly synchronized to the test environment to be newly added, so that the configuration item setting efficiency and accuracy can be improved, and the test efficiency can be improved.

Description

Test environment synchronization method, device, medium and electronic equipment
Technical Field
The present disclosure relates to the field of system integration testing technologies, and in particular, to a method, an apparatus, a medium, and an electronic device for synchronizing a test environment.
Background
With the development of software engineering, upsizing, integration and systemization have become a trend of current software development. In order to improve the quality of a software system during formal release and reduce software bugs as much as possible, the software system is often required to be tested, including functional test, performance test and the like.
In the implementation of the prior art, a test environment is usually set up for testing software, and a plurality of subsystems are simultaneously tested in the test environment; in order to ensure the general applicability and reliability of software, different test environments are often required to be built for the same software, and when one created test environment has a plurality of servers with the same resources as those of the servers in the previously built test environment, a new test environment is considered to be created.
The prior art has the defects that the calling relationship between the subsystems in the new test environment needs to be partially or completely consistent with the calling relationship between the subsystems in the original test environment, and the number of the subsystems in the new test environment is large, so that a large number of configuration items need to be set for the new test environment, the setting efficiency of the configuration items is low, and the setting accuracy of the configuration items may be low.
Disclosure of Invention
In the technical field of system integration testing, the invention provides a testing environment synchronization method, a device, a medium and electronic equipment, aiming at solving the technical problems of low efficiency and accuracy of setting configuration items when a testing environment is newly added in the related technology.
According to an aspect of the present application, there is provided a test environment synchronization method, including:
acquiring configuration item parameter values of subsystems in a first test environment, wherein the first test environment comprises at least one subsystem, and each subsystem in the subsystems has at least one configuration item parameter value;
acquiring subsystem identifications of subsystems in a second test environment to be established;
and synchronizing the configuration item parameter values of the subsystems in the first test environment to the second test environment based on the configuration item parameter values of the subsystems and the subsystem identifications of the subsystems.
According to another aspect of the present application, there is provided a test environment synchronization apparatus, comprising:
the system comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is configured to acquire configuration item parameter values of subsystems in a first test environment, the first test environment comprises at least one subsystem, and each subsystem in the subsystems has at least one configuration item parameter value;
the second acquisition module is configured to acquire subsystem identifications of subsystems in a second test environment to be established;
a synchronization module configured to synchronize the configuration item parameter values of the subsystems in the first test environment to the second test environment based on the configuration item parameter values of the subsystems and the subsystem identifications of the subsystems.
According to another aspect of the present application, there is provided a computer readable program medium storing computer program instructions which, when executed by a computer, cause the computer to perform the method as previously described.
According to another aspect of the present application, there is provided an electronic device including:
a processor;
a memory having computer readable instructions stored thereon which, when executed by the processor, implement the method as previously described.
The technical scheme provided by the embodiment of the invention can have the following beneficial effects:
the test environment synchronization method provided by the invention comprises the following steps of obtaining configuration item parameter values of subsystems in a first test environment, wherein the first test environment comprises at least one subsystem, and each subsystem in each subsystem has at least one configuration item parameter value; acquiring subsystem identifications of subsystems in a second test environment to be established; and synchronizing the configuration item parameter values of the subsystems in the first test environment to the second test environment based on the configuration item parameter values of the subsystems and the subsystem identifications of the subsystems.
Under the condition that the corresponding test environment is established, when the test environment is to be newly added, the parameter values of the configuration items of the subsystems in the original test environment are directly synchronized to the test environment to be newly added, so that part or all of the original complicated and tedious work of adding the configuration items in a manual mode when the test environment is newly added can be automatically completed, the configuration item setting efficiency is improved, and meanwhile, the accuracy of setting the configuration items can be improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention, as claimed.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
FIG. 1 is a schematic diagram of an application scenario of a test environment synchronization method shown in accordance with an exemplary embodiment;
FIG. 2 is a flow diagram illustrating a test environment synchronization method in accordance with an exemplary embodiment;
FIG. 3 is a flowchart illustrating steps prior to step 240 according to one embodiment illustrated in a corresponding embodiment of FIG. 2;
FIG. 4 is a flowchart detailing step 230 according to one embodiment shown in a corresponding embodiment of FIG. 3;
FIG. 5 is a flowchart detailing step 231 according to one embodiment shown in a corresponding embodiment in FIG. 4;
FIG. 6 is a flowchart illustrating steps preceding step 240 and details of step 240 according to one embodiment illustrated in a corresponding embodiment of FIG. 2;
FIG. 7 is a block diagram illustrating a test environment synchronization apparatus in accordance with an exemplary embodiment;
FIG. 8 is a block diagram illustrating an example of an electronic device implementing the above-described method in accordance with one illustrative embodiment;
fig. 9 is a diagram illustrating a computer-readable storage medium implementing the above-described method according to an example embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the invention, as detailed in the appended claims.
Furthermore, the drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus their repetitive description will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities.
The present disclosure first provides a test environment synchronization method. The test environment refers to a collection of entities such as a software environment, a hardware environment, and data and a network, which are included in the software test. The software to be tested may be small software, such as APP (Application), or may be an integrated large software system, such as a database management system, a financial management system, or the like. For simplicity of description, in one or more embodiments of the present application, the present application will set forth the subject matter of the present application from the perspective of a hardware as well as a software system. The test environment may include one or more subsystems, that is, the subsystems need to be tested in a simultaneous manner, setting configuration items for the subsystems is an indispensable link for performing the simultaneous testing on the subsystems, and the configuration items are the basis of the joint operation of the subsystems and record information required by the joint operation of the subsystems, such as a system interface call relationship between the two subsystems. For the testing environment synchronization method provided by the present disclosure, if a testing environment is to be newly added, if related subsystems are already configured in the existing testing environment, configuration items configured for the related subsystems are directly synchronized to the newly added testing environment, and manual configuration of the related subsystems is not required to be repeatedly performed, so that configuration efficiency of the newly added testing environment can be improved, and thus, testing efficiency can be improved.
The implementation terminal of the technical scheme of the disclosure can be a portable mobile device, such as a smart phone, a tablet computer, a notebook computer, etc.; or various stationary devices, such as computer devices, field terminals, desktop computers, servers, workstations, etc.; in addition, a server cluster, a physical infrastructure of cloud computing, and the like may also be used.
FIG. 1 is a schematic diagram illustrating an application scenario of a test environment synchronization method according to an exemplary embodiment. As shown in fig. 1, the testing system comprises a first testing environment 110 and a second testing environment 130, wherein the first testing environment 110 comprises four first servers 120, and the second testing environment 130 comprises four second servers 140. Each server can run a subsystem, the subsystems are connected through a communication link, the interconnected subsystems have interdependent relations, for example, interface calling relations exist among the subsystems, the interdependent relations enable the subsystems in the same test environment to cooperate together to complete one or more tasks, and the configuration items are key elements for constructing the interdependent relations among the subsystems, namely the configuration items determine how the two subsystems are related in one test environment. If the first test environment 110 is an existing test environment, a second test environment 130 may need to be added for more comprehensive testing of the subsystems in the first test environment 110, for example, for the purpose of testing whether the subsystems can stably run after the hardware environment is changed, testing different functions of the subsystems, and the like. The second server 140 in the newly added second testing environment 130 may be partially or completely different from the first server 110 in the first testing environment 110 (fig. 1 only shows the case where all servers in both testing environments are not the same). In the prior art, no matter whether the dependency relationship between the subsystems in the newly added test environment is the same as the previously established test environment, all configuration items need to be manually set for the subsystems in the newly added test environment, and the complicated work usually consumes a large amount of time in the establishment process of the test environment and has low setting efficiency of the configuration items, so that the test efficiency can be seriously reduced. The inventor of the present application has recognized that, although the servers in the two test environments may all be different, the dependency relationship between the subsystems operated by the servers in the two test environments, that is, the configuration items required to be set for each subsystem when building the test environment may be partially or completely the same, and if these same partial configuration items are synchronized directly from the already-established first test environment 110 to the second test environment 130 to be added, the number of configuration items required to be manually configured when building the second test environment 130 may be reduced to some extent, so that the setting efficiency of the configuration items may be improved.
FIG. 2 is a flow diagram illustrating a test environment synchronization method in accordance with an exemplary embodiment. As shown in fig. 2, the method comprises the following steps:
step 210, obtaining configuration item parameter values of each subsystem in the first test environment.
Wherein the first test environment comprises at least one subsystem, each of the subsystems having at least one configuration item parameter value.
The configuration items are various setting items which are required to be configured when each subsystem in the first test environment runs, such as subsystem calls or dependent interfaces. The configuration item parameter values are contents which need to be specifically set when the subsystem runs, the relationship between the configuration item and the configuration item parameter values is similar to the relationship between the parameters and the parameter values, for the configuration item of the interface type of one subsystem, the corresponding configuration item parameter values can be represented as an interface which is actually called by the subsystem, and the configuration item parameter values at the moment determine what the interfaces between the subsystems in the first test environment are and how the interfaces are called. Therefore, the parameter value of the configuration item is the basis for the coordinated operation of the subsystems in the first test environment, and the subsystem in the first test environment can be jointly tested only if the correct parameter value of the configuration item exists.
In one embodiment, the configuration item parameter values are blocks of code representing calling relationships between subsystems.
In an embodiment, the obtaining the parameter value of the configuration item of each subsystem in the first test environment is stored on a terminal of the first test environment after the first test environment is established, and includes: sending a configuration item parameter value acquisition request to a terminal of a first test environment; and the terminal receiving the first test environment acquires the parameter value of the configuration item returned by the request according to the parameter value of the configuration item.
In one embodiment, the implementation terminal of the present disclosure is embedded with a script, and the obtaining of the configuration item parameter values of the subsystems in the first test environment includes: and crawling each subsystem in the first test environment by using a script to obtain the parameter values of the configuration items of each subsystem in the first test environment.
In an embodiment, after each test environment is established, the configuration item parameter values of the subsystems in the test environment are stored in the database corresponding to the name of the test environment, and the obtaining the configuration item parameter values of the subsystems in the first test environment includes: and querying a database by using the name of the first test environment to obtain the parameter values of the configuration items of each subsystem in the first test environment.
Step 220, obtaining subsystem identifications of subsystems in the second testing environment to be established.
As mentioned above, the test environment refers to a collection of entities such as a software environment, a hardware environment, and data and a network covered when performing software test. The second test environment to be established may also include one or more subsystems, and thus configuration items need to be set for the subsystems in the second test environment.
Each test environment needs configuration items to control the interface call relationship between subsystems. Therefore, if the interface calling relationship between some or all subsystems in the second test environment to be established is consistent with that in the first test environment, that is, the corresponding configuration items are consistent, the configuration items can be set by synchronizing the consistent configuration items to the second test environment to be established.
The subsystem identity is a string that uniquely identifies the subsystem identity in a test environment.
In one embodiment, the subsystem identification includes a subsystem name and a subsystem serial number, wherein the subsystem name defines an identity of the subsystem, and the subsystem serial number defines an establishment sequence of a test environment to which a subsystem belongs under the same subsystem name.
For example, for the same subsystem, the subsystem id may be a1, a2, A3, etc., where the three subsystem ids all include the character "a" to represent that the three subsystems are all a systems, and the character "a" of the subsystem id is followed by 1,2,3, etc., to represent that the subsystem a is located in the first, second, and third environments established by the subsystem a, respectively.
In one embodiment, the subsystem identification includes, in addition to the subsystem name and the subsystem serial number: the subsystem calls the sequence number. For example, the subsystem identities of the subsystems in the second test environment may be a21, D22, B23, and C24, respectively, where the third character of each subsystem identity is a subsystem call sequence number, and the subsystem call sequence number in each subsystem identity determines how each subsystem is called in the second test environment. For example, since the subsystem call sequence numbers in the four subsystem identifiers, i.e., a21, D22, B23, and C24, are 1,2,3, and 4, respectively, the subsystem call sequence in the second test environment is that a21 calls D22, D22 calls B23, and B23 calls C24.
In one embodiment, the step of obtaining the subsystem identifier of each subsystem in the second test environment to be established includes: and inquiring the preset corresponding relation table of the test environment name and the subsystem identification by using the name of the second test environment to obtain the subsystem identification of each subsystem in the second test environment.
In one embodiment, the implementation terminal of the present disclosure is embedded with a script, and the obtaining subsystem identifiers of subsystems in the second test environment to be established includes: and crawling the subsystem identification of each subsystem in the second test environment to be established by utilizing the script.
And step 240, synchronizing the configuration item parameter values of the subsystems in the first test environment to the second test environment based on the configuration item parameter values of the subsystems and the subsystem identifications of the subsystems.
In one embodiment, the acquiring configuration item parameter values of subsystems in a first test environment corresponds to configuration items, a preset subsystem identifier and configuration item correspondence table correspondingly stores correspondence between subsystem identifiers and configuration items, and the synchronizing the configuration item parameter values of the subsystems in the first test environment to the second test environment based on the configuration item parameter values of the subsystems and the subsystem identifiers of the subsystems includes:
acquiring configuration items corresponding to the subsystem identifications of the subsystems as first configuration items by inquiring a preset corresponding relation table of the subsystem identifications and the configuration items;
acquiring configuration items corresponding to the configuration item parameter values of the subsystems as second configuration items;
and synchronizing the parameter values of the configuration items corresponding to the second configuration items which are the same as the first configuration items to the second test environment under the condition that at least one configuration item in the second configuration items is the same as the first configuration item.
For example, the subsystem identifier and configuration item correspondence table may be as follows:
subsystem identification A1 B1 D1 C1
Configuration item XX1 XX2 XX3 XX4
Subsystem association code b1 d1 c1
As can be seen from the above table, in addition to the subsystem identification and configuration entries, the table also contains subsystem association codes that define the subsystem called by each subsystem. It is worth mentioning that in order to make each entry in the table unique, the letter part in the subsystem association code is set to a lower case letter corresponding to the upper case letter in the subsystem identification compared to the corresponding subsystem identification, wherein the configuration item XX4 does not correspond to the subsystem association code, indicating that the subsystem identified as C1 does not invoke the subsystem.
In one embodiment, a correspondence table between configuration item parameter values and configuration items is preset, and the obtaining a configuration item corresponding to a configuration item parameter value of each subsystem as a second configuration item includes:
and acquiring the configuration items corresponding to the configuration item parameter values of the subsystems as second configuration items by inquiring a preset corresponding relation table of the configuration item parameter values and the configuration items.
In one embodiment, the synchronizing the configuration item parameter values of the subsystems in the first test environment to the second test environment based on the configuration item parameter values of the subsystems and the subsystem identifications of the subsystems includes:
determining a reference configuration item parameter value corresponding to a subsystem identity code in the subsystem identification of each subsystem by querying a database;
determining a configuration item parameter value matched with the reference configuration item parameter value from the configuration item parameter values of the subsystems in the first test environment;
and synchronizing the determined parameter values of the configuration items to the second test environment.
In one embodiment, the determining, from among the configuration item parameter values of the subsystems in the first test environment, a configuration item parameter value that matches the reference configuration item parameter value includes:
for each reference configuration item parameter value, acquiring the number of characters of the configuration item parameter value which is the same as the reference configuration item parameter value for each configuration item parameter value in the configuration item parameter values of the subsystems in the first test environment; determining the maximum number of configuration item parameter values; and taking the configuration item parameter value corresponding to the maximum number as the configuration item parameter value matched with the reference configuration item parameter value under the condition that the number corresponding to the configuration item parameter value is larger than a preset character number threshold value.
In summary, according to the test environment synchronization method provided in the embodiment of fig. 2, under the condition that the corresponding test environment is already established, when a test environment is to be newly added, the parameter values of the configuration items of the subsystems in the original test environment are directly synchronized to the test environment to be newly added, so that the setting efficiency and accuracy of the configuration items can be improved.
Fig. 3 is a flowchart of the steps preceding step 240 according to one embodiment shown in the corresponding embodiment of fig. 2. As shown in fig. 3, the method comprises the following steps:
step 230, determining that parameter values of configuration items of each subsystem in the first test environment can be synchronized to the second test environment according to the subsystem identifier.
In one embodiment, the obtaining of the configuration item parameter value of each subsystem in the first test environment corresponds to a configuration item, the correspondence between the subsystem identifier and the configuration item is stored in a preset subsystem identifier and configuration item correspondence table, and the determining, according to the subsystem identifier, that the configuration item parameter value of each subsystem in the first test environment can be synchronized to the second test environment includes:
acquiring configuration items corresponding to the subsystem identifications of the subsystems as first configuration items by inquiring a preset corresponding relation table of the subsystem identifications and the configuration items;
acquiring configuration items corresponding to the configuration item parameter values of the subsystems as second configuration items;
and determining that the parameter value of the configuration item corresponding to a second configuration item which is the same as the first configuration item in the parameter values of the configuration items of the subsystems in the first test environment can be synchronized to the second test environment under the condition that at least one configuration item in the second configuration item is the same as the first configuration item.
In the embodiment shown in fig. 3, by performing the evaluation that the synchronization can be performed before synchronizing the configuration item parameter values to the second test environment, the risk of configuration item parameter value data errors that may be caused by synchronization failures is reduced.
Fig. 4 is a flowchart illustrating details of step 230 according to one embodiment illustrated in a corresponding embodiment of fig. 3. In the illustrated embodiment, the first test environment includes subsystems each having configuration item parameter values for the subsystem identification of the subsystem, as shown in fig. 4, and step 230 includes the steps of:
step 231, determining whether there is an identifier corresponding to the subsystem identifier of each subsystem in the first test environment in the subsystem identifiers.
In one embodiment, the determining whether there is an identifier corresponding to the subsystem identifier of each subsystem in the first test environment in the subsystem identifiers includes:
for each subsystem identification in a second test environment, judging whether the subsystem identification in the first test environment corresponds to the subsystem identification;
if yes, determining that the subsystem identifications have identifications corresponding to the subsystem identifications of the subsystems in the first test environment;
and if not, determining that no identifier corresponding to the subsystem identifier of each subsystem in the first test environment exists in the subsystem identifiers.
In one embodiment, the correspondence between the subsystem identifier in the first test environment and the subsystem identifier in the second test environment is pre-stored in a subsystem identifier library, and whether an identifier corresponding to the subsystem identifier of each subsystem in the first test environment exists in the subsystem identifiers is determined by retrieving the subsystem identifier library.
In one embodiment, the correspondence between the subsystem identifier in the first test environment and the subsystem identifier in the second test environment is preset according to a certain rule. For example, the subsystem identification is composed of a letter and a number, and if the letter part of one subsystem identification in the first test environment is the same as that of the other subsystem identification in the second test environment, but the number part is different, the two subsystems are considered to be corresponding. For example, one subsystem in the first test environment is identified as A1 and the other subsystem in the second test environment is identified as A2, then the two subsystems identified as A1 and A2 are corresponding.
Step 232, according to the determination result, determining that the parameter values of the configuration items of the subsystems in the first test environment can be synchronized to the second test environment.
In one embodiment, the second test environment is set up at the beginning, the subsystems in the second test environment are called according to a predetermined sequence, and the determining that the configuration item parameter values of the subsystems in the first test environment can be synchronized to the second test environment according to the determination result includes:
when the subsystem identifications have identifications corresponding to the subsystem identifications of the subsystems in the first test environment, acquiring all subsystem identifications having a corresponding relationship in the first test environment and the second test environment;
determining a subsystem identifier with a calling relationship between corresponding subsystems in the acquired subsystem identifiers in the first test environment as a first subsystem identifier;
determining a subsystem identifier corresponding to the determined first subsystem identifier in the acquired subsystem identifiers in the second test environment as a second subsystem identifier;
when the calling sequence of at least two subsystems in the subsystems identified as the second subsystem identifications is consistent with the calling sequence of the subsystems in the first test environment with the first subsystem identifications corresponding to the second subsystem identifications of the at least two subsystems, determining that the parameter values of the configuration items of the subsystems in the first test environment can be synchronized to the second test environment.
For example, in a first test environment, the calling relationship between the first subsystems established based on the first subsystem identifiers is B1-a1-C1-D1, and the obtained second subsystem identifiers are a2, C2, and D2, if the calling relationship between the subsystems corresponding to the second subsystem identifiers is a2-C2-D2, since the calling relationship between the subsystems corresponding to the second subsystem identifiers is identical to the first subsystem and the number of subsystems having the identical calling relationship is 3, the criteria of at least two subsystems are met, and thus it is determined that the parameter values of the configuration items of the subsystems in the first test environment can be synchronized to the second test environment.
In summary, the embodiment shown in fig. 4 is advantageous in that, because the subsystem identifier is a condition that can be directly used to determine whether two subsystems are the same subsystem, that is, whether synchronization can be performed, when the configuration item parameter value of the subsystem in the first test environment includes the subsystem identifier, the configuration item parameter value of each subsystem in the first test environment can be determined to be synchronized to the second test environment by using the correspondence relationship between the subsystem identifiers in the first test environment and the second test environment, so that the accuracy of determination can be improved, and the synchronization accuracy of the configuration item parameter value can be improved.
Fig. 5 is a detailed flowchart of step 231 according to one embodiment shown in a corresponding embodiment of fig. 4. In the embodiment shown in fig. 5, the second test environment is to be invoked in a predetermined order among the subsystems in the second test environment at the beginning of the setup, and each subsystem in the subsystems included in the first test environment further has the configuration item parameter value of the subsystem identification of the subsystem invoked by the subsystem. As shown in fig. 5, step 231 includes the following steps:
step 2311, determining a calling sequence of the subsystems in the first test environment according to the subsystem identification of the subsystem called by each subsystem in the subsystems in the first test environment.
In one embodiment, determining the calling order of the subsystems in the first test environment according to the subsystem identification of the subsystem called by each subsystem in the subsystems in the first test environment includes:
aiming at the subsystem identification of each subsystem in the first test environment, acquiring the subsystem identification which is not called by a subsystem as a first subsystem identification;
starting from the subsystem corresponding to the first subsystem identification, acquiring the subsystem identification called by the subsystem corresponding to the first subsystem identification, and marking the acquired subsystem identification as the first subsystem identification;
starting from the subsystem corresponding to the first subsystem identification again, acquiring the subsystem identification called by the subsystem corresponding to the first subsystem identification until the subsystem identifications of all the subsystems in the first test environment are marked as the first subsystem identification;
and taking the obtained obtaining sequence of all the first subsystem identifications as the calling sequence of each subsystem in the first test environment.
Step 2312, based on the predetermined order and the calling order, determining whether the subsystem identifications have identifications corresponding to the subsystem identifications of the subsystems in the first test environment.
In one embodiment, the determining whether there is an identifier corresponding to the subsystem identifier of each subsystem in the first test environment based on the predetermined order and the calling order includes:
comparing the sequence of the subsystems in the second test environment sorted according to the preset sequence with the sequence of the subsystems in the first test environment sorted according to the calling sequence to determine whether the two sequences have the same subsequence of the subsystem with the length larger than the preset threshold value; if yes, determining that the subsystem identifications have identifications corresponding to the subsystem identifications of the subsystems in the first test environment; and if not, determining that no identifier corresponding to the subsystem identifier of each subsystem in the first test environment exists in the subsystem identifiers.
In summary, the embodiment shown in fig. 5 has the advantage that by determining whether there is a corresponding subsystem identifier in the two subsystems according to the calling sequence of each subsystem in the first test environment and the predetermined sequence corresponding to each subsystem in the second test environment, the determination criterion of the determining step is improved to a certain extent, so that the accuracy of the determination can be improved, and thus the accuracy of the parameter value of the synchronization configuration item can be improved.
Fig. 6 is a flowchart illustrating steps preceding step 240 and details of step 240 according to one embodiment illustrated in a corresponding embodiment of fig. 2. As shown in fig. 6, the method comprises the following steps:
step 230', the number of subsystem identifications in the acquired second test environment is determined.
In one embodiment, the implementation terminal of the present disclosure is embedded with a counter, by which the number of acquired subsystem identifications in the second test environment can be calculated.
Step 241, determining whether the number is greater than 1.
And 242, synchronizing the configuration item parameter values of the subsystems in the first test environment to the second test environment based on the configuration item parameter values of the subsystems and the subsystem identifications of the subsystems when the number is greater than 1.
Since 1 is a relatively small judgment reference, and the number is compared with the judgment reference, when the number is not more than 1, namely, only one subsystem exists in the newly-built second test environment, the step of synchronizing the configuration item parameter values of the subsystems in the first test environment to the second test environment is not executed, the efficiency of creating the second test environment is improved, and the computing resources are saved.
The following are embodiments of the apparatus of the present invention.
The present disclosure also provides a test environment synchronization apparatus. FIG. 7 is a block diagram illustrating a test environment synchronization apparatus in accordance with an exemplary embodiment. As shown in fig. 7, the apparatus 700 includes:
a first obtaining module 710 configured to obtain configuration item parameter values of subsystems in a first test environment, wherein the first test environment includes at least one subsystem, and each of the subsystems in the subsystems has at least one configuration item parameter value;
a second obtaining module 720, configured to obtain subsystem identifications of subsystems in a second test environment to be established;
a synchronization module 730 configured to synchronize the configuration item parameter values of the subsystems in the first test environment to the second test environment based on the configuration item parameter values of the subsystems and the subsystem identifications of the subsystems.
According to a third aspect of the present disclosure, there is also provided an electronic device capable of implementing the above method.
As will be appreciated by one skilled in the art, aspects of the present invention may be embodied as a system, method or program product. Thus, various aspects of the invention may be embodied in the form of: an entirely hardware embodiment, an entirely software embodiment (including firmware, microcode, etc.) or an embodiment combining hardware and software aspects that may all generally be referred to herein as a "circuit," module "or" system.
An electronic device 800 according to this embodiment of the invention is described below with reference to fig. 8. The electronic device 800 shown in fig. 8 is only an example and should not bring any limitations to the function and scope of use of the embodiments of the present invention.
As shown in fig. 8, electronic device 800 is in the form of a general purpose computing device. The components of the electronic device 800 may include, but are not limited to: the at least one processing unit 810, the at least one memory unit 820, and a bus 830 that couples the various system components including the memory unit 820 and the processing unit 810.
Wherein the storage unit stores program code that can be executed by the processing unit 810, such that the processing unit 810 performs the steps according to various exemplary embodiments of the present invention described in the "example methods" section above in this specification.
The storage unit 820 may include readable media in the form of volatile storage units, such as a random access storage unit (RAM)821 and/or a cache storage unit 822, and may further include a read only storage unit (ROM) 823.
Storage unit 820 may also include a program/utility 824 having a set (at least one) of program modules 825, such program modules 825 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Bus 830 may be any of several types of bus structures including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 800 may also communicate with one or more external devices 1000 (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic device 800, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device 800 to communicate with one or more other computing devices. Such communication may occur via input/output (I/O) interfaces 850. Also, the electronic device 800 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via the network adapter 860. As shown, the network adapter 860 communicates with the other modules of the electronic device 800 via the bus 830. It should be appreciated that although not shown, other hardware and/or software modules may be used in conjunction with the electronic device 800, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
According to a fourth aspect of the present disclosure, there is also provided a computer-readable storage medium having stored thereon a program product capable of implementing the above-mentioned method of the present specification. In some possible embodiments, aspects of the invention may also be implemented in the form of a program product comprising program code means for causing a terminal device to carry out the steps according to various exemplary embodiments of the invention described in the above section "exemplary methods" of the present description, when said program product is run on the terminal device.
Referring to fig. 9, a program product 900 for implementing the above method according to an embodiment of the present invention is described, which may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited in this regard and, in the present document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
A computer readable signal medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
Furthermore, the above-described figures are merely schematic illustrations of processes involved in methods according to exemplary embodiments of the invention, and are not intended to be limiting. It will be readily understood that the processes shown in the above figures are not intended to indicate or limit the chronological order of the processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, e.g., in multiple modules.
It will be understood that the invention is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the invention is limited only by the appended claims.

Claims (10)

1. A test environment synchronization method, the method comprising:
acquiring configuration item parameter values of subsystems in a first test environment, wherein the first test environment comprises at least one subsystem, and each subsystem in the subsystems has at least one configuration item parameter value;
acquiring subsystem identifications of subsystems in a second test environment to be established;
and synchronizing the configuration item parameter values of the subsystems in the first test environment to the second test environment based on the configuration item parameter values of the subsystems and the subsystem identifications of the subsystems.
2. The method of claim 1, wherein prior to synchronizing the configuration item parameter values for the subsystems in the first test environment to the second test environment based on the configuration item parameter values for the subsystems and the subsystem identifications for the subsystems, the method comprises:
and determining that the parameter values of the configuration items of the subsystems in the first test environment can be synchronized to the second test environment according to the subsystem identifications.
3. The method of claim 2, wherein the first test environment includes subsystems each having configuration item parameter values for a subsystem identification of the subsystem, and wherein determining that the configuration item parameter values for the subsystems in the first test environment can be synchronized to the second test environment based on the subsystem identifications comprises:
determining whether an identifier corresponding to the subsystem identifier of each subsystem in the first test environment exists in the subsystem identifiers;
and according to the determination result, determining that the parameter values of the configuration items of the subsystems in the first test environment can be synchronized to the second test environment.
4. The method of claim 3, wherein the second test environment is to be invoked in a predetermined order among the subsystems in the second test environment at the beginning of the setup, the first test environment includes subsystems each having a configuration item parameter value of a subsystem identifier of the subsystem invoked by the subsystem, and the determining whether there is an identifier corresponding to the subsystem identifier of the subsystem in the first test environment in the subsystem identifier includes:
determining a calling sequence of each subsystem in a first test environment according to a subsystem identification of the subsystem called by each subsystem in the first test environment;
and determining whether the subsystem identifications have identifications corresponding to the subsystem identifications of the subsystems in the first test environment or not based on the preset sequence and the calling sequence.
5. The method of claim 4, wherein determining whether the subsystem identifier corresponds to the subsystem identifier of each subsystem in the first test environment based on the predetermined order and the calling order comprises:
comparing the sequence of the subsystems in the second test environment sorted according to the preset sequence with the sequence of the subsystems in the first test environment sorted according to the calling sequence to determine whether the two sequences have the same subsequence of the subsystem with the length larger than the preset threshold value;
if yes, determining that the subsystem identifications have identifications corresponding to the subsystem identifications of the subsystems in the first test environment;
and if not, determining that no identifier corresponding to the subsystem identifier of each subsystem in the first test environment exists in the subsystem identifiers.
6. The method of claim 3, wherein the second testing environment is at an initial setup, the subsystems in the second testing environment are to be called according to a predetermined sequence, and the determining whether the subsystem identifier corresponds to the subsystem identifier of the subsystem in the first testing environment comprises:
for each subsystem identification in a second test environment, judging whether the subsystem identification in the first test environment corresponds to the subsystem identification;
if yes, determining that the subsystem identifications have identifications corresponding to the subsystem identifications of the subsystems in the first test environment;
if not, determining that no identifier corresponding to the subsystem identifier of each subsystem in the first test environment exists in the subsystem identifiers;
the determining, according to the determination result, that the parameter values of the configuration items of the subsystems in the first test environment can be synchronized to the second test environment includes:
when the subsystem identifications have identifications corresponding to the subsystem identifications of the subsystems in the first test environment, acquiring all subsystem identifications having a corresponding relationship in the first test environment and the second test environment;
determining a subsystem identifier with a calling relationship between corresponding subsystems in the acquired subsystem identifiers in the first test environment as a first subsystem identifier;
determining a subsystem identifier corresponding to the determined first subsystem identifier in the acquired subsystem identifiers in the second test environment as a second subsystem identifier;
when the calling sequence of at least two subsystems in the subsystems identified as the second subsystem identifications is consistent with the calling sequence of the subsystems in the first test environment with the first subsystem identifications corresponding to the second subsystem identifications of the at least two subsystems, determining that the parameter values of the configuration items of the subsystems in the first test environment can be synchronized to the second test environment.
7. The method of claim 1, wherein prior to synchronizing the configuration item parameter values for the subsystems in the first test environment to the second test environment based on the configuration item parameter values for the subsystems and the subsystem identifications for the subsystems, the method comprises:
determining the number of the obtained subsystem identifications in the second test environment;
the synchronizing the configuration item parameter values of the subsystems in the first test environment to the second test environment based on the configuration item parameter values of the subsystems and the subsystem identifications of the subsystems comprises:
judging whether the number is more than 1;
and when the number is larger than 1, synchronizing the configuration item parameter values of the subsystems in the first test environment to the second test environment based on the configuration item parameter values of the subsystems and the subsystem identifications of the subsystems.
8. A test environment synchronization apparatus, the apparatus comprising:
the system comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is configured to acquire configuration item parameter values of subsystems in a first test environment, the first test environment comprises at least one subsystem, and each subsystem in the subsystems has at least one configuration item parameter value;
the second acquisition module is configured to acquire subsystem identifications of subsystems in a second test environment to be established;
a synchronization module configured to synchronize the configuration item parameter values of the subsystems in the first test environment to the second test environment based on the configuration item parameter values of the subsystems and the subsystem identifications of the subsystems.
9. A computer-readable program medium, characterized in that it stores computer program instructions which, when executed by a computer, cause the computer to perform the method according to any one of claims 1 to 7.
10. An electronic device, characterized in that the electronic device comprises:
a processor;
a memory having stored thereon computer readable instructions which, when executed by the processor, implement the method of any of claims 1 to 7.
CN201910817291.6A 2019-08-30 2019-08-30 Test environment synchronization method, device, medium and electronic equipment Active CN110688305B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910817291.6A CN110688305B (en) 2019-08-30 2019-08-30 Test environment synchronization method, device, medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910817291.6A CN110688305B (en) 2019-08-30 2019-08-30 Test environment synchronization method, device, medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN110688305A true CN110688305A (en) 2020-01-14
CN110688305B CN110688305B (en) 2022-04-29

Family

ID=69107662

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910817291.6A Active CN110688305B (en) 2019-08-30 2019-08-30 Test environment synchronization method, device, medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN110688305B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112422648A (en) * 2020-11-05 2021-02-26 北京字节跳动网络技术有限公司 Data synchronization method and system
CN112817652A (en) * 2021-01-22 2021-05-18 平安普惠企业管理有限公司 Configuration method and device of computer environment, computer equipment and storage medium
CN113064673A (en) * 2021-05-07 2021-07-02 数字广东网络建设有限公司 Configuration method, device, equipment and medium for multi-application environment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020124042A1 (en) * 2001-03-02 2002-09-05 Douglas Melamed System and method for synchronizing execution of a test sequence
US20060036907A1 (en) * 2004-08-11 2006-02-16 Emc Corporation Area-and product-independent test automation system and method for automatically synchronizing tests of multiple devices
CN102200944A (en) * 2011-06-16 2011-09-28 中国联合网络通信集团有限公司 Test environment cloning method and system for enterprise resource planning (ERP) system
CN107959579A (en) * 2016-10-14 2018-04-24 北京京东尚科信息技术有限公司 The dispositions method and deployment system of multisystem
CN109614339A (en) * 2018-12-27 2019-04-12 四川新网银行股份有限公司 A kind of automatic extending method based on more set test environment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020124042A1 (en) * 2001-03-02 2002-09-05 Douglas Melamed System and method for synchronizing execution of a test sequence
US20060036907A1 (en) * 2004-08-11 2006-02-16 Emc Corporation Area-and product-independent test automation system and method for automatically synchronizing tests of multiple devices
CN102200944A (en) * 2011-06-16 2011-09-28 中国联合网络通信集团有限公司 Test environment cloning method and system for enterprise resource planning (ERP) system
CN107959579A (en) * 2016-10-14 2018-04-24 北京京东尚科信息技术有限公司 The dispositions method and deployment system of multisystem
CN109614339A (en) * 2018-12-27 2019-04-12 四川新网银行股份有限公司 A kind of automatic extending method based on more set test environment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王红峰: "软件测试风险的分析与对策", 《中国金融电脑》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112422648A (en) * 2020-11-05 2021-02-26 北京字节跳动网络技术有限公司 Data synchronization method and system
CN112817652A (en) * 2021-01-22 2021-05-18 平安普惠企业管理有限公司 Configuration method and device of computer environment, computer equipment and storage medium
CN112817652B (en) * 2021-01-22 2024-05-24 北京神州数码云科信息技术有限公司 Configuration method and device of computer environment, computer equipment and storage medium
CN113064673A (en) * 2021-05-07 2021-07-02 数字广东网络建设有限公司 Configuration method, device, equipment and medium for multi-application environment

Also Published As

Publication number Publication date
CN110688305B (en) 2022-04-29

Similar Documents

Publication Publication Date Title
CN107992409B (en) Test case generation method and device, computer equipment and storage medium
CN108984388B (en) Method and terminal equipment for generating automatic test case
CN110688305B (en) Test environment synchronization method, device, medium and electronic equipment
CN112463144B (en) Distributed storage command line service method, system, terminal and storage medium
CN107315814B (en) Method and system for verifying data consistency after data migration of KDB (KDB) database
CN108415998B (en) Application dependency relationship updating method, terminal, device and storage medium
CN111061489A (en) Multi-platform compiling detection method, device, equipment and medium
CN111737227A (en) Data modification method and system
CN112100070A (en) Version defect detection method and device, server and storage medium
CN113821249A (en) Project development configuration method and device, electronic equipment and readable storage medium
CN114389969A (en) Client test method and device, electronic equipment and storage medium
CN108228611B (en) Document information copying method and device
WO2023151397A1 (en) Application program deployment method and apparatus, device, and medium
CN112559233B (en) Method, device, equipment and computer readable medium for identifying fault type
US11366642B1 (en) Change migration: processes for ensuring successful deployment of design changes
CN114003497A (en) Method, device and equipment for testing service system and storage medium
CN108459940B (en) Configuration information modification method and device of application performance management system and electronic equipment
CN112417012A (en) Data processing method and system
CN111538651A (en) Interface testing method, device, server and storage medium
CN113626409B (en) Test data processing method, device, equipment and storage medium
CN112306723A (en) Operation information acquisition method and device applied to small program
CN113076273B (en) Component access method, device, electronic equipment, storage medium and program product
CN113760765B (en) Code testing method and device, electronic equipment and storage medium
CN113986305B (en) B/S model upgrade detection method, device, equipment and storage medium
US20210141638A1 (en) Version management system, version management method and non-transitory computer-readable 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
GR01 Patent grant
GR01 Patent grant