Forward and backward iteration demand verification method for deployment
By performing backup and bidirectional iterative testing in a shadow environment, the problem of parallel testing of multiple requirements in the test environment was solved, enabling accurate deployment in the production environment and rapid problem discovery, thereby improving the accuracy of testing and the efficiency of resource utilization.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA TOBACCO YUNNAN IND
- Filing Date
- 2022-12-09
- Publication Date
- 2026-04-14
AI Technical Summary
In existing technologies, when multiple business requirements are tested in parallel in a test environment, problems may be masked, causing errors to be discovered only after deployment to the production environment.
The deployment method adopts a forward and reverse iterative requirement verification approach. By backing up and testing in the shadow environment, the consistency between the shadow environment and the production environment is ensured. Bidirectional iterative testing is carried out between the shadow environment and the test environment until it passes the test before it is deployed to the production environment.
It effectively avoids bug leaks caused by environmental differences, improves testing accuracy, saves IT resources, quickly identifies the cause of problems, and prevents problems from being masked when multiple requirements are tested in parallel in the testing environment.
Smart Images

Figure CN115774676B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and in particular to a method for deploying forward and reverse iterative requirements verification. Background Technology
[0002] Once a business requirement is developed, it is tested in a test environment. Only after passing the tests is it deployed to the production environment. Currently, deployment and verification are performed sequentially according to the development, testing, integration, and production stages. Because multiple business requirements may be tested simultaneously in the test environment, some issues may be masked, only to appear as errors after deployment to the production environment.
[0003] Therefore, there is an urgent need for a method to verify deployment through iterative forward and reverse requirements. Summary of the Invention
[0004] The purpose of this invention is to provide a method for iterative verification deployment of requirements, in order to solve the problems in the prior art, and to expose production environment problems in the test environment, so as to avoid bugs appearing only after deployment to the production environment.
[0005] This invention provides a method for forward and reverse iterative requirement verification deployment, comprising:
[0006] The elements of the shadow environment are backed up based on the elements of the production environment, wherein the elements of the shadow environment are the same as the elements of the production environment, and the configuration of the shadow environment is lower than that of the production environment.
[0007] The production environment is subjected to forward testing. The business requirements are tested in the test environment. After the test is passed in the test environment, the business requirements are deployed to the shadow environment. After the test is passed in the shadow environment, the business requirements are then deployed to the production environment.
[0008] The production environment is reverse tested, and the business requirements are tested in the shadow environment. After passing the test in the shadow environment, the business requirements are deployed to the test environment. After passing the test in the test environment, the business requirements are then deployed to the production environment.
[0009] The method for positive and negative iterative requirement verification deployment as described above, preferably, involves using a production environment that is actually used by the customer, and deploying corresponding applications according to the customer's business type.
[0010] In the method of forward and reverse iterative requirement verification deployment described above, preferably, the shadow environment is a homogeneous, low-configuration environment of the production environment, used for testing business requirements.
[0011] The method for forward and reverse iterative requirement verification deployment as described above, preferably, involves a test environment that is a business development test environment, configured according to the actual server environment.
[0012] In the method for forward and reverse iterative requirement verification deployment described above, preferably, the elements of the production environment, the shadow environment, and the test environment include environment variables, parameter configurations, and business data.
[0013] The method for iterative verification deployment as described above, preferably, includes backing up elements of the shadow environment based on elements of the production environment, specifically comprising:
[0014] The elements of the shadow environment are mirrored and backed up based on the elements of the production environment, so that the deployment architecture, environment configuration, business data and third-party interfaces of the shadow environment are consistent with the production environment.
[0015] The method for forward and reverse iterative requirement verification deployment as described above, preferably, involves performing forward testing on the production environment, testing the business requirements in the test environment, deploying the business requirements to the shadow environment after passing the test in the test environment, and then deploying the business requirements to the production environment after passing the test in the shadow environment. Specifically, this includes:
[0016] The business requirements were tested in the test environment.
[0017] Deploy the business requirements from the test environment that passed the test to the shadow environment and test again;
[0018] If the test in the shadow environment is successful, the business requirements in the shadow environment that have passed the test will be deployed to the production environment.
[0019] If the test fails in the shadow environment, the environment configuration of the test environment is adjusted according to the differences between the test environment and the shadow environment.
[0020] Return to the steps for testing the business requirements in the test environment until the positive test passes.
[0021] The method for forward and reverse iterative requirement verification deployment as described above, preferably, involves performing reverse testing on the production environment, testing the business requirements in the shadow environment, deploying the business requirements to the test environment after passing the test in the shadow environment, and then deploying the business requirements to the production environment after passing the test in the test environment. Specifically, this includes:
[0022] Test the business requirements in the shadow environment;
[0023] Deploy the business requirements from the shadow environment that passed the test to the test environment and test again;
[0024] If the test passes in the test environment, the business requirements in the test environment that have passed the test will be deployed to the production environment.
[0025] If the test fails in the test environment, the environment configuration of the test environment is adjusted according to the differences between the test environment and the shadow environment.
[0026] Return to the steps for testing the business requirements in the shadow environment until the reverse test passes.
[0027] The method for deploying forward and reverse iterative requirement verification as described above, preferably, further includes:
[0028] Multiple business requirements are tested alternately using both forward and reverse testing. Only after all forward and reverse tests of multiple business requirements have passed are they deployed to the production environment.
[0029] This invention provides a method for forward and reverse iterative requirement verification deployment. It backs up elements of the production environment to a shadow environment and restores the relevant configurations and data from the production environment, ensuring consistency between the deployment architecture, environment variables, parameter configurations, and business data. This effectively addresses the issue of excessively high bug leakage rates caused by environmental differences. Furthermore, the preparation of a homogeneous, low-configuration shadow environment conserves IT resources. Business requirements that have passed testing in the shadow environment are deployed to the test environment for reverse iteration. By performing bidirectional verification against the production environment, this forward and reverse iterative deployment verification method facilitates easy comparison of environmental differences, quickly identifies the root cause of problems, and improves testing accuracy. It also avoids the problem of bugs being masked when multiple requirements are tested concurrently in the test environment. Attached Figure Description
[0030] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described below with reference to the accompanying drawings, wherein:
[0031] Figure 1 A flowchart illustrating an embodiment of the method for deploying forward and reverse iterative requirement verification provided by the present invention;
[0032] Figure 2 This is a schematic diagram illustrating the working principle of an embodiment of the forward and reverse iterative requirement verification deployment method provided by the present invention. Detailed Implementation
[0033] Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. The descriptions of the exemplary embodiments are merely illustrative and are in no way intended to limit the present disclosure or its application or use. The present disclosure may be implemented in many different forms and is not limited to the embodiments described herein. These embodiments are provided so that the present disclosure will be thorough and complete, and will fully express the scope of the disclosure to those skilled in the art. It should be noted that, unless specifically stated otherwise, the relative arrangement of components and steps, the composition of materials, numerical expressions, and values set forth in these embodiments should be interpreted as exemplary only and not as limiting.
[0034] The terms “first,” “second,” and similar terms used in this disclosure do not indicate any order, quantity, or importance, but are merely used to distinguish different parts. Terms such as “including” or “contains” mean that the element preceding the term encompasses the element listed after it, and do not exclude the possibility of encompassing other elements as well. Terms such as “above” and “below” are used only to indicate relative positional relationships; when the absolute position of the described object changes, this relative positional relationship may also change accordingly.
[0035] In this disclosure, when a specific component is described as being located between a first component and a second component, an intermediary component may or may not be present between the specific component and the first or second component. When a specific component is described as connecting to other components, the specific component may be directly connected to the other components without having an intermediary component, or it may not be directly connected to the other components but may have an intermediary component.
[0036] All terms used in this disclosure (including technical or scientific terms) have the same meaning as understood by one of ordinary skill in the art to which this disclosure pertains, unless otherwise specifically defined. It should also be understood that terms defined in a general dictionary, such as a dictionary, should be interpreted as having a meaning consistent with their meaning in the context of the relevant art, and not as having an idealized or highly formalized meaning, unless expressly defined herein.
[0037] Techniques, methods, and equipment known to those skilled in the art may not be discussed in detail, but where appropriate, they should be considered part of the specification.
[0038] like Figure 1 and Figure 2 As shown, the method for forward and reverse iterative requirement verification deployment provided in this embodiment includes the following steps in actual execution:
[0039] Step S1: Back up the elements of the shadow environment based on the elements of the production environment, wherein the elements of the shadow environment are the same as the elements of the production environment, and the configuration of the shadow environment is lower than that of the production environment.
[0040] The elements of the production environment and the shadow environment include environment variables, parameter configurations, and business data. The shadow environment is a low-configuration environment homogeneous with the production environment, used for testing business requirements, and the related application deployments are consistent with the production environment.
[0041] The production environment refers to the environment actually used by the customer, and corresponding applications are deployed according to the customer's business type. The environment variables, parameter configurations, and business data used in the production environment are all configured based on the actual production environment and business. In specific implementations, corresponding applications can be deployed according to the actual situation of the customer's business, and this invention does not impose specific limitations on this.
[0042] Specifically, the elements of the shadow environment are mirrored and backed up based on the elements of the production environment to ensure that the deployment architecture, environment configuration, business data, and third-party interfaces of the shadow environment are consistent with the production environment. Environment variables and parameter configurations in the shadow environment are also consistent with the production environment, with configuration values adjusted according to actual environment data. Depending on the actual database size, only production business data for the corresponding month, quarter, or year can be imported. Through mirroring and backup, a low-configuration shadow environment can simulate the realism of tests conducted in the production environment to the greatest extent possible with limited resources, ensuring maximum simulation accuracy.
[0043] Step S2: Perform forward testing on the production environment. Test the business requirements in the test environment. After the test is passed in the test environment, deploy the business requirements to the shadow environment. After the test is passed in the shadow environment, deploy the business requirements to the production environment.
[0044] The test environment is a business development testing environment, configured according to the actual server environment. Furthermore, the elements of the test environment include environment variables, parameter configurations, and business data. The actual deployment configuration of the test environment is based on the actual server environment and is not consistent with the production environment. Environment variables, parameter configurations, and business data are all configured specifically for the test environment.
[0045] The forward testing process is as follows: customer submits business requirements -> development in the development environment -> testing in the test environment -> testing in the shadow test environment -> deployment to the production environment. In one embodiment of the forward and reverse iterative requirement verification and deployment method of the present invention, step S2 may specifically include:
[0046] Step S21: Test the business requirements in the test environment.
[0047] Step S22: Deploy the business requirements from the tested environment to the shadow environment and test again.
[0048] Step S23: If the test in the shadow environment is successful, the business requirements in the shadow environment that have passed the test will be deployed to the production environment.
[0049] Step S24: If the test fails in the shadow environment, adjust the environment configuration of the test environment according to the differences between the test environment and the shadow environment.
[0050] Step S25: Return to the steps of testing the business requirements in the test environment until the positive test is successful.
[0051] In one embodiment of this invention, if business requirement A works without issue in the test environment but consistently fails to run the scheduled task in the shadow environment, remaining in a running state after startup, checking the backend logs reveals that messages are being sent to AMQ correctly, but no messages are being consumed. Comparing the requirement code in the test environment and the shadow environment confirms consistency, indicating an environment-related issue. It was discovered that the application in the test environment was deployed on a financial cloud server, while the shadow and production environments were deployed separately from the financial cloud. This caused AMQ messages sent using the financial cloud identifier to fail to be consumed correctly within the current application, resulting in the scheduled task remaining in a running state. Correctly identifying the requirement code using the correct identifier from the current application resolved the problem.
[0052] Step S3: Perform reverse testing on the production environment, test the business requirements in the shadow environment, and after the test is passed in the shadow environment, deploy the business requirements to the test environment. After the test is passed in the test environment, deploy the business requirements to the production environment.
[0053] The reverse testing process is as follows: customer submits business requirements -> develop in the development environment -> test in the shadow testing environment -> test in the testing environment -> deploy to the production environment. In one embodiment of the forward and reverse iterative requirement verification and deployment method of the present invention, step S3 may specifically include:
[0054] Step S31: Test the business requirements in the shadow environment.
[0055] Step S32: Deploy the business requirements from the shadow environment that have passed the test to the test environment and test again.
[0056] Step S33: If the test in the test environment is successful, then the business requirements in the test environment that have passed the test will be deployed to the production environment.
[0057] Step S34: If the test fails in the test environment, adjust the environment configuration of the test environment according to the differences between the test environment and the shadow environment.
[0058] Step S35: Return to the steps of testing the business requirements in the shadow environment until the reverse test is successful.
[0059] In one embodiment of the present invention, business requirement A can be first deployed to a test environment, then deployed to a shadow environment after passing the test, and finally deployed to the production environment after passing the shadow environment, thus achieving forward testing; alternatively, business requirement A can be first deployed to a shadow environment, then deployed to a test environment after passing the shadow environment, and finally deployed to the production environment after passing the shadow environment, thus achieving reverse testing.
[0060] This invention constructs a homogeneous, low-configuration shadow environment to restore the relevant configurations and data of the production environment, ensuring consistency between the deployment architecture, environment variables, parameter configurations, and business data. Business requirements are then deployed to the shadow environment for testing. The business requirements from the successfully tested shadow environment are deployed to the test environment and tested again. If the test passes, the requirements are deployed to the production environment; if the test fails, the differences between the two environments can be compared to quickly diagnose the problem and find the cause.
[0061] In some embodiments of the present invention, the method for forward and reverse iterative requirement verification deployment further includes:
[0062] Step S4: Perform forward and reverse testing on multiple business requirements alternately. After both forward and reverse testing of multiple business requirements are passed, deploy multiple business requirements to the production environment.
[0063] In one embodiment of this invention, if business requirement A and business requirement B simultaneously modify the same document, the purpose of comprehensive testing can be achieved through repeated deployment of forward and reverse tests. For example, business requirement A is first deployed to a test environment, and business requirement B is first deployed to a shadow environment. After business requirement A passes the test in the test environment, it is then deployed to the shadow environment for forward testing of business requirement A, while simultaneously verifying the test scenario where business requirement B is deployed first and then business requirement A is deployed later. After business requirement B passes the test in the shadow environment, it is then deployed to the test environment for reverse testing of business requirement B, while simultaneously verifying the test scenario where requirement A is deployed first and then business requirement B is deployed later. After both environments have passed verification, the production environment is then deployed.
[0064] The forward and reverse iterative requirement verification deployment method provided in this invention backs up elements of the production environment to a shadow environment and restores the relevant configurations and data of the production environment. This ensures that the deployment architecture, environment variables, parameter configurations, business data, and production environment are consistent, effectively improving the problem of excessively high bug leakage rates caused by different environments. At the same time, the preparation method of the homogeneous and low-configuration shadow environment can save IT resources. Deploying business requirements that have passed the test in the shadow environment to the test environment for reverse iteration, and performing bidirectional verification of the production environment, the forward and reverse iterative deployment verification method can easily compare environmental differences, quickly find the cause of the problem, and improve the accuracy of testing. It also avoids the problem of bugs being masked when multiple requirements are tested in parallel in the test environment.
[0065] The embodiments of this disclosure have now been described in detail. To avoid obscuring the concept of this disclosure, some details known in the art have not been described. Those skilled in the art can fully understand how to implement the technical solutions disclosed herein based on the above description.
[0066] While specific embodiments of this disclosure have been described in detail by way of examples, those skilled in the art should understand that the examples are for illustrative purposes only and not intended to limit the scope of this disclosure. Those skilled in the art should understand that modifications can be made to the above embodiments or equivalent substitutions can be made to some technical features without departing from the scope and spirit of this disclosure. The scope of this disclosure is defined by the appended claims.
Claims
1. A method for iterative requirement verification and deployment, characterized in that, include: The elements of the shadow environment are backed up based on the elements of the production environment, wherein the elements of the shadow environment are the same as the elements of the production environment, and the configuration of the shadow environment is lower than that of the production environment. Forward testing is performed on the production environment. Business requirements are tested in the test environment. After passing the test in the test environment, the business requirements are deployed to the shadow environment. After passing the test in the shadow environment, the business requirements are then deployed to the production environment. If the test in the shadow environment fails, the environment configuration of the test environment is adjusted according to the differences between the test environment and the shadow environment. The production environment is reverse tested, and the business requirements are tested in the shadow environment. After the test is passed in the shadow environment, the business requirements are deployed to the test environment. After the test is passed in the test environment, the business requirements are then deployed to the production environment. If the test fails in the test environment, the environment configuration of the test environment is adjusted according to the differences between the test environment and the shadow environment. Multiple business requirements are tested alternately using both forward and reverse testing. Only after all forward and reverse tests of multiple business requirements have passed are they deployed to the production environment.
2. The method for forward and reverse iterative requirement verification deployment according to claim 1, characterized in that, The production environment is the environment actually used by the customer, and the corresponding applications are deployed according to the customer's business type.
3. The method for forward and reverse iterative requirement verification deployment according to claim 1, characterized in that, The shadow environment is a low-configuration environment that is homogeneous with the production environment and is used for testing business requirements.
4. The method for forward and reverse iterative requirement verification deployment according to claim 1, characterized in that, The test environment is for business development testing and is configured according to the actual server environment.
5. The method for forward and reverse iterative requirement verification deployment according to claim 1, characterized in that, The elements of the production environment, the shadow environment, and the test environment include environment variables, parameter configurations, and business data.
6. The method for forward and reverse iterative requirement verification deployment according to claim 1, characterized in that, The process of backing up elements of the shadow environment based on elements of the production environment specifically includes: The elements of the shadow environment are mirrored and backed up based on the elements of the production environment, so that the deployment architecture, environment configuration, business data and third-party interfaces of the shadow environment are consistent with the production environment.
7. The method for forward and reverse iterative requirement verification deployment according to claim 1, characterized in that, The process of performing forward testing on the production environment, testing business requirements in the test environment, deploying the business requirements to the shadow environment after passing the test in the test environment, and then deploying the business requirements to the production environment after passing the test in the shadow environment, specifically includes: The business requirements were tested in the test environment. Deploy the business requirements from the test environment that passed the test to the shadow environment and test again; If the test in the shadow environment is successful, the business requirements in the shadow environment that have passed the test will be deployed to the production environment. If the test fails in the shadow environment, the environment configuration of the test environment is adjusted according to the differences between the test environment and the shadow environment. Return to the steps for testing the business requirements in the test environment until the positive test passes.
8. The method for forward and reverse iterative requirement verification deployment according to claim 1, characterized in that, The process of reverse testing the production environment, testing business requirements in the shadow environment, deploying the business requirements to the test environment after passing the test in the shadow environment, and then deploying the business requirements to the production environment after passing the test in the test environment, specifically includes: Test the business requirements in the shadow environment; Deploy the business requirements from the shadow environment that passed the test to the test environment and test again; If the test passes in the test environment, the business requirements in the test environment that have passed the test will be deployed to the production environment. If the test fails in the test environment, the environment configuration of the test environment is adjusted according to the differences between the test environment and the shadow environment. Return to the steps for testing the business requirements in the shadow environment until the reverse test passes.
Citation Information
Patent Citations
Multiple Jenkins-based continuous deployment method and system
CN107463362A
Method and device based on simulation-platform offline environment checking
CN108536521A