A method and device for constructing a software testing environment

By building a template environment that is consistent with the production environment and synchronizing configuration information, the problem of heavy initialization workload of the bank software test environment is solved, the consistency between the test environment and the production environment is achieved, and the test accuracy is improved.

CN111694750BActive Publication Date: 2024-10-15WEBANK (CHINA)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010605866.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-06-29
Publication Date
2024-10-15
Estimated Expiration
2040-06-29

AI Technical Summary

Technical Problem

In the existing technology, it is impossible to simply export data from the production environment for initialization of the test environment, which results in a heavy workload for database and subsystem initialization of the bank software test environment and results that are inconsistent with the production environment, affecting test accuracy.

Method used

By building a template environment consistent with the production environment, using the resource configuration information in the configuration management database, synchronizing the database table structure and application packages, using differentiated variable replacement rules to ensure the consistency between the test environment and the template environment, avoiding full deployment, and improving Test accuracy.

Benefits of technology

It achieves the rapid construction of a consistent software testing environment, reduces the initialization workload, improves testing accuracy, and ensures information consistency between the testing environment and the production environment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111694750B_ABST
    Figure CN111694750B_ABST
Patent Text Reader

Abstract

An embodiment of the present invention provides a method and device for constructing a software testing environment. The method includes reading resource configuration information of an environment to be deployed from a configuration management database, synchronizing the table structure differences in the database information when it is determined that there is a difference between the table structure of a database in a template environment and the table structure of a database in database information, and synchronizing the tables in the database information to determine the database of the environment to be deployed, and replacing the differentiated variables in the environment to be deployed using differentiated variable replacement rules when it is determined that an application package in the subsystem information in the template environment is inconsistent with an application package in the subsystem information in the environment to be deployed to determine the subsystem of the environment to be deployed. This can solve the problem in the prior art that it is impossible to simply export data from a production environment for initializing a test environment, resulting in a large workload for initializing databases and subsystems and results that are different from the production environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the field of financial technology (Fintech), and in particular, to a method and device for constructing a software testing environment. Background Art

[0002] With the development of computer technology, more and more technologies are applied in the financial field. Traditional finance is gradually transforming into financial technology. However, due to the security and real-time requirements of the financial industry, higher requirements are also placed on technology. In the financial field, in order to ensure that application software (transactions, payments, etc.) can run normally and efficiently, a software testing environment is usually built to test these application software.

[0003] At present, the construction of bank software testing environment generally includes two aspects: database and business subsystem. Each time a new environment is deployed, the following steps are required: (1) sorting out the subsystem and database information to be deployed; (2) applying for application server and database server resources; (3) registering the configuration information of the new environment; (4) preparing data initialization DDL (structure) and DML (configuration) scripts to initialize the database; (5) publishing the corresponding version of the subsystem through the publishing platform. However, since the bank's production environment information is extremely sensitive and is not allowed to be exported from the production environment, it is impossible to simply export data from the production environment for test environment initialization. As a result, the workload of database and subsystem initialization is large and the results are different from the production environment, which affects the accuracy of the test.

[0004] In summary, there is an urgent need for a method for constructing a software testing environment to solve the problem in the prior art that it is impossible to simply export data from the production environment for initializing the test environment, resulting in a large workload for initializing the database and subsystems and the results being different from the production environment. Summary of the invention

[0005] The embodiment of the present invention provides a method and device for constructing a software testing environment, which is used to solve the problem in the prior art that it is impossible to simply export data from the production environment for initializing the test environment, resulting in a large workload for initializing the database and subsystems and the results are different from the production environment.

[0006] In a first aspect, an embodiment of the present invention provides a method for constructing a software testing environment, comprising:

[0007] Read resource configuration information of the environment to be deployed from the configuration management database, wherein the resource configuration information includes database information and subsystem information;

[0008] When it is determined that there is a difference between the table structure of the database in the template environment and the table structure of the database in the database information, the table structure difference of the database in the database information is synchronized according to a first preset rule, and the table of the database in the database information is synchronized to determine the database of the environment to be deployed;

[0009] When it is determined that the application package in the subsystem information in the template environment is inconsistent with the application package in the subsystem information in the to-be-deployed environment, the differential variables of the application package in the subsystem information in the to-be-deployed environment are replaced using differential variable replacement rules to determine the subsystem of the to-be-deployed environment;

[0010] Deploy the database and subsystem of the environment to be deployed, and determine the software testing environment.

[0011] In the above technical solution, due to the sensitivity of the data in the bank's production environment, it is impossible to directly use the data in the production environment to build the test environment, and the use of the existing test environment data will also be inconsistent with the production, which results in a large workload for initializing the database and subsystems and the results are different from the production environment. Therefore, by building and maintaining a template environment that is consistent with the information of the production environment for the construction of the test environment, it can help to break through the barriers between the test environment and the production environment. Based on the template environment, when it is determined that there is a difference between the table structure of the database in the template environment and the table structure of the database in the database information, the difference in the table structure of the database in the database information is synchronized according to the first preset rule, and the table of the database in the database information is synchronized, so that the database of the environment to be deployed can be quickly constructed, and the consistency of the database in the environment to be deployed and the database in the template environment can be ensured, and the need to fully deploy the database when building the environment to be deployed can also be avoided. In addition, when it is determined that the application package in the subsystem information in the template environment is inconsistent with the application package in the subsystem information in the to-be-deployed environment, the differentiated variables of the application package in the subsystem information in the to-be-deployed environment are replaced using differentiated variable replacement rules. This allows the subsystem of the to-be-deployed environment to be quickly constructed, and ensures the consistency between the subsystem in the to-be-deployed environment and the subsystem in the template environment. It also allows the need to fully deploy the subsystem when constructing the to-be-deployed environment, thereby ensuring the consistency of the constructed test environment and the production environment and improving the accuracy of the test. This can solve the problem in the prior art that it is impossible to simply export data from the production environment for test environment initialization, resulting in a large workload for database and subsystem initialization and results that are different from the production environment.

[0012] Optionally, synchronizing the database table in the database information includes:

[0013] When it is determined that the table of the database in the database information is a parameter table, the parameters of the parameter table are synchronized according to a second preset rule and the type of the parameter table.

[0014] In the above technical solution, when it is determined that the database table in the database information is a parameter table, the parameters of the parameter table are synchronized through the second preset rule and according to the type of the parameter table, which can ensure the consistency of the database in the environment to be deployed and the database in the template environment, and can also avoid the need to fully deploy the database when building the environment to be deployed.

[0015] Optionally, the method further comprises:

[0016] If there is no difference between the table structure of the database in the template environment and the table structure of the database in the database information, when it is determined that the table of the database in the database information is a parameter table, the parameters of the parameter table are synchronized according to the second preset rule and the type of the parameter table to determine the database of the environment to be deployed.

[0017] In the above technical scheme, if there is no difference between the table structure of the database in the template environment and the table structure of the database in the database information, when it is determined that the table of the database in the database information is a parameter table, the parameters of the parameter table can be synchronized according to the second preset rule and the type of the parameter table. In this way, the database of the environment to be deployed can be constructed, which can avoid the need to fully deploy the database when constructing the environment to be deployed, and help ensure the consistency of the database in the environment to be deployed and the database in the template environment, avoiding low test accuracy due to inconsistencies between the environment to be deployed and the production environment.

[0018] Optionally, synchronizing the parameters of the parameter table according to the second preset rule and the type of the parameter table includes:

[0019] If the type of the parameter table is environment-independent, synchronizing the parameters of the parameter table of the template environment to the database of the environment to be deployed;

[0020] If the type of the parameter table is environment-related, the second preset rule is used to synchronize the parameters of the environment-related fields of the parameter table of the template environment to the database of the environment to be deployed.

[0021] In the above technical scheme, since there are many types of configuration information required for the environment to be deployed, some of which are irrelevant to the environment and some of which are related to the environment, and at the same time, the content of some parameters is huge in number, it is difficult to process them uniformly, and it is difficult to initialize the configuration parameters. Therefore, the parameters of the parameter table are synchronized by adopting different processing methods for different types of parameter tables. That is, if the type of the parameter table is independent of the environment, the parameters of the parameter table of the template environment are synchronized to the database of the environment to be deployed. If the type of the parameter table is environment-related, the parameters of the environment-related fields of the parameter table of the template environment are synchronized to the database of the environment to be deployed using the second preset rule. This can solve the problem in the prior art that the content of some parameters is huge in number, difficult to process uniformly, and it is difficult to initialize the configuration parameters.

[0022] Optionally, the determining that the table of the database in the database information is a parameter table includes:

[0023] The relevant data of the database in the database information is input into the preset classification model for identification to obtain a predicted probability. If the predicted probability is greater than a first threshold, the table of the database in the database information is determined to be a parameter table; the preset classification model is obtained by training and learning the historical data of the databases of multiple test environments.

[0024] In the above technical solution, by inputting the relevant data of the database in the database information into the preset classification model, the table in the database with a predicted probability greater than the first threshold can be automatically identified as a parameter table, providing support for synchronizing the parameters of the parameter table according to the second preset rule and the type of the parameter table, and determining the database of the environment to be deployed.

[0025] Optionally, after determining that the table of the database in the database information is a parameter table, the method further includes:

[0026] The parameter tables are classified according to the different contents and types of the multiple test environments to obtain the types of the parameter tables.

[0027] In the above technical solution, the parameter tables can be automatically classified according to the different contents and types of the multiple test environments, so as to obtain different types of parameter tables.

[0028] Optionally, the using a differential variable replacement rule to replace the differential variables of the application package in the subsystem information in the to-be-deployed environment includes:

[0029] According to the current release version number in the subsystem information in the template environment, the application package corresponding to the current release version number is obtained from the subsystem information version library, and based on the application package corresponding to the current release version number, the differential variable replacement rule is used to replace the differential variables of the application package in the subsystem information in the environment to be deployed.

[0030] In the above technical solution, by obtaining the application package corresponding to the current release version number from the subsystem information version library, and using the differential variable replacement rules to replace the differential variables of the application package in the subsystem information in the deployment environment, the consistency of the subsystem in the deployment environment and the subsystem in the template environment can be ensured, and the need to fully deploy the subsystem when building the deployment environment can be avoided.

[0031] Optionally, the method further comprises:

[0032] If the application package corresponding to the current release version number is not obtained, the application package in the subsystem information in the template environment is re-obtained, and based on the application package in the subsystem information in the template environment, the differentiated variables of the application package in the subsystem information in the environment to be deployed are replaced using the differentiated variable replacement rule to determine the subsystem of the environment to be deployed; the differentiated variable replacement rule is obtained by training and learning the differentiated variable values ​​of the subsystem information of multiple sets of test environments.

[0033] In the above technical solution, if the application package corresponding to the current release version number is not obtained, the application package in the subsystem information in the template environment is re-obtained, and based on the application package in the subsystem information in the template environment, the differentiated variables of the application package in the subsystem information in the deployment environment are replaced using the differentiated variable replacement rules. In this way, the subsystem of the environment to be deployed can be constructed, which can avoid the need to fully deploy the subsystem when building the environment to be deployed, and help to further ensure the consistency of the subsystem in the environment to be deployed and the subsystem in the template environment, avoiding low test accuracy due to inconsistencies between the environment to be deployed and the production environment.

[0034] Optionally, before reading the resource configuration information of the to-be-deployed environment from the configuration management database, the method further includes:

[0035] Monitor the production environment to see if there is a version release plan;

[0036] If yes, executing the version release plan in the template environment, and comparing the data of the template environment after execution with the data of the production environment;

[0037] If the data of the template environment after the execution is inconsistent with the data of the production environment, a difference synchronization script is generated, and the difference synchronization script is executed in the template environment until the data of the template environment is consistent with the data of the production environment.

[0038] In the above technical solution, by monitoring the version release plan of the production environment, executing the version release plan in the template environment, and generating a difference synchronization script when it is determined that the production environment and the template environment are inconsistent, the difference synchronization script is then executed in the template environment until the data in the template environment and the data in the production environment are the same. This ensures the consistency of information in the template environment and the production environment so that it can be used for the construction of the test environment, thereby helping to break down the barriers between the test environment and the production environment.

[0039] In a second aspect, an embodiment of the present invention further provides a device for constructing a software testing environment, comprising:

[0040] An acquisition unit, used to read resource configuration information of the to-be-deployed environment from a configuration management database, wherein the resource configuration information includes database information and subsystem information;

[0041] A processing unit is used to synchronize the table structure differences of the database in the database information according to a first preset rule when it is determined that there is a difference between the table structure of the database in the template environment and the table structure of the database in the database information, and synchronize the tables of the database in the database information to determine the database of the environment to be deployed; when it is determined that the application package in the subsystem information in the template environment is inconsistent with the application package in the subsystem information in the environment to be deployed, use the differentiation variable replacement rule to replace the differentiation variables of the application package in the subsystem information in the environment to be deployed to determine the subsystem of the environment to be deployed; deploy the database and subsystem of the environment to be deployed to determine the software testing environment.

[0042] Optionally, the processing unit is specifically configured to:

[0043] When it is determined that the table of the database in the database information is a parameter table, the parameters of the parameter table are synchronized according to a second preset rule and the type of the parameter table.

[0044] Optionally, the processing unit is further configured to:

[0045] If there is no difference between the table structure of the database in the template environment and the table structure of the database in the database information, when it is determined that the table of the database in the database information is a parameter table, the parameters of the parameter table are synchronized according to the second preset rule and the type of the parameter table to determine the database of the environment to be deployed.

[0046] Optionally, the processing unit is specifically configured to:

[0047] If the type of the parameter table is environment-independent, synchronizing the parameters of the parameter table of the template environment to the database of the environment to be deployed;

[0048] If the type of the parameter table is environment-related, the second preset rule is used to synchronize the parameters of the environment-related fields of the parameter table of the template environment to the database of the environment to be deployed.

[0049] Optionally, the processing unit is specifically configured to:

[0050] The relevant data of the database in the database information is input into the preset classification model for identification to obtain a predicted probability. If the predicted probability is greater than a first threshold, the table of the database in the database information is determined to be a parameter table; the preset classification model is obtained by training and learning the historical data of the databases of multiple test environments.

[0051] Optionally, the processing unit is further configured to:

[0052] After determining that the table of the database in the database information is a parameter table, the parameter table is classified according to the difference contents and difference types of the multiple test environments to obtain the type of the parameter table.

[0053] Optionally, the processing unit is specifically configured to:

[0054] According to the current release version number in the subsystem information in the template environment, the application package corresponding to the current release version number is obtained from the subsystem information version library, and based on the application package corresponding to the current release version number, the differential variable replacement rule is used to replace the differential variables of the application package in the subsystem information in the environment to be deployed.

[0055] Optionally, the processing unit is further configured to:

[0056] If the application package corresponding to the current release version number is not obtained, the application package in the subsystem information in the template environment is re-obtained, and based on the application package in the subsystem information in the template environment, the differentiated variables of the application package in the subsystem information in the environment to be deployed are replaced using the differentiated variable replacement rule to determine the subsystem of the environment to be deployed; the differentiated variable replacement rule is obtained by training and learning the differentiated variable values ​​of the subsystem information of multiple sets of test environments.

[0057] Optionally, the processing unit is further configured to:

[0058] Before reading the resource configuration information of the to-be-deployed environment from the configuration management database, monitoring whether the production environment has a version release plan;

[0059] If yes, executing the version release plan in the template environment, and comparing the data of the template environment after execution with the data of the production environment;

[0060] If the data of the template environment after the execution is inconsistent with the data of the production environment, a difference synchronization script is generated, and the difference synchronization script is executed in the template environment until the data of the template environment is consistent with the data of the production environment.

[0061] In a third aspect, an embodiment of the present invention provides a computing device, including:

[0062] Memory for storing computer programs;

[0063] The processor is used to call the computer program stored in the memory and execute the method for constructing the software testing environment according to the obtained program.

[0064] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer-executable program, and the computer-executable program is used to enable a computer to execute a method for constructing a software testing environment. BRIEF DESCRIPTION OF THE DRAWINGS

[0065] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0066] Figure 1 A schematic diagram of a system architecture provided for an embodiment of the present invention;

[0067] Figure 2 A schematic diagram of a process for constructing a software testing environment provided by an embodiment of the present invention;

[0068] Figure 3 A schematic diagram of a process for building and maintaining a benchmark environment provided by an embodiment of the present invention;

[0069] Figure 4 A schematic diagram of a process for building a database for a deployment environment provided by an embodiment of the present invention;

[0070] Figure 5 A schematic diagram of a process of building a subsystem for a to-be-deployed environment provided by an embodiment of the present invention;

[0071] Figure 6 A schematic diagram of the structure of a device for constructing a software testing environment provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0072] In order to make the purpose, technical scheme and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0073] Figure 1 A system architecture is provided for an embodiment of the present invention. Figure 1 As shown, the system architecture may be a server 100 , including a processor 110 , a communication interface 120 , and a memory 130 .

[0074] The communication interface 120 is used to communicate with the terminal device, send and receive information transmitted by the terminal device, and realize communication.

[0075] The processor 110 is the control center of the server 100, and uses various interfaces and lines to connect various parts of the entire server 100, and executes various functions of the server 100 and processes data by running or executing software programs and / or modules stored in the memory 130, and calling data stored in the memory 130. Optionally, the processor 110 may include one or more processing units.

[0076] The memory 130 can be used to store software programs and modules. The processor 110 executes various functional applications and data processing by running the software programs and modules stored in the memory 130. The memory 130 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function, etc.; the data storage area can store data created according to business processing, etc. In addition, the memory 130 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0077] It should be noted that the above Figure 1 The structure shown is only an example and is not limited to this embodiment of the present invention.

[0078] Based on the above description, Figure 2 The process of a method for constructing a software testing environment provided by an embodiment of the present invention is exemplarily shown. The process can be executed by a software testing environment construction device. The system can be located in Figure 1 The server 100 shown may also be the server 100.

[0079] like Figure 2 As shown in the figure, the process specifically includes:

[0080] Step 201: Read resource configuration information of the environment to be deployed from the configuration management database.

[0081] In the embodiment of the present invention, the resource configuration information may include database information and subsystem information. The database information may include database tables, database table structures, and historical release records of the database; the subsystem information may include server resources corresponding to the subsystem, application packages of the subsystem, and the like; and the application packages may include application programs, configuration files, business rule files, and the like. In addition, the configuration management database also stores user information, database environment information, and the like, which are used for subsystem configuration and environmental parameter replacement of database parameter tables.

[0082] In addition, before reading the resource configuration information of the environment to be deployed from the configuration management database, monitor whether the production environment has a version release plan. If so, execute the version release plan in the template environment, and compare the data of the template environment after execution with the data of the production environment. If the data of the template environment after execution is inconsistent with the data of the production environment, generate a difference synchronization script, and execute the difference synchronization script in the template environment until the data of the template environment is the same as the data of the production environment. Specifically, due to the sensitivity of the data in the bank's production environment, it is impossible to directly use the production data to build a test environment. Using the existing test environment data to build will also be inconsistent with production. Therefore, a set of benchmark environments (template environments) is built and maintained. Through intelligent tracking of the release plan of each version of the production environment (such as database information changes, business subsystem information changes, and other online requirements), release time, pull the corresponding release materials, parse the material information of the subsystem, and execute database DDL and DML scripts to achieve the purpose of synchronizing the benchmark environment and the production environment. In order to prevent differences caused by inconsistencies between the release method and release sequence of the baseline environment and the release method and release sequence of the production environment, the information of the baseline environment is pushed to the production environment for execution to compare the information of the baseline environment with the information of the production environment. If there are differences, a difference synchronization script is generated and pushed back to the baseline environment for execution to ensure that the baseline environment and the production environment are completely consistent.

[0083] It should be noted that due to the sensitivity of data in the bank's production environment, the data used when setting up the test environment is screened, that is, sensitive information is shielded or removed, such as customer information, account information, etc.

[0084] Step 202, when it is determined that there is a difference between the table structure of the database in the template environment and the table structure of the database in the database information, the table structure difference of the database in the database information is synchronized according to the first preset rule, and the table of the database in the database information is synchronized to determine the database of the environment to be deployed.

[0085] In an embodiment of the present invention, when it is determined that there is a difference between the table structure of the database in the template environment and the table structure of the database in the database information, the difference in the table structure of the database in the database information is synchronized according to the first preset rule, and when it is determined that the table of the database in the database information is a parameter table, if the type of the parameter table is environment-independent, the parameters of the parameter table of the template environment are synchronized to the database of the environment to be deployed, and if the type of the parameter table is environment-dependent, the parameters of the environment-related fields of the parameter table of the template environment are synchronized to the database of the environment to be deployed using the second preset rule, and the database of the environment to be deployed is determined. If there is no difference between the table structure of the database in the template environment and the table structure of the database in the database information, when it is determined that the table of the database in the database information is a parameter table, if the type of the parameter table is environment-independent, the parameters of the parameter table of the template environment are synchronized to the database of the environment to be deployed, and if the type of the parameter table is environment-dependent, the parameters of the environment-related fields of the parameter table of the template environment are synchronized to the database of the environment to be deployed using the second preset rule, and the database of the environment to be deployed is determined. Among them, when determining whether the table of the database in the database information is a parameter table, the relevant data of the database in the database information is input into the preset classification model for identification to obtain a predicted probability. If the predicted probability is greater than a first threshold, the table of the database in the database information is determined to be a parameter table. After determining that the table of the database in the database information is a parameter table, the parameter table is classified according to the different contents and types of multiple test environments to obtain the type of the parameter table; the preset classification model is obtained by training and learning the historical data of the databases of multiple test environments.

[0086] Specifically, the database construction module of the test environment deploys the database instance required for the operation of banking services, including the creation of database tables and the initialization of parameter table contents.

[0087] The database construction of the test environment is copied through a template environment as the source environment. The Internet generally uses the production environment as the template environment, and banks choose the intelligently maintained benchmark environment as the template environment due to the sensitivity of the data in the production environment. At the same time, in order to utilize the historical deployment information of the environment to be deployed, it is no longer constructed through full initialization. Instead, the differences between the template environment and the environment to be deployed are compared, and the database in the environment to be deployed is created by synchronizing these differences. This can realize the utilization of the old environment and improve the deployment efficiency of the test environment. If the environment to be deployed is empty, it is equivalent to the deployment of the new environment. If the environment to be deployed is not empty, the historical version of the environment to be deployed can be effectively utilized, which helps save the time required for the deployment of the new environment. The main steps to build the database in the environment to be deployed include:

[0088] (1) Configuration information generation: Apply for new environment TDSQL (Titan Distribute SQL, a database service for deploying banking software systems) server resources, and automatically register environment information, database information, user information, etc. to CMDB (Configuration Management Database) for subsystem configuration and database parameter table environment parameter replacement.

[0089] (2) Synchronizing table structures: Read the resource configuration information of the environment to be deployed from the configuration management database, determine whether the environment to be deployed has a database that needs to be deployed, and if not, create a new one; if there is a database that needs to be deployed, determine whether the database has all the tables of the template environment, and if not, create a new one; if so, compare the differences between the table structures of the template environment and the environment to be deployed, and synchronize the differences in the table structures of the environment to be deployed according to the first preset rule. The first preset rule is:

[0090] a. Compare the fields in the tables of the template environment and the fields in the tables of the environment to be deployed to see if they are consistent, including type, default value, primary key, auto-increment, etc. If they are inconsistent, for the tables of the database in the environment to be deployed, delete the redundant fields in the tables, add the missing fields in the tables, and align the fields with inconsistent types.

[0091] b. Compare the indexes in the table of the template environment and the indexes in the table of the environment to be deployed to see if they are consistent. If they are inconsistent, the processing method is the same as in a.

[0092] c. Compare the foreign keys in the table of the template environment and the table of the environment to be deployed to see if they are consistent. If they are inconsistent, the processing method is the same as in a.

[0093] d. Compare the order of fields in the table of the template environment and the order of fields in the table of the environment to be deployed to see if they are consistent. If they are inconsistent, the processing method is the same as in a.

[0094] (3) Parameter table DML (Data Manipulation Language) synchronization: Determine whether the table of the database in the to-be-deployed environment is a parameter table. If so, determine whether the parameter table is environment-related. If it is not environment-related, directly generate a DML script based on the content of the template environment. If it is environment-related, replace the environment-related information in the table of the database in the to-be-deployed environment according to the category of the environment-related field of the parameter table and the second preset rule to achieve synchronization of the parameter table DML content. The second preset rule is:

[0095] a. Environment parameter replacement: If there is an environment information field in the parameter table, copy the content of the parameter table of the template environment to the environment to be deployed. According to the environment information category, such as deployment area, IP (Internet Protocol), port, etc., replace the environment information in the parameter table of the database in the environment to be deployed with the environment parameter field in the environment information registered in the CMDB.

[0096] b. Auto-increment parameter synchronization: If the parameter table contains auto-increment parameter fields such as allocated card number and batch processing SEQ, the configuration in the template environment is ignored, and the auto-increment parameters in the parameter table of the database in the deployment environment are directly initialized.

[0097] c. Incremental synchronization: For system information, batch information, etc., the parameter content that exists in the template environment but is missing in the environment to be deployed is added to the corresponding parameter table of the database in the environment to be deployed based on the primary key identifier.

[0098] d. Non-empty replacement: If the number of entries in the parameter table of the template environment is the same as that in the parameter table of the environment to be deployed, but some field values ​​are different, if the parameter table of the database in the environment to be deployed is not empty, the parameter table of the database in the environment to be deployed will be retained; if the parameter table of the database in the environment to be deployed is empty, the parameter table of the template environment will be fully synchronized to the parameter table of the database in the environment to be deployed.

[0099] In addition, since most bank IT systems are parameter-driven, the parameter table must be initialized when the environment is initialized. However, there are many types of bank IT parameter tables, including system parameters, business parameters, etc. Some are related to the environment, some are not, and there are also card number auto-increment SEQ, etc., which cannot be directly copied from the baseline environment. Automatic identification of parameter categories and their initialization methods are required.

[0100] The specific steps for automatically identifying parameter categories and parameter table DML initialization methods are as follows:

[0101] a. A preset classification model is obtained by training and learning the historical data of the databases of multiple test environments, and the preset classification model is used to determine whether the table of the database in the deployment environment is a parameter table, wherein the training feature data is the historical release records of the database and the DML of multiple test environments. Specifically, a Bayesian classifier is obtained by training with table name, table DML, and release history records as feature factors, and the Bayesian classifier is used to automatically identify which tables are parameter tables and which tables are business tables.

[0102] b. For the parameter tables identified in step a, by comparing the difference contents and difference types of different test environments, the parameter tables are divided into two categories: environment-related and environment-independent.

[0103] c. For the content of the parameter table that is independent of the environment, the initialization of the content of the parameter table that is independent of the environment is directly copied and generated by the reference environment.

[0104] d. Summarize the environment-related fields of the environment-related tables into six categories: environment information, auto-increment ID, system information, batch information, account information, and date, and customize the DML initialization rules for each category. Automatically classify the parameter table according to the difference data and difference type between different test environments in step b, and generate the initialization DML script based on the benchmark environment and initialization rules.

[0105] By accurately classifying the database tables, the business table only needs to initialize the DDL (Data Definition Language). After the parameter table initializes the DDL, the initialization DML script is automatically generated according to the categories to which the database tables belong.

[0106] Step 203, when it is determined that the application package in the subsystem information in the template environment is inconsistent with the application package in the subsystem information in the environment to be deployed, the differentiated variables of the application package in the subsystem information in the environment to be deployed are replaced using the differentiated variable replacement rule to determine the subsystem of the environment to be deployed.

[0107] In an embodiment of the present invention, when it is determined that the application package in the subsystem information in the template environment is inconsistent with the application package in the subsystem information in the to-be-deployed environment, the application package corresponding to the current release version number is obtained from the subsystem information version library according to the current release version number in the subsystem information in the template environment, and the differential variables of the application package in the subsystem information in the to-be-deployed environment are replaced using the differential variable replacement rule based on the application package corresponding to the current release version number, so as to determine the subsystem of the to-be-deployed environment. If the application package corresponding to the current release version number is not obtained, the application package in the subsystem information in the template environment is re-obtained, and the differential variables of the application package in the subsystem information in the to-be-deployed environment are replaced using the differential variable replacement rule based on the application package in the subsystem information in the template environment, so as to determine the subsystem of the to-be-deployed environment. Among them, the differential variable replacement rule is obtained by training and learning the differential variable values ​​of the subsystem information of multiple test environments.

[0108] Specifically, the banking software subsystem consists of several parts, including the subsystem installation package, configuration file, and rule package. Generally, the subsystem is built by re-creating the subsystem packaging task on the CI platform based on the subsystem version of the template environment (production environment or the previous version test environment), and publishing it to the environment to be deployed.

[0109] For banking IT, rule packages are constantly iterating with versions. The rule packages used to rebuild subsystem packages may be inconsistent with the rule packages when the template environment version is released; the version update of the third-party dependency library of the subsystem also causes the newly deployed business system dependency library to be inconsistent with the business system dependency library running in the template environment; and it is very time-consuming to repackage the subsystem in full. Therefore, by intelligently tracking the version change release records, a historical release version material warehouse is automatically built. When a new environment is built, the historical build results in the historical release version material warehouse are directly taken according to the version number of the template environment for deployment, ensuring that the business system materials of the newly built environment and the template environment are completely consistent.

[0110] In addition, there are some environment-related configurations in the configuration file. The current deployment method requires that all the used differentiated variables be registered on the CMDB before each new environment is deployed. For this reason, during the implementation of the present invention, based on the values ​​of the differentiated variables of the current multiple environments, the sources of the variables are automatically traced, and variable assignment rules are generated, which are automatically replaced when a new environment is deployed.

[0111] The construction of the subsystem of the new environment mainly includes the following steps:

[0112] a. Configuration information generation: Resource application and automatic registration to CMDB, such as server resources corresponding to the subsystem, differentiated variables, etc.

[0113] b. Material extraction: Compare the MD5 (Message-Digest Algorithm 5) of the subsystem materials in the template environment and the to-be-deployed / synchronized environment. If they are the same, skip the deployment. If they are different, extract the subsystem material packages, configuration files, and rule files of the corresponding version number from the historical release version material warehouse based on the version number of the template environment. If the extraction fails, repackage and build through the CI platform as a backup.

[0114] c. Learning of differential variable replacement rules: Automatically generate new environment variable replacement rules based on the differential variable values ​​between multiple test environments that currently exist:

[0115] (1) If multiple environment values ​​are the same, they are replaced with the same value.

[0116] (2) If multiple environment values ​​are different, trace the data source based on the value and environment variable list and generate replacement rules.

[0117] d. Subsystem deployment: According to the subsystem deployment area and application server information, obtain the host list of the subsystem to be deployed. After replacing the differentiated variables according to the differentiated variable replacement rules in step c, deploy them to the corresponding server.

[0118] Step 204, deploy the database and subsystem of the environment to be deployed, and determine the software testing environment.

[0119] In the embodiment of the present invention, after the database and subsystem of the environment to be deployed are constructed, the database and subsystem of the environment to be deployed are deployed, and a software testing environment is determined for software testing.

[0120] In order to better explain an embodiment of the present invention for building and maintaining a benchmark environment, a process for building and maintaining a benchmark environment provided by an embodiment of the present invention is described below through a specific implementation scenario.

[0121] like Figure 3 As shown, the process includes the following steps:

[0122] Step 301, whether there is a version release plan for the production environment, if so, execute step 302, if not, the process starts again.

[0123] When building and maintaining the baseline environment, monitor the production environment to see if there is a version release plan.

[0124] Step 302: Execute the version release plan in the benchmark environment.

[0125] Step 303: Push the data in the benchmark environment to the production environment.

[0126] Step 304, comparing the data of the benchmark environment with the data of the production environment.

[0127] Step 305, whether there is a difference between the baseline environment and the production environment, if so, execute step 306, if not, the process starts again.

[0128] Step 306: Generate a differential synchronization script.

[0129] Step 307: Execute the differential synchronization script in the reference environment.

[0130] The above embodiments show that by monitoring the version release plan of the production environment, executing the version release plan in the benchmark environment, and generating a difference synchronization script when it is determined that the production environment and the benchmark environment are inconsistent, and then executing the difference synchronization script in the benchmark environment until the data of the benchmark environment and the data of the production environment are the same, the consistency of information of the benchmark environment and the production environment can be guaranteed so as to be used for the construction of the test environment, thereby helping to break down the barriers between the test environment and the production environment.

[0131] In order to better explain the embodiment of the present invention for building a database for an environment to be deployed, a process for building a database for an environment to be deployed provided by an embodiment of the present invention is described below through a specific implementation scenario.

[0132] like Figure 4 As shown, the process includes the following steps:

[0133] Step 401: Read resource configuration information from a configuration management database.

[0134] The resource configuration information of the to-be-deployed environment is read from the configuration management database. The resource configuration information may include environment information, database information, etc.

[0135] Step 402 , determine whether there is a database to be deployed in the deployment environment, if so, execute step 403 , if not, execute step 404 .

[0136] Based on the resource configuration information, determine whether the environment to be deployed has a database that needs to be deployed.

[0137] Step 403, determine whether there is a table of the database in the template environment in the database, if so, execute step 405, if not, execute step 406.

[0138] When it is determined that the environment to be deployed has a database that needs to be deployed, it is determined whether the database has a table of the database in the template environment.

[0139] Step 404, create a database.

[0140] When it is determined that the environment to be deployed does not have a database that needs to be deployed, create a new database.

[0141] Step 405 , determining whether the table structure of the database in the template environment is different from the table structure of the database in the to-be-deployed environment, if so, executing step 407 , if not, executing step 408 .

[0142] When it is determined that the database has a table of the database in the template environment, it is determined whether the table structure of the database in the template environment is different from the table structure of the database in the to-be-deployed environment.

[0143] Step 406, create a database table.

[0144] When it is determined that the table of the database in the template environment does not exist in the database, a new table is created.

[0145] Step 407: Synchronize the differences in the table structures of the databases in the to-be-deployed environment according to the first preset rule.

[0146] Step 408, determine whether the table in the database is a parameter table, if so, execute step 409, if not, the process ends.

[0147] After determining that there is no difference between the table structure of the database in the template environment and the table structure of the database in the to-be-deployed environment or synchronizing the difference in the table structure of the database in the to-be-deployed environment according to the first preset rule, it is determined whether the table of the database is a parameter table.

[0148] Step 409, determine whether the parameter table is environment-related, if so, execute step 410, if not, the process ends.

[0149] When it is determined that the table of the database is a parameter table, it is determined whether the parameter table is environment-related.

[0150] Step 410: Synchronize the parameters of the parameter table in the to-be-deployed environment according to the second preset rule.

[0151] When it is determined that the parameter table environment is relevant, the parameters of the parameter table in the environment to be deployed are synchronized according to a second preset rule.

[0152] The above embodiments show that, based on the template environment, when it is determined that there is a difference between the table structure of the database in the template environment and the table structure of the database in the database information, the difference in the table structure of the database in the database information is synchronized according to the first preset rule, and when it is determined that the table of the database in the database information is a parameter table, the parameters of the parameter table are synchronized according to the second preset rule and the type of the parameter table. This allows the database of the environment to be deployed to be quickly constructed, and ensures the consistency of the database in the environment to be deployed and the database in the template environment. It also avoids the need to fully deploy the database when constructing the environment to be deployed, and helps to ensure the consistency of the database in the environment to be deployed and the database in the template environment, avoiding low test accuracy due to inconsistencies between the environment to be deployed and the production environment.

[0153] In order to better explain the embodiment of the present invention for building a subsystem for an environment to be deployed, a process of building a subsystem for an environment to be deployed provided by an embodiment of the present invention is described below through a specific implementation scenario.

[0154] like Figure 5 As shown, the process includes the following steps:

[0155] Step 501, determine whether the subsystem materials of the template environment and the environment to be deployed are consistent. If so, the process ends, if not, execute step 502.

[0156] Step 502, determine whether there is a corresponding material in the historical material warehouse, if so, execute step 503, if not, execute step 504.

[0157] When it is determined that the subsystem materials of the template environment and the environment to be deployed are inconsistent, it is determined whether the historical material warehouse has the subsystem materials of the corresponding version number according to the version number of the template environment.

[0158] Step 503, extract historical materials.

[0159] When it is determined according to the version number of the template environment that the historical material warehouse has the subsystem material of the corresponding version number, the subsystem material of the corresponding version number is extracted from the historical material warehouse.

[0160] Step 504: The CI platform repackages the subsystem.

[0161] When it is determined based on the version number of the template environment that the historical material warehouse does not have a subsystem material with the corresponding version number, the CI platform is used to repackage and build it as a backup.

[0162] Step 505: Use the differential variable replacement rule to replace the differential variables of the subsystem materials in the deployment environment.

[0163] Step 506: Subsystem deployment.

[0164] The above embodiment shows that when it is determined that the application package in the subsystem information in the template environment is inconsistent with the application package in the subsystem information in the to-be-deployed environment, the application package corresponding to the current release version number is obtained from the subsystem information version library according to the current release version number in the subsystem information in the template environment, and the differentiated variables of the application package in the subsystem information in the to-be-deployed environment are replaced using the differentiated variable replacement rules based on the application package corresponding to the current release version number. The subsystem of the to-be-deployed environment can be quickly constructed, and the consistency of the subsystem in the to-be-deployed environment and the subsystem in the template environment can be ensured. It can also avoid the need to fully deploy the subsystem when building the to-be-deployed environment, and help to further ensure the consistency of the subsystem in the to-be-deployed environment and the subsystem in the template environment, avoiding low test accuracy due to inconsistencies between the to-be-deployed environment and the production environment.

[0165] Based on the same technical concept, Figure 6 An apparatus for constructing a software testing environment provided by an embodiment of the present invention is exemplarily shown, and the apparatus can execute the process of a method for constructing a software testing environment.

[0166] like Figure 6 As shown, the device comprises:

[0167] The acquisition unit 601 is used to read the resource configuration information of the to-be-deployed environment from the configuration management database, where the resource configuration information includes database information and subsystem information;

[0168] Processing unit 602 is used to synchronize the table structure differences of the database in the database information according to a first preset rule when it is determined that there is a difference between the table structure of the database in the template environment and the table structure of the database in the database information, and synchronize the tables of the database in the database information to determine the database of the environment to be deployed; when it is determined that the application package in the subsystem information in the template environment is inconsistent with the application package in the subsystem information in the environment to be deployed, use the differentiation variable replacement rule to replace the differentiation variables of the application package in the subsystem information in the environment to be deployed to determine the subsystem of the environment to be deployed; deploy the database and subsystem of the environment to be deployed to determine the software testing environment.

[0169] Optionally, the processing unit 602 is specifically configured to:

[0170] When it is determined that the table of the database in the database information is a parameter table, the parameters of the parameter table are synchronized according to a second preset rule and the type of the parameter table.

[0171] Optionally, the processing unit 602 is further configured to:

[0172] If there is no difference between the table structure of the database in the template environment and the table structure of the database in the database information, when it is determined that the table of the database in the database information is a parameter table, the parameters of the parameter table are synchronized according to the second preset rule and the type of the parameter table to determine the database of the environment to be deployed.

[0173] Optionally, the processing unit 602 is specifically configured to:

[0174] If the type of the parameter table is environment-independent, synchronizing the parameters of the parameter table of the template environment to the database of the environment to be deployed;

[0175] If the type of the parameter table is environment-related, the second preset rule is used to synchronize the parameters of the environment-related fields of the parameter table of the template environment to the database of the environment to be deployed.

[0176] Optionally, the processing unit 602 is specifically configured to:

[0177] The relevant data of the database in the database information is input into the preset classification model for identification to obtain a predicted probability. If the predicted probability is greater than a first threshold, the table of the database in the database information is determined to be a parameter table; the preset classification model is obtained by training and learning the historical data of the databases of multiple test environments.

[0178] Optionally, the processing unit 602 is further configured to:

[0179] After determining that the table of the database in the database information is a parameter table, the parameter table is classified according to the difference contents and difference types of the multiple test environments to obtain the type of the parameter table.

[0180] Optionally, the processing unit 602 is specifically configured to:

[0181] According to the current release version number in the subsystem information in the template environment, the application package corresponding to the current release version number is obtained from the subsystem information version library, and based on the application package corresponding to the current release version number, the differential variable replacement rule is used to replace the differential variables of the application package in the subsystem information in the environment to be deployed.

[0182] Optionally, the processing unit 602 is further configured to:

[0183] If the application package corresponding to the current release version number is not obtained, the application package in the subsystem information in the template environment is re-obtained, and based on the application package in the subsystem information in the template environment, the differentiated variables of the application package in the subsystem information in the environment to be deployed are replaced using the differentiated variable replacement rule to determine the subsystem of the environment to be deployed; the differentiated variable replacement rule is obtained by training and learning the differentiated variable values ​​of the subsystem information of multiple sets of test environments.

[0184] Optionally, the processing unit 602 is further configured to:

[0185] Before reading the resource configuration information of the to-be-deployed environment from the configuration management database, monitoring whether the production environment has a version release plan;

[0186] If yes, executing the version release plan in the template environment, and comparing the data of the template environment after execution with the data of the production environment;

[0187] If the data of the template environment after the execution is inconsistent with the data of the production environment, a difference synchronization script is generated, and the difference synchronization script is executed in the template environment until the data of the template environment is consistent with the data of the production environment.

[0188] Based on the same technical concept, an embodiment of the present invention provides a computing device, including:

[0189] Memory for storing computer programs;

[0190] The processor is used to call the computer program stored in the memory and execute the method for constructing the software testing environment according to the obtained program.

[0191] Based on the same technical concept, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer-executable program, and the computer-executable program is used to enable a computer to execute a method for constructing a software testing environment.

[0192] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0193] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0194] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0195] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0196] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.

[0197] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of this application and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A method for constructing a software testing environment, characterized in that: include: Read resource configuration information of the environment to be deployed from the configuration management database, wherein the resource configuration information includes database information and subsystem information; When it is determined that there is a difference between the table structure of the database in the template environment and the table structure of the database in the database information, the table structure difference of the database in the database information is synchronized according to a first preset rule, and the table of the database in the database information is synchronized to determine the database of the environment to be deployed; When it is determined that the application package in the subsystem information in the template environment is inconsistent with the application package in the subsystem information in the to-be-deployed environment, the differential variables of the application package in the subsystem information in the to-be-deployed environment are replaced using differential variable replacement rules to determine the subsystem of the to-be-deployed environment; Deploy the database and subsystem of the environment to be deployed, and determine the software testing environment; Before reading the resource configuration information of the to-be-deployed environment from the configuration management database, the method further includes: Monitor the production environment to see if there is a version release plan; If yes, executing the version release plan in the template environment, and comparing the data of the template environment after execution with the data of the production environment; If the data of the template environment after the execution is inconsistent with the data of the production environment, a difference synchronization script is generated, and the difference synchronization script is executed in the template environment until the data of the template environment is consistent with the data of the production environment.

2. The method according to claim 1, characterized in that The synchronizing of the database table in the database information includes: When it is determined that the table of the database in the database information is a parameter table, the parameters of the parameter table are synchronized according to a second preset rule and the type of the parameter table.

3. The method according to claim 2, characterized in that The method further comprises: If there is no difference between the table structure of the database in the template environment and the table structure of the database in the database information, when it is determined that the table of the database in the database information is a parameter table, the parameters of the parameter table are synchronized according to the second preset rule and the type of the parameter table to determine the database of the environment to be deployed.

4. The method according to claim 3, characterized in that The synchronizing the parameters of the parameter table according to the second preset rule and the type of the parameter table includes: If the type of the parameter table is environment-independent, synchronizing the parameters of the parameter table of the template environment to the database of the environment to be deployed; If the type of the parameter table is environment-related, the second preset rule is used to synchronize the parameters of the environment-related fields of the parameter table of the template environment to the database of the environment to be deployed.

5. The method according to claim 3, characterized in that The step of determining that the table of the database in the database information is a parameter table includes: The relevant data of the database in the database information is input into the preset classification model for identification to obtain a predicted probability. If the predicted probability is greater than a first threshold, the table of the database in the database information is determined to be a parameter table; the preset classification model is obtained by training and learning the historical data of the databases of multiple test environments.

6. The method according to claim 5, characterized in that After determining that the table of the database in the database information is a parameter table, the method further includes: The parameter tables are classified according to the different contents and types of the multiple test environments to obtain the types of the parameter tables.

7. The method according to claim 1, characterized in that The step of replacing the differentiated variables of the application package in the subsystem information in the to-be-deployed environment by using the differentiated variable replacement rule includes: According to the current release version number in the subsystem information in the template environment, the application package corresponding to the current release version number is obtained from the subsystem information version library, and based on the application package corresponding to the current release version number, the differential variable replacement rule is used to replace the differential variables of the application package in the subsystem information in the environment to be deployed.

8. The method according to claim 7, characterized in that The method further comprises: If the application package corresponding to the current release version number is not obtained, the application package in the subsystem information in the template environment is re-obtained, and based on the application package in the subsystem information in the template environment, the differentiated variables of the application package in the subsystem information in the environment to be deployed are replaced using the differentiated variable replacement rule to determine the subsystem of the environment to be deployed; the differentiated variable replacement rule is obtained by training and learning the differentiated variable values ​​of the subsystem information of multiple sets of test environments.

9. A device for constructing a software testing environment, characterized in that: include: An acquisition unit, used to read resource configuration information of the to-be-deployed environment from a configuration management database, wherein the resource configuration information includes database information and subsystem information; A processing unit is used to synchronize the table structure difference of the database in the database information according to a first preset rule when determining that there is a difference between the table structure of the database in the template environment and the table structure of the database in the database information, and synchronize the table of the database in the database information to determine the database of the environment to be deployed; when determining that the application package in the subsystem information in the template environment is inconsistent with the application package in the subsystem information in the environment to be deployed, use a differential variable replacement rule to replace the differential variables of the application package in the subsystem information in the environment to be deployed to determine the subsystem of the environment to be deployed; deploy the database and subsystem of the environment to be deployed to determine the software testing environment; and monitor whether the production environment has a version release plan; If yes, executing the version release plan in the template environment, and comparing the data of the template environment after execution with the data of the production environment; If the data of the template environment after the execution is inconsistent with the data of the production environment, a difference synchronization script is generated, and the difference synchronization script is executed in the template environment until the data of the template environment is consistent with the data of the production environment.

10. A computing device, characterized in that include: Memory for storing computer programs; A processor, configured to call a computer program stored in the memory, and execute the method according to any one of claims 1 to 8 according to the obtained program.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer-executable program, and the computer-executable program is used to enable a computer to execute the method according to any one of claims 1 to 8.