Application deployment method and device, electronic equipment and storage medium
By obtaining the deployment variables of the application product package and its test environment, component and application assembly testing is performed in multiple environments, which solves the problem of differentiation in multi-environment deployment of large-scale IT system applications and achieves support and reduced impact of multi-environment deployment.
Patent Information
- Application Number
- CN202410837043.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-26
- Publication Date
- 2024-10-11
AI Technical Summary
Existing technologies are difficult to effectively solve the problem of differentiation of large-scale IT system applications in multi-environment deployments, making it difficult to reduce the impact of differences in different environments on applications.
By obtaining the common and differential deployment variables of the application product package of the target application and its multiple sets of test environments, deploy them in the component assembly test environment and the application assembly test environment respectively, and use the common deployment variables and differential deployment variables for multi-environment deployment. Reduce the impact of environmental differences.
It supports multi-environment deployment, reduces the impact of different environment differences on applications, and flexibly defines deployment variables for each set of test environments to meet different testing needs.
Smart Images

Figure CN118760439A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of software development technology, and in particular to an application deployment method, device, electronic device and storage medium. Background Art
[0002] In the process of software development, various tests need to be performed on the application. For different tests, the application product package of the application is usually deployed to the corresponding test environment for testing. In the application deployment process, supporting multi-environment deployment is a crucial link. In the related art, in application deployment, such as the deployment of large-scale IT system applications, the multi-environment deployment problem cannot be solved. Summary of the invention
[0003] The present application aims to solve one of the technical problems in the related art at least to some extent.
[0004] To this end, the first purpose of this application is to propose an application deployment method to support multi-environment deployment, reduce the impact of differences in different environments on application programs, and solve differentiated deployment.
[0005] The second objective of the present application is to provide an application deployment device.
[0006] The third objective of the present application is to provide an electronic device.
[0007] A fourth objective of the present application is to provide a computer-readable storage medium.
[0008] A fifth object of the present application is to provide a computer program product.
[0009] To achieve the above objectives, the first embodiment of the present application proposes an application deployment method, including:
[0010] Obtaining an application product package of a target application, common deployment variables common to multiple test environments of the target application, and differential deployment variables for each test environment;
[0011] Deploy the application artifact package to the component assembly test environment according to the common deployment variables and the difference deployment variables of the component assembly test environment in the multiple test environments, so as to perform component assembly test on the target application in the component assembly test environment;
[0012] In response to the target application passing the component assembly test, the application artifact package is deployed to the target application assembly test environment based on the common deployment variables and the differential deployment variables of the target application assembly test environment in the multiple test environments, so as to perform application assembly testing on the target application in the target application assembly test environment.
[0013] To achieve the above-mentioned purpose, the second aspect of the present application proposes an application deployment device, including:
[0014] A first acquisition module is used to acquire an application product package of a target application, common deployment variables common to multiple test environments of the target application, and differential deployment variables of each test environment;
[0015] A deployment module, configured to deploy the application artifact package to the component assembly test environment according to the common deployment variables and the difference deployment variables of the component assembly test environment in the multiple test environments, so as to perform component assembly testing on the target application in the component assembly test environment;
[0016] The deployment module is also used to deploy the application artifact package to the target application assembly test environment in response to the target application passing the component assembly test, according to the common deployment variables and the differential deployment variables of the target application assembly test environment in the multiple test environments, so as to perform application assembly testing on the target application in the target application assembly test environment.
[0017] To achieve the above-mentioned purpose, the third aspect of the present application provides an electronic device, including: a processor, and a memory communicatively connected to the processor;
[0018] The memory stores computer-executable instructions;
[0019] The processor executes the computer-executable instructions stored in the memory to implement the method as described in the embodiment of the first aspect.
[0020] To achieve the above-mentioned purpose, the fourth aspect embodiment of the present application proposes a computer-readable storage medium, in which computer execution instructions are stored. When the computer execution instructions are executed by a processor, they are used to implement the method described in the first aspect embodiment.
[0021] To achieve the above-mentioned purpose, the fifth aspect of the present application proposes a computer program product, including a computer program, which implements the method described in the first aspect when executed by a processor.
[0022] The application deployment method, device, electronic device and storage medium provided by the present application deploy the application product package to the component assembly test environment according to the common deployment variables shared by multiple test environments and the differential deployment variables of the component assembly test environment, and after the target application passes the component assembly test, the application product package is deployed to the application assembly test environment according to the common deployment variables and the differential deployment variables of the application assembly test environment. Thus, based on the common deployment variables of each set of test environments and the differential deployment variables of the component assembly test environment and the application assembly test environment, the application product package is deployed to the component assembly test environment and the application assembly test environment, so as to support multi-environment deployment, and use the common deployment variables and the differential deployment variables of different test environments for multi-environment deployment, which can reduce the impact of different environmental differences on the application program and solve the problem of differentiated deployment. Furthermore, the deployment variables of each set of test environments can be flexibly defined to meet different testing requirements.
[0023] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:
[0025] Figure 1 A flowchart of an application deployment method provided in an embodiment of the present application;
[0026] Figure 2 A flowchart of an application deployment method provided in an embodiment of the present application;
[0027] Figure 3 A flowchart of another application deployment method provided in an embodiment of the present application;
[0028] Figure 4 A schematic diagram of an application deployment process provided in an embodiment of the present application;
[0029] Figure 5 A schematic diagram of the structure of an application deployment device provided in an embodiment of the present application;
[0030] Figure 6 It is a schematic diagram of the structure of an electronic device shown in an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION
[0031] Embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.
[0032] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.) and signals involved in this application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.
[0033] The data acquisition, transmission, storage, use, and processing in the technical solution of this application are in compliance with the provisions of national laws and regulations.
[0034] It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned, and they should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.
[0035] The following describes the application deployment method and device according to the embodiments of the present application with reference to the accompanying drawings.
[0036] Figure 1 A flowchart of an application deployment method provided in an embodiment of the present application.
[0037] In the process of application deployment, supporting multi-environment deployment is a crucial link. In related technologies, in application deployment, such as the deployment of large-scale IT system applications, the multi-environment deployment problem cannot be solved.
[0038] To address this problem, the present application embodiment provides an application deployment method to support multi-environment deployment, reduce the impact of different environment differences on application programs, and solve differentiated deployment, such as Figure 1 As shown, the application deployment method includes the following steps:
[0039] Step 101 , obtaining an application product package of a target application, common deployment variables common to multiple test environments of the target application, and differential deployment variables for each test environment.
[0040] Exemplarily, the target application may be a single application, or a large application system, or a component in a large application system, etc., without limitation.
[0041] Exemplarily, after the code of the target application completes unit testing, the code of the target application can be compiled, packaged, delivered for review, etc. to obtain an application product package. Exemplarily, the user can upload the application product package of the target application on the automated deployment platform, thereby obtaining the product package of the target application. Exemplarily, the application product package can be obtained from a storage device such as a version machine according to input parameters, and the input parameters can be, for example, the name and version information of the target application.
[0042] Since the version of the target application may change, illustratively, the application product package of the target application may be obtained within a set time for deployment, thereby ensuring stability.
[0043] Exemplarily, the application product package may include compiled executable files, related dependent libraries, configuration files, test data, deployment scripts, etc.
[0044] Exemplarily, the application product package of the target application program may be a standardized application product package. Standardization here may mean that the role of the deployment script included in the application product package is standardized.
[0045] Exemplarily, the target application may be tested in multiple test environments, which may include a component assembly test environment, an application assembly test environment, an acceptance test environment, and the like.
[0046] Exemplarily, common deployment variables common to multiple test environments can be defined on the automated deployment platform. Users can set common deployment variables and set differential deployment variables separately for each test environment, thereby obtaining common deployment variables for multiple test environments and differential deployment variables for each test environment.
[0047] Exemplarily, the common deployment variables and the differential deployment variables may be parameters for configuring and managing the test environment. Exemplarily, the common deployment variables may include configuration information of common components or some basic components. Exemplarily, the obtained common deployment variables and differential deployment variables may be represented in the form of key-value pairs.
[0048] Step 102 , deploying the application artifact package to the component assembly test environment according to the common deployment variables and the differential deployment variables of the component assembly test environment in the multiple test environments, so as to perform component assembly testing on the target application in the component assembly test environment.
[0049] Exemplarily, component assembly testing can also be called integration testing, which can test whether the various parts of the target application can work properly when combined together. The component assembly test environment can be understood as the test environment used for component assembly testing, and the component assembly test environment can also be called integration testing environment.
[0050] For example, the application package can be placed on the server to which the component assembly test environment belongs, and the common deployment variables and the differential deployment variables of the component assembly test environment can be made effective by executing the corresponding commands. The deployment script in the application package is then searched from the specified directory location, and the deployment scripts are then executed one by one to deploy the application package to the component assembly test environment.
[0051] Exemplarily, the common deployment variables and the differential deployment variables of the component assembly test environment may be made effective by executing a script, and then the application product package may be deployed to the component assembly test environment by executing a deployment script in the application product package.
[0052] Exemplarily, common deployment variables and differential deployment variables for each test environment can be effective in user environment variables before the deployment script in the application product package is executed, which can ensure that the deployment variables are obtained in a timely manner without affecting the system environment variables.
[0053] After the application product package is deployed to the component assembly test environment, the target application can be subjected to component assembly testing through the interface automation tool. Exemplarily, component assembly testing may include, but is not limited to, interface testing, regression testing, functional integration testing, data consistency testing, global data structure testing, compatibility testing, etc.
[0054] Step 103, in response to the target application passing the component assembly test, the application artifact package is deployed to the target application assembly test environment according to the common deployment variables and the differential deployment variables of the target application assembly test environment in multiple test environments, so as to perform application assembly testing on the target application in the target application assembly test environment.
[0055] Exemplarily, application assembly testing can verify whether the entire application meets requirements and specifications and whether it can meet user needs and expectations. It can be understood that the application assembly testing environment is the testing environment used for application assembly testing, and the application assembly testing environment can also be called a system testing environment.
[0056] In this embodiment, if the target application passes the component assembly test, the application product package can be deployed to the target application assembly test environment. Exemplarily, the multiple test environments may include multiple application assembly test environments, and the target application assembly test environment may be any one of the multiple application assembly test environments. Exemplarily, deploying the application product package to the application assembly test environment can be understood as deploying the application product package to the server to which the application assembly test environment belongs.
[0057] For example, the application package can be placed on the server to which the application assembly test environment belongs, and the common deployment variables and the differential deployment variables of the application assembly test environment can be made effective by executing the corresponding commands. The deployment script in the application package is then searched from the specified directory location, and the deployment scripts are then executed one by one to deploy the application package to the application assembly test environment.
[0058] Exemplarily, the common deployment variables and the differential deployment variables of the application assembly test environment may be made effective by executing a script, and then the application product package may be deployed to the target application assembly test environment by executing a deployment script in the application product package.
[0059] After the application artifact package is deployed to the target application assembly test environment, the target application program can be subjected to application assembly test.
[0060] Exemplarily, application assembly testing may include: component connection testing, application assembly functional testing, and application assembly non-functional testing, etc. Among them, component connection testing may include: analyzing test scope, designing test cases, executing tests, etc.; application assembly functional testing may include: preparing test plans, analyzing test scope, designing test cases, test access checks, etc.; executing tests and preparing test reports; application assembly non-functional testing may include: plans and cases, environment tool confirmation, writing test scripts, test case execution, test reports, report release and archiving, etc.
[0061] In the embodiment of the present application, the application product package is deployed to the component assembly test environment according to the common deployment variables shared by multiple test environments and the differential deployment variables of the component assembly test environment, and after the target application passes the component assembly test, the application product package is deployed to the application assembly test environment according to the common deployment variables and the differential deployment variables of the application assembly test environment. Thus, based on the common deployment variables of each set of test environments and the differential deployment variables of the component assembly test environment and the application assembly test environment, the application product package is deployed to the component assembly test environment and the application assembly test environment, so as to support multi-environment deployment, and use the common deployment variables and the differential deployment variables of different test environments for multi-environment deployment, which can reduce the impact of different environmental differences on the application program and solve the problem of differentiated deployment. Moreover, the deployment variables of each set of test environments can be flexibly defined to meet different testing requirements.
[0062] Figure 2 A flowchart of another application deployment method provided in an embodiment of the present application.
[0063] like Figure 2 As shown, the application deployment method may include the following steps:
[0064] Step 201 : compile and package the target application program code using a preset automated deployment standard to obtain a standardized application product package.
[0065] Exemplarily, the deployment scripts in the application product package may include application deployment scripts and data deployment scripts, and the automated deployment standard may be used to standardize the application deployment scripts and data deployment scripts contained in the application product package, so as to normalize the application deployment scripts and data deployment scripts. Exemplarily, the application deployment script may refer to a script that needs to be executed for an application change operation, and the data deployment script may refer to a script that needs to be executed for a data change operation.
[0066] Exemplarily, the automated deployment standard may include a first script specification and a second script specification, wherein the first script specification may be used to define an application deployment script including a script with preset application change steps, and the second script specification may be used to define a data deployment script including a script with preset data change steps, wherein the script that executes the preset application change steps may implement corresponding application change operations, and the script that executes the preset data change steps may implement corresponding data change operations.
[0067] Exemplarily, application change steps and data change steps can be predefined, and the first application change step involved in the target application can be determined from the predefined candidate application change steps, and the first data change step involved in the target application can be determined from the predefined candidate data change steps. If the first application change step is a preset application change step and the first data change step is a preset data change step, then based on the script of the first application change step and the script of the first application change step, the code of the target application is compiled and packaged to obtain a standardized application product package.
[0068] The application deployment script in the standardized application product package includes a script for the first application change step, and the data deployment script in the standardized application product package includes a script for the first data change step.
[0069] Exemplarily, the application change operations involved in the target application can be determined based on the deployment requirements of the target application, and based on the application change operations involved in the target application and the application change operations corresponding to the predefined candidate application change steps, the first application change step involved in the target application can be determined from the predefined candidate application change steps.
[0070] Exemplarily, the data change operations involved in the target application can be determined based on the deployment requirements of the target application, and based on the data change operations involved in the target application and the data change operations corresponding to the predefined candidate data change steps, the first data change step involved in the target application can be determined from the predefined candidate data change steps.
[0071] Exemplarily, the code of the target application may be compiled and packaged to obtain an initial package, and then the script of the first application change step and the script of the second application change step may be placed in the initial package to obtain a standardized application product package.
[0072] Exemplarily, the application change will execute the change operation under the user, and 13 optional application change steps can be predefined, as shown in Table 1 below. Among them, except for version acquisition and general backup, version release, and health check, which are general functions provided by the deployment platform, other application change steps, if involved in the change, need to provide scripts for the corresponding steps in the application product package. If there is a possibility of execution rollback, a rollback execution script for the corresponding step can also be provided, and the script is placed in the application product package. Here, the application product package can also be a version package.
[0073] Table 1
[0074]
[0075]
[0076] It can be seen that among the 13 candidate application change steps in Table 1 above, except for version acquisition and general backup, version release, and health check, which are general functions provided by the deployment platform, the remaining application change steps can be preset application change steps, and the first application change step can be one or more steps in the preset application change steps.
[0077] Exemplarily, data changes will execute the change operation under the user, and 8 optional data change steps can be predefined, as shown in Table 2 below. Among them, except for version acquisition, general backup, and version release, which provide general functions for the deployment platform, other data change steps, if involved in the change, need to provide scripts for the corresponding steps in the application product package. If there is a possibility of execution rollback, a rollback execution script for the corresponding step can also be provided and placed in the application product package. Here, the application product package can also be a version package.
[0078] Table 2
[0079]
[0080] It can be seen that among the 8 candidate data change steps in Table 2 above, except for version acquisition, general backup, and version release, which are general functions provided by the deployment platform, the remaining data change steps can be preset application change steps, and the first data change step can be one or more steps of the preset data change steps.
[0081] In this embodiment, based on the first script specification, the application package is standardized for which application change step scripts are included, and based on the second script specification, the application package is standardized for which data change step scripts are included, thereby achieving standardization of the application deployment scripts and data deployment scripts included in the application package, facilitating standard deployment of the application program.
[0082] Step 202: Obtain common deployment variables common to multiple test environments of the target application and differential deployment variables for each test environment.
[0083] In this embodiment, step 202 can be implemented in any of the embodiments in this application, so it will not be described in detail here.
[0084] Step 203 , deploying the application artifact package to the component assembly test environment according to the common deployment variables and the differential deployment variables of the component assembly test environment in the multiple test environments, so as to perform component assembly testing on the target application in the component assembly test environment.
[0085] In this embodiment, step 203 can be implemented in any of the embodiments in this application, so it will not be described in detail here.
[0086] Exemplarily, the server where the component assembly test environment is located can be connected to the database server of the target application assembly test environment, thereby improving the reliability of the test data.
[0087] Exemplarily, the script of the first application change step can be obtained from the location of a specified directory and executed one by one in the order of steps to implement the corresponding application change operation, and the script of the first data change step can be obtained from the location of a specified directory and executed one by one in the order of steps to implement the corresponding data change operation, thereby deploying the application artifact package to the component assembly test environment.
[0088] For example, the application product package includes scripts for other application change steps except version acquisition and general backup, version release, and health check in Table 1, and scripts for other data change steps except version acquisition and general backup, and version release in Table 2. The scripts for other application change steps can be executed one by one according to the order of application change steps in Table 1 above to implement corresponding application change operations, and the scripts for other data change steps can be executed one by one according to the order of steps in Table 2 above to implement corresponding data change operations.
[0089] Step 204, in response to the target application passing the component assembly test, the application artifact package is deployed to the target application assembly test environment according to the common deployment variables and the differential deployment variables of the target application assembly test environment in the multiple test environments, so as to perform application assembly testing on the target application in the target application assembly test environment.
[0090] In this embodiment, step 204 can be implemented in any of the embodiments in this application, so it will not be described in detail here.
[0091] For example, the product version of the application product package and the launch point to which the product version belongs can be determined, and the launch point to which the product version belongs can be compared with the launch points to which the test tasks of multiple candidate application assembly test environments belong respectively, and then the application assembly test environment whose launch point is closest to the launch point to which the product version belongs can be determined from multiple candidate application assembly test environments, and the closest application assembly test environment can be determined as the target application assembly test environment, and the application product package can be deployed to the target application assembly test environment. The launch point can be understood as the expected launch time of the application program.
[0092] Therefore, the application assembly test environment that is closest to the production point of the test task in multiple application assembly test environments and the production point of the product version of the application product package used for component assembly testing is used as the target application assembly test environment, and the application product package that passes the component assembly test is deployed to the target application assembly test environment, thereby ensuring that the interface transaction is initiated normally.
[0093] In addition, the application artifact package may be deployed to the application assembly test environment in a manner similar to the exemplary embodiment of step 203 in which the application artifact package is deployed to the component assembly test environment.
[0094] Exemplarily, a user may orchestrate a deployment process of an application artifact package on an automated deployment platform, wherein the deployment process may include multiple process nodes, and the multiple process nodes may include a start node, a deployment node, an end node, etc. A deployment node may refer to a process node that completes the corresponding deployment of the application.
[0095] Exemplarily, the deployment process of the application artifact package is obtained, and when it is detected that the start node is triggered, the automated deployment begins. When the deployment process is executed to the process node for indicating deployment to the component assembly test environment among multiple process nodes, the application artifact package can be deployed to the component assembly test environment according to the common deployment variables and the difference deployment variables of the component assembly test environment, and then the component assembly test is performed. After the component assembly test passes, the process node for indicating deployment to the application assembly test environment is executed, and then the application artifact package is deployed to the application assembly test environment according to the difference deployment variables of the common deployment variables and the application assembly test environment, and then the application assembly test is performed. After the application assembly test passes, the next process node is executed until the end node is executed, and the automated deployment ends.
[0096] Therefore, the application product package can be automatically deployed based on the orchestrated deployment process, which can meet different deployment requirements and improve deployment efficiency.
[0097] In an embodiment of the present application, a unified automated deployment standard can be used to compile and package the code of the target application to obtain a standardized application product package, thereby deploying the application product package based on the standardized application deployment script and data deployment script in the application product package, thereby achieving standardized standard deployment and automated deployment of the application product package, saving management and manpower.
[0098] Figure 3 A flowchart of another application deployment method provided in an embodiment of the present application. Figure 3 As shown, the application deployment method may include the following steps:
[0099] Step 301 , obtaining an application product package of a target application, common deployment variables common to multiple test environments of the target application, and differential deployment variables for each test environment.
[0100] In this embodiment, step 301 can be implemented in any of the embodiments in this application, so it will not be described in detail here.
[0101] Step 302 , deploying the application artifact package to the component assembly test environment according to the common deployment variables and the differential deployment variables of the component assembly test environment in the multiple test environments, so as to perform component assembly testing on the target application in the component assembly test environment.
[0102] In this embodiment, step 302 can be implemented in any of the embodiments in this application, so it will not be described in detail here.
[0103] Step 303: Verify the availability of the application product package.
[0104] For example, the availability of the application product package can be verified by reusing the regression test cases of the interface automation test tool. Thus, reusing the regression test cases for availability verification can quickly verify the availability of the current application version without writing new test cases, which can save costs.
[0105] Step 304, in response to the application artifact package passing the availability verification, the application artifact package is deployed to the target application assembly test environment according to the common deployment variables and the differential deployment variables of the target application assembly test environment in the multiple test environments, so as to perform application assembly testing on the target application in the target application assembly test environment.
[0106] In this embodiment, if the application product package passes the availability verification, the application product package is deployed to the target application assembly test environment according to the common deployment variables and the differential deployment variables of the target application assembly test environment.
[0107] Exemplarily, the application artifact package that has completed component assembly testing can be deployed to the target application assembly test environment using tools such as a development pipeline.
[0108] Exemplarily, the common components required by the target application assembly test environment can also be obtained and deployed to the target application assembly test environment. Thus, the supporting common components can be synchronously connected to the target application assembly test environment, thereby ensuring the order of application assembly test and improving the reliability of application assembly test.
[0109] In the embodiment of the present application, after the application product package passes the availability verification, the application product package is deployed to the target application assembly test environment according to the common deployment variables and the difference deployment variables of the target application assembly test environment. Thus, deploying a reliable application product package to the application assembly test environment can improve the accuracy of the application assembly test.
[0110] In order to facilitate understanding of the application deployment method of this application, Figure 4 To explain, Figure 4 A schematic diagram of an application deployment process provided for an embodiment of the present application.
[0111] Take the target application as credit card-issuing V1 as an example, V1 can be understood as the version number, such as Figure 4 As shown, the application deployment process may include:
[0112] Step 1: After the developer completes code development and performs necessary unit testing, the code is submitted and the application product package is obtained.
[0113] Step 2: Use the above deployment method to deploy the application product package to the designated "self-test environment" server.
[0114] (1) The self-test application product package should be connected to a suitable application assembly environment to ensure that interface transactions can be initiated normally. The production point of the selected application assembly environment test task should be as close as possible to the production point of the self-test application product version.
[0115] (2) The supporting public component client is also synchronously connected to the selected application assembly and testing environment.
[0116] (3) To ensure that the application assembly environment test tasks are not greatly affected, the "self-test environment" application product package can only perform IPv4 service addressing without performing service registration.
[0117] (4) To ensure the reliability of test data, the server in the “self-test environment” can be connected to the database server in the application assembly environment.
[0118] Step 3: Use interface automation tools to perform component assembly testing on the target application deployed in the "self-test environment".
[0119] Step 4: Complete component assembly testing to verify that the target application currently deployed in the "self-test environment" is a reliable version.
[0120] Step 5: Use tools such as the R&D pipeline to deploy a reliable application version that has completed component assembly testing to the application assembly test environment.
[0121] Step 6: Perform application assembly test.
[0122] The above-mentioned "self-test environment" may refer to a component assembly test environment, a self-test application product package may be understood as an application product package for component assembly testing, and a self-test application product version may refer to a product version of an application product package for component assembly testing.
[0123] in addition, Figure 4 The steady-state large environment may refer to a highly stable, reliable and large-scale test environment that simulates the actual production environment. Deploying the application product package to the application assembly test environment in the steady-state large environment can improve the reliability of the application assembly test.
[0124] In addition, the reliability verification here can also be understood as the availability verification in the above embodiment.
[0125] In order to implement the above embodiment, the present application also proposes an application deployment device.
[0126] Figure 5 A schematic diagram of the structure of an application deployment device provided in an embodiment of the present application.
[0127] like Figure 5 As shown, the application deployment device 500 includes:
[0128] A first acquisition module 510 is used to acquire an application product package of a target application, common deployment variables common to multiple test environments of the target application, and differential deployment variables of each test environment;
[0129] A deployment module 520, configured to deploy the application artifact package to the component assembly test environment according to the common deployment variables and the difference deployment variables of the component assembly test environment in the multiple test environments, so as to perform component assembly testing on the target application in the component assembly test environment;
[0130] The deployment module 520 is also used to deploy the application artifact package to the target application assembly test environment in response to the target application passing the component assembly test, according to the common deployment variables and the differential deployment variables of the target application assembly test environment in the multiple test environments, so as to perform application assembly testing on the target application in the target application assembly test environment.
[0131] Furthermore, in a possible implementation of the embodiment of the present application, the first acquisition module 510 is configured to:
[0132] The code of the target application is compiled and packaged using a preset automated deployment standard to obtain the standardized application product package: wherein the automated deployment standard is used to standardize the application deployment script and the data deployment script contained in the application product package.
[0133] Further, in a possible implementation manner of the embodiment of the present application, the automated deployment standard includes a first script specification and a second script specification, the first script specification is used to define that the application deployment script includes a script of a preset application change step, and the second script specification is used to define that the data deployment script includes a script of a preset data change step, and the first acquisition module 510 is used to:
[0134] Determining a first application change step involved in the target application program from predefined candidate application change steps;
[0135] Determining a first data change step involved in the target application from predefined candidate data change steps;
[0136] In response to the first application change step being the preset application change step and the first data change step being the preset data change step, based on the script of the first application change step and the script of the first application change step, the code of the target application is compiled and packaged to obtain the application product package.
[0137] Furthermore, in a possible implementation of the embodiment of the present application, the deployment module 520 is used to:
[0138] Verifying the availability of the application product package;
[0139] In response to the application artifact package passing the availability verification, the application artifact package is deployed to the target application assembly test environment based on the common deployment variables and the differential deployment variables of the target application assembly test environment in the multiple test environments, so as to perform application assembly testing on the target application in the target application assembly test environment.
[0140] Furthermore, in a possible implementation of the embodiment of the present application, the deployment module 520 is used to:
[0141] Obtain regression test cases for interface automation testing tools;
[0142] The availability of the application product package is verified by reusing the regression test cases of the automated testing tool of the interface.
[0143] Furthermore, in a possible implementation of the embodiment of the present application, the deployment module 520 is used to:
[0144] Obtaining a deployment process of the application product package; wherein the deployment process includes a plurality of process nodes;
[0145] In response to the deployment process executing to a process node among the multiple process nodes for indicating deployment to the component assembly test environment, the application artifact package is deployed to the component assembly test environment according to the common deployment variables and the differential deployment variables of the component assembly test environment.
[0146] Furthermore, in a possible implementation of the embodiment of the present application, the device may also include:
[0147] A first determination module is used to determine the product version of the application product package and the production point to which the product version belongs;
[0148] A comparison module, used to compare the production point to which the product version belongs with the production points to which the test tasks of the plurality of candidate application assembly test environments belong;
[0149] A second determination module is used to determine, from the multiple candidate application assembly and test environments, an application assembly and test environment whose production point is closest to the production point to which the product version belongs;
[0150] The third determination module is used to determine the most recent application assembly test environment as the target application assembly test environment.
[0151] Furthermore, in a possible implementation of the embodiment of the present application, the device may also include:
[0152] A second acquisition module is used to acquire the common components required for the target application assembly test environment;
[0153] The deployment module 520 is further used to deploy the common components to the target application assembly test environment.
[0154] Furthermore, in a possible implementation manner of the embodiment of the present application, the server where the component assembly test environment is located is connected to the database server of the target application assembly test environment.
[0155] It should be noted that the above explanations of the application deployment method embodiment are also applicable to the application deployment device of this embodiment, and will not be repeated here.
[0156] In the embodiment of the present application, based on the common deployment variables shared by multiple test environments and the differential deployment variables of the component assembly test environment, the application product package is deployed to the component assembly test environment, and after the target application passes the component assembly test, the application product package is deployed to the application assembly test environment according to the common deployment variables and the differential deployment variables of the application assembly test environment. Thus, based on the common deployment variables of each set of test environments and the differential deployment variables of the component assembly test environment and the application assembly test environment, the application product package is deployed to the component assembly test environment and the application assembly test environment, so as to support multi-environment deployment, and use the common deployment variables and the differential deployment variables of different test environments for multi-environment deployment, which can reduce the impact of different environmental differences on the application program and solve the problem of differentiated deployment. Moreover, the deployment variables of each set of test environments can be flexibly defined to meet different testing requirements.
[0157] In order to implement the above embodiments, the present application also proposes an electronic device, comprising: a processor, and a memory communicatively connected to the processor; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory to implement the method provided by the above embodiments.
[0158] In order to implement the above embodiments, the present application also proposes an electronic device, comprising: a processor, and a memory communicatively connected to the processor; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory to implement the method provided by the above embodiments.
[0159] As an example, Figure 6 is a schematic diagram of the structure of an electronic device shown in an exemplary embodiment of the present disclosure, such as Figure 6As shown, the electronic device 600 may further include:
[0160] The memory 610 and the processor 620, a bus 630 connecting different components (including the memory 610 and the processor 620), the memory 610 stores a computer program, and when the processor 620 executes the program, the information collection method described in the embodiment of the present disclosure is implemented.
[0161] Bus 630 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. By way of example, these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.
[0162] The electronic device 600 typically includes a variety of electronic device readable media. These media can be any available media that can be accessed by the electronic device 600, including volatile and non-volatile media, removable and non-removable media.
[0163] The memory 610 may also include computer system readable media in the form of volatile memory, such as random access memory (RAM) 640 and / or cache memory 650. The electronic device 600 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 660 may be used to read and write non-removable, non-volatile magnetic media ( Figure 6 not shown, usually called a "hard drive"). Although Figure 6 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 630 via one or more data medium interfaces. The memory 610 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present disclosure.
[0164] A program / utility 680 having a set (at least one) of program modules 670 may be stored, for example, in the memory 610, such program modules 670 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 may include an implementation of a network environment. The program modules 670 generally perform the functions and / or methods of the embodiments described in the present disclosure.
[0165] The electronic device 600 may also communicate with one or more external devices 690 (e.g., keyboard, pointing device, display 691, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 600, and / or communicate with any device that enables the electronic device 600 to communicate with one or more other computing devices (e.g., network card, modem, etc.). Such communication may be performed via an input / output (I / O) interface 692. Furthermore, the electronic device 600 may also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN) and / or public network, such as the Internet) via a network adapter 693. As shown, the network adapter 693 communicates with other modules of the electronic device 600 via a bus 630. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0166] The processor 620 executes various functional applications and data processing by running the programs stored in the memory 610 .
[0167] In order to implement the above embodiments, the present application also proposes a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the methods provided by the above embodiments.
[0168] In order to implement the above embodiments, the present application also proposes a computer program product, including a computer program, which implements the methods provided by the above embodiments when executed by a processor.
[0169] The collection, storage, use, processing, transmission, provision and disclosure of user personal information involved in this application are in compliance with relevant laws and regulations and do not violate public order and good morals.
[0170] It should be noted that personal information from users should be collected for legitimate and reasonable purposes and should not be shared or sold outside of these legitimate uses. In addition, such collection / sharing should be carried out after receiving the user's informed consent, including but not limited to notifying the user to read the user agreement / user notice and sign the agreement / authorization including authorization of relevant user information before the user uses the function. In addition, any necessary steps should be taken to protect and safeguard access to such personal information data and ensure that others who have access to personal information data comply with its privacy policy and procedures.
[0171] The present application is expected to provide an implementation scheme for users to selectively block the use or access of personal information data. That is, the present disclosure is expected to provide hardware and / or software to prevent or block access to such personal information data. Once the personal information data is no longer needed, the risk can be minimized by limiting data collection and deleting the data. In addition, when applicable, such personal information is de-identified to protect the privacy of the user.
[0172] In the description of the aforementioned embodiments, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.
[0173] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0174] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code comprising one or more executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.
[0175] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute the instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purpose of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.
[0176] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0177] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.
[0178] In addition, each functional unit in each embodiment of the present application may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.
[0179] The storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, etc. Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limiting the present application. A person of ordinary skill in the art may change, modify, replace and modify the above embodiments within the scope of the present application.
Claims
1. An application deployment method, characterized in that: The method comprises the following steps: Obtaining an application product package of a target application, common deployment variables common to multiple test environments of the target application, and differential deployment variables for each test environment; Deploy the application artifact package to the component assembly test environment according to the common deployment variables and the difference deployment variables of the component assembly test environment in the multiple test environments, so as to perform component assembly test on the target application in the component assembly test environment; In response to the target application passing the component assembly test, the application artifact package is deployed to the target application assembly test environment based on the common deployment variables and the differential deployment variables of the target application assembly test environment in the multiple test environments, so as to perform application assembly testing on the target application in the target application assembly test environment.
2. The method according to claim 1, characterized in that The step of obtaining the application product package of the target application program includes: The code of the target application is compiled and packaged using a preset automated deployment standard to obtain the standardized application product package: wherein the automated deployment standard is used to standardize the application deployment script and the data deployment script contained in the application product package.
3. The method according to claim 2, characterized in that The automated deployment standard includes a first script specification and a second script specification, wherein the first script specification is used to define that the application deployment script includes a script of a preset application change step, and the second script specification is used to define that the data deployment script includes a script of a preset data change step. The preset automated deployment standard is used to compile and package the code of the target application to obtain the standardized application product package, including: Determining a first application change step involved in the target application program from predefined candidate application change steps; Determining a first data change step involved in the target application from predefined candidate data change steps; In response to the first application change step being the preset application change step and the first data change step being the preset data change step, based on the script of the first application change step and the script of the first application change step, the code of the target application is compiled and packaged to obtain the application product package.
4. The method according to claim 1, characterized in that The step of deploying the application product package to the target application assembly test environment according to the common deployment variables and the difference deployment variables of the target application assembly test environment in the multiple test environments includes: Verifying the availability of the application product package; In response to the application artifact package passing the availability verification, the application artifact package is deployed to the target application assembly test environment based on the common deployment variables and the differential deployment variables of the target application assembly test environment in the multiple test environments, so as to perform application assembly testing on the target application in the target application assembly test environment.
5. The method according to claim 4, characterized in that The verification of the availability of the application product package includes: Obtain regression test cases for interface automation testing tools; The availability of the application product package is verified by reusing the regression test cases of the automated testing tool of the interface.
6. The method according to claim 1, characterized in that The step of deploying the application artifact package to the component assembly test environment according to the common deployment variables and the difference deployment variables of the component assembly test environment in the multiple test environments includes: Obtaining a deployment process of the application product package; wherein the deployment process includes a plurality of process nodes; In response to the deployment process executing to a process node among the multiple process nodes for indicating deployment to the component assembly test environment, the application artifact package is deployed to the component assembly test environment according to the common deployment variables and the differential deployment variables of the component assembly test environment.
7. The method according to any one of claims 1 to 6, characterized in that Also includes: Determine the product version of the application product package and the production point to which the product version belongs; Comparing the production point to which the product version belongs with the production points to which the test tasks of the multiple candidate application assembly test environments belong respectively; Determine, from the multiple candidate application assembly and test environments, an application assembly and test environment whose production point is closest to the production point to which the product version belongs; The most recent application assembly test environment is determined as the target application assembly test environment.
8. The method according to any one of claims 1 to 6, characterized in that Also includes: Obtaining common components required for the target application assembly test environment; Deploy the common components to the target application assembly test environment.
9. The method according to any one of claims 1 to 6, characterized in that: The server where the component assembly test environment is located is connected to the database server of the target application assembly test environment.
10. An application deployment device, characterized in that: include: A first acquisition module is used to acquire an application product package of a target application, common deployment variables common to multiple test environments of the target application, and differential deployment variables of each test environment; A deployment module, configured to deploy the application artifact package to the component assembly test environment according to the common deployment variables and the difference deployment variables of the component assembly test environment in the multiple test environments, so as to perform component assembly testing on the target application in the component assembly test environment; The deployment module is also used to deploy the application artifact package to the target application assembly test environment in response to the target application passing the component assembly test, according to the common deployment variables and the differential deployment variables of the target application assembly test environment in the multiple test environments, so as to perform application assembly testing on the target application in the target application assembly test environment.
11. An electronic device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 9 when executed by a processor.
13. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 9 when being executed by a processor.
