A testing method and testing system for a multi-environment multi-role version release system

CN114625630BActive Publication Date: 2024-10-01FUJIAN TIANQUAN EDUCATION TECH LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011474492.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-14
Publication Date
2024-10-01
Estimated Expiration
2040-12-14

AI Technical Summary

Technical Problem

流程分支组合较多且人工进行测试应用个数、发布的版本数有限,覆盖率可能无法把握

Benefits of technology

[0031] The beneficial effects of the present invention are: 1. The testing method can replace manual efforts to quickly verify the smooth release function, free up manpower investment, reduce duplication of work, and improve testing efficiency. 2. Different roles perform smooth release processes in different environments, and the number of manual test applications and the number of released versions is limited. Automated verification can achieve functional coverage in a relatively short period of time. 3. Use automated script tools to continuously monitor service availability, domain name access, and instance survival monitoring before and after release to improve test accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114625630B_ABST
    Figure CN114625630B_ABST
Patent Text Reader

Abstract

The invention provides a testing method for a multi-environment multi-role version publishing system, which comprises the following steps: 1. before a publishing system performs version publishing, an application ID to be smoothly published, a publishing corresponding environment, a version number, a current version war address, a cluster corresponding domain name status, a version war package to be published, and an application member role authority list are obtained; 2. a role with publishing authority performs simulated smooth publishing, and after the simulated publishing is completed, a test script is used to verify whether the system runs normally before and after the publishing; 3. after the script is executed, the test result is written into a test report; 4. a jenkins continuous integration tool is used to perform continuous integration construction, which is executed regularly, a test report is output, and the result is pushed to corresponding personnel, and the test report is stored in a content server, so as to facilitate subsequent data analysis of failure causes and pass rates; the invention can realize rapid verification of a smooth publishing function and improve test efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of web software development, in particular to a testing method and a testing system for a multi-environment multi-role version publishing system. Background Art

[0002] The shared platform - developer service is a basic platform for existing enterprise developers to collaborate on one-stop development, management and deployment. Smooth release is a release method that supports multiple environments and multiple roles in Web applications, releases instances one by one, and guarantees instance availability during the release, so that online operations are not affected. In the process of daily testing and version iteration testing, there are many branch processes and combinations, which require a large amount of labor costs for walkthrough verification. Therefore, it is necessary to introduce a tool that supports automatic verification of multi-environment and multi-role smooth release versions to improve testing efficiency and continuously monitor the availability of services before and after release.

[0003] Currently, there are several problems with using manual testing methods to test smooth release:

[0004] Support the release of different environments. If testing is performed in each environment one by one, too much manpower will be invested, the efficiency will be low, and the process will be repetitive.

[0005] (1) Support smooth release by creators, main programmers, developers, and application operation and maintenance interface personnel of different roles, and review by test managers, testers, and planners. There are many process branch combinations, and the number of manually tested applications and released versions is limited, so the coverage rate may not be guaranteed.

[0006] (2) During the smooth release process and after the release is completed, the availability of the service, whether the domain name access is normal, whether the war is released correctly, and whether the instance is alive cannot be continuously and effectively monitored.

[0007] 1. Development environment: As the name implies, it is the environment used by developers when developing. Each developer works on his own dev branch. Before testing or when the development reaches a certain level, the students will merge the code and conduct joint debugging. 2. Test environment: This is the environment where the testers work. Generally, the testers will deploy it themselves and then test it in this environment. After the bug is fixed, it is necessary to release a new version to update the test environment to regress the bug. 3. Regression environment: The environment for regression bugs is actually the test environment. The bugs are tested and regressed in the test environment. 4. Pre-release environment: The transition from the test environment to the production environment; the test environment may be subject to some restrictions. If some processes or data are not tested, they can be verified in the pre-release environment to ensure the quality of the product launch; the difference between the pre-release environment and the production environment: 1) The new functions in the pre-release environment are the latest code, and the other function codes are consistent with the production environment. 2) The access domain names of the pre-release environment and the production environment are different. 5. Production environment: That is, the online environment, the environment used by users. It is maintained by specific personnel, and ordinary people do not have the authority to modify it; in addition, there is a grayscale release, which occurs after the pre-release environment and before the production environment. Summary of the invention

[0008] In order to overcome the above problems, the purpose of the present invention is to provide a testing method for a multi-environment multi-role version publishing system, which can realize rapid verification of the smooth publishing function and improve the test accuracy.

[0009] The present invention is implemented by the following scheme: a testing method for a multi-environment multi-role version publishing system, the testing method comprising the following steps:

[0010] Step S1: Before the release system releases a version, obtain the application ID to be smoothly released, the corresponding release environment, the version number, the current version war address, the domain name status corresponding to the cluster, the version war package to be released, and the application member role permission list;

[0011] Step S2: A role with publishing authority simulates smooth publishing. After the simulated publishing is completed, the test script is used to verify whether the domain name status before and after the publishing is normal, whether the war package after the publishing is the latest version, and whether the instance status is alive, so as to determine whether the publishing is normal.

[0012] Step S3: After the script is executed, the test results are written into the test report. If the test fails, the error log details are output;

[0013] Step S4: Use the Jenkins continuous integration tool to perform continuous integration build, execute regularly, output test reports, and push the results to relevant personnel. The test reports are stored on the content server to facilitate subsequent data analysis of failure causes and pass rates.

[0014] Furthermore, the step S2 is further specifically as follows: step S21, role account login, determine whether the current operating role has publishing authority, if the current role does not have publishing authority, switch to an account with publishing authority, if the role has publishing authority, smoothly publish;

[0015] Step S22: When releasing a non-production environment, a simulated smooth release is directly performed; when releasing a production environment, the version is first released in the pre-production environment, and a test review is performed. After the review is performed by a role with release authority, a simulated smooth release is performed in the production environment;

[0016] Step S23, after the simulation of smooth release is completed, use the test script to poll and query before and after the release to monitor whether the released application domain name is normally accessed, whether the domain name status is 200, whether the instance status is alive, and use md5 to compare whether the war address before and after the release is the latest version.

[0017] Furthermore, the functions of the test script include initialization parameter configuration, simulation of release test cases, automated verification before and after release, and output of test results; the initialization parameter configuration, namely, configuration of the script running environment, application ID, release corresponding environment, and version number; the automated verification before and after release, namely, domain name status monitoring verification, instance status monitoring verification, application domain name access verification, and verification of whether the released war address is correct.

[0018] Furthermore, the test report includes the date and time of the test execution, interface running time, running status pass and fail statistics, whether the test case passed, whether the domain name and instance status and war address were correctly verified, and error log detail information output.

[0019] Furthermore, the continuous integration build is specifically as follows: scheduling through the configured time, scheduling the test script to execute the test, and checking the completion of the test script execution during the test process, tracking the execution status of the test script, and whether the execution fails.

[0020] A test system for a multi-environment multi-role version publishing system of the present invention comprises an information acquisition module, a verification module, a test result output module, and a test report processing module;

[0021] The information acquisition module is used to obtain the application ID to be smoothly released, the corresponding release environment, the version number, the current version war address, the domain name status corresponding to the cluster, the version war package to be released, and the application member role permission list before the release system releases the version;

[0022] The verification module is used to simulate smooth release by roles with release authority. After the simulated release is completed, the test script is used to verify whether the domain name status before and after the release is normal, whether the war package after the release is the latest version, and whether the instance status is alive, so as to determine whether the release is normal;

[0023] The test result output module is used to write the test results into the test report after the script is executed, and output the error log details after the test fails;

[0024] The test report processing module uses the Jenkins continuous integration tool to perform continuous integration construction, executes regularly, outputs test reports, and pushes the results to relevant personnel. The test reports are stored on the content server to facilitate subsequent data analysis of failure reasons and pass rates.

[0025] Furthermore, the verification module is implemented in a further specific manner as follows: log in with a role account, determine whether the current operating role has the publishing authority, if the current role does not have the publishing authority, switch to an account with publishing authority, if the role has the publishing authority, smoothly publish;

[0026] To release a non-production environment, perform a simulated smooth release directly; to release a production environment, first release the version in the pre-production environment and conduct a test review. After the review is conducted by a role with release permissions, perform a simulated smooth release in the production environment.

[0027] After the simulated smooth release is completed, use the test script to poll and query before and after the release to monitor whether the released application domain name is normally accessed, whether the domain name status is 200, whether the instance status is alive, and use md5 to compare the war address before and after the release to see if it is the latest version.

[0028] Furthermore, the functions of the test script include initialization parameter configuration, simulation of release test cases, automated verification before and after release, and output of test results; the initialization parameter configuration, namely, configuration of the script running environment, application ID, release corresponding environment, and version number; the automated verification before and after release, namely, domain name status monitoring verification, instance status monitoring verification, application domain name access verification, and verification of whether the released war address is correct.

[0029] Furthermore, the test report includes the date and time of the test execution, interface running time, running status pass and fail statistics, whether the test case passed, whether the domain name and instance status and war address were correctly verified, and error log detail information output.

[0030] Furthermore, the continuous integration build is specifically as follows: scheduling through the configured time, scheduling the test script to execute the test, and checking the completion of the test script execution during the test process, tracking the execution status of the test script, and whether the execution fails.

[0031] The beneficial effects of the present invention are: 1. The test method can replace manual verification of the smooth release function, free up manpower, reduce duplication of work, and improve test efficiency. 2. Different roles can smoothly release the process in different environments, and the number of manual test applications and the number of release versions are limited. Automated verification can achieve functional coverage in a relatively short time. 3. Use automated script tools to continuously monitor service availability, domain name access, and instance survival monitoring before and after release to improve test accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Figure 1 It is a schematic flow chart of the method of the present invention.

[0033] Figure 2 It is a flowchart of executing a test in one embodiment of the present invention.

[0034] Figure 3 It is a principle block diagram of the test script composition of the present invention.

[0035] Figure 4 It is a system principle block diagram of the present invention. DETAILED DESCRIPTION

[0036] The present invention will be further described below in conjunction with the accompanying drawings.

[0037] See also Figure 1 As shown, a testing method for a multi-environment multi-role version publishing system of the present invention comprises the following steps:

[0038] Step S1: Before the release system releases a version, obtain the application ID to be smoothly released, the corresponding release environment, the version number, the current version war address, the domain name status corresponding to the cluster, the version war package to be released, and the application member role permission list;

[0039] Step S2: A role with publishing authority simulates smooth publishing. After the simulated publishing is completed, the test script is used to verify whether the domain name status before and after the publishing is normal, whether the war package after the publishing is the latest version, and whether the instance status is alive, so as to determine whether the publishing is normal.

[0040] Step S3: After the script is executed, the test results are written into the test report. If the test fails, the error log details are output;

[0041] Step S4: Use the Jenkins continuous integration tool to perform continuous integration build, execute regularly, output test reports, and push the results to relevant personnel. The test reports are stored on the content server to facilitate subsequent data analysis of failure causes and pass rates.

[0042] The present invention will be further described below in conjunction with a specific embodiment:

[0043] A testing method for a multi-environment multi-role version publishing system of the present invention comprises:

[0044]

Preparation before test

[0045] (1) Before the version is released, obtain the application ID to be smoothly released, the corresponding release environment, the version number, the current version war address, and the domain name status of the cluster.

[0046] (2) Obtain the role permission list of the application to be released.

[0047] (3) The war package of the version to be released.

[0048] See also Figure 2 As shown, [Execute Test]:

[0049] (1) Log in with a role account to determine whether the current operating role has publishing permissions. If the current role does not have publishing permissions, switch to an account with publishing permissions. If the role has publishing permissions (creator, application operation and maintenance interface person, developer), smooth publishing is performed.

[0050] (2) When releasing to a non-production environment, a simulated smooth release is performed directly. When releasing to a production environment, the version is first released to a pre-production environment and then submitted for testing and review. After review by a role with release authority (tester, test leader, planner), a simulated smooth release is performed to the production environment.

[0051] (3) After the simulation of smooth release is completed, use the Python automated test script to poll and query before and after the release to monitor whether the released application domain name is normally accessible, whether the domain name status is 200, whether the instance status is alive, and use md5 to compare the war address before and after the release to see if it is the latest version. Figure 3 As shown, the functions of the python automated test script include initialization parameter configuration, simulation release test cases, automated verification before and after release, and output of test results; the initialization parameter configuration, i.e., configuration of the script running environment, application ID, release corresponding environment, and version number; the automated verification before and after release, i.e., domain name status monitoring verification, instance status monitoring verification, application domain name access verification, and verification of whether the released war address is correct.

[0052]

Test result collection

[0053] (1) If the test result passes, the passing result will be written into the test report.

[0054] (2) If the test result fails, the error log details will be output for easy analysis.

[0055] (3) Use continuous integration tools to perform continuous integration builds, execute them regularly, output test reports, and push the results to relevant personnel. The test reports are stored on the content server to facilitate subsequent data analysis of failure causes and pass rates. The test report includes the date and time of the test execution, interface running time, running status pass and failure statistics, whether the test case passed, domain name and instance status and war address are correctly verified, and error log details information output. The continuous integration build specifically includes: scheduling according to the configured time, scheduling test scripts to execute tests, and checking the completion of test script execution during the test process, tracking the execution of test scripts, and whether the execution fails.

[0056] See also Figure 4 As shown, a test system for a multi-environment multi-role version publishing system of the present invention includes an information acquisition module, a verification module, a test result output module, and a test report processing module;

[0057] The information acquisition module is used to obtain the application ID to be smoothly released, the corresponding release environment, the version number, the current version war address, the domain name status corresponding to the cluster, the version war package to be released, and the application member role permission list before the release system releases the version;

[0058] The verification module is used to simulate smooth release by roles with release authority. After the simulated release is completed, the test script is used to verify whether the domain name status before and after the release is normal, whether the war package after the release is the latest version, and whether the instance status is alive, so as to determine whether the release is normal;

[0059] The test result output module is used to write the test results into the test report after the script is executed, and output the error log details after the test fails;

[0060] The test report processing module uses the Jenkins continuous integration tool to perform continuous integration construction, executes regularly, outputs test reports, and pushes the results to the relevant personnel. The test reports are stored on the content server to facilitate subsequent data analysis of failure reasons and pass rates. The continuous integration construction specifically includes: scheduling at the configured time, scheduling test scripts to execute tests, checking the completion of test script execution during the test process, tracking the execution of test scripts, and whether the execution fails.

[0061] The verification module is implemented in the following way: log in with a role account, determine whether the current operating role has the publishing authority, and if the current role does not have the publishing authority, switch to an account with publishing authority, and if the role has the publishing authority, smoothly publish;

[0062] To release a non-production environment, perform a simulated smooth release directly; to release a production environment, first release the version in the pre-production environment and conduct a test review. After the review is conducted by a role with release permissions, perform a simulated smooth release in the production environment.

[0063] After the simulated smooth release is completed, use the test script to poll and query before and after the release to monitor whether the released application domain name is normally accessed, whether the domain name status is 200, whether the instance status is alive, and use md5 to compare the war address before and after the release to see if it is the latest version.

[0064] The functions of the test script include initialization parameter configuration, simulation of release test cases, automated verification before and after release, and output of test results; the initialization parameter configuration, namely, configuration of the script running environment, application ID, release corresponding environment, and version number; the automated verification before and after release, namely, domain name status monitoring verification, instance status monitoring verification, application domain name access verification, and verification of whether the released war address is correct.

[0065] The test report includes the date and time of the test execution, interface running time, running status pass and fail statistics, whether the test case passed, domain name and instance status and war address are correctly verified, and error log details output.

[0066] In summary, the present invention designs a single or multiple application automation scripts to verify whether the smooth release is passed normally according to the test cases and processes of the smooth release of manual testing. Before the smooth version is released, the application ID to be smoothly released, the corresponding release environment, version number, current version war address, cluster corresponding domain name status and application role permission list are obtained. The non-production environment directly uses the role with release permission to smoothly release each instance. The smooth release of the production environment requires the release version of the pre-production environment and the test version. After the version is submitted, the role with review permission is used to conduct an audit. After the audit is passed, the smooth release is performed. Before, during and after the release, use the automated script to monitor and verify whether the application domain name status is 200, whether the instance status is alive, and whether the war address is correct. Automatic verification is completed after the smooth release version. And the test results are written into the test report for storage.

[0067] The above description is only a preferred embodiment of the present invention. All equivalent changes and modifications made according to the scope of the patent application of the present invention should fall within the scope of the present invention.

Claims

1. A testing method for a multi-environment multi-role version release system, characterized by: The test method comprises the following steps: Step S1: Before the release system releases a version, obtain the application ID to be smoothly released, the corresponding release environment, the version number, the current version war address, the domain name status corresponding to the cluster, the version war package to be released, and the application member role permission list; Step S2: A role with publishing authority simulates smooth publishing. After the simulated publishing is completed, the test script is used to verify whether the domain name status before and after the publishing is normal, whether the war package after the publishing is the latest version, and whether the instance status is alive, so as to determine whether the publishing is normal. The step S2 is further specifically as follows: step S21, role account login, determine whether the current operating role has the publishing authority, if the current role does not have the publishing authority, switch to an account with publishing authority, if the role has the publishing authority, smoothly publish; Step S22: When releasing a non-production environment, a simulated smooth release is directly performed; when releasing a production environment, the version is first released in the pre-production environment, and a test review is performed. After the review is performed by a role with release authority, a simulated smooth release is performed in the production environment; Step S23: After the simulation of smooth release is completed, use the test script to poll and query before and after the release to monitor whether the released application domain name is normally accessed, whether the domain name status is 200, whether the instance status is alive, and use md5 to compare whether the war address before and after the release is the latest version; Step S3: After the script is executed, the test results are written into the test report. If the test fails, the error log details are output; Step S4: Use the Jenkins continuous integration tool to perform continuous integration build, execute regularly, output test reports, and push the results to relevant personnel. The test reports are stored on the content server to facilitate subsequent data analysis of failure causes and pass rates.

2. According to the test method of a multi-environment multi-role version publishing system according to claim 1, it is characterized by: The functions of the test script include initialization parameter configuration, simulation release test cases, automated verification before and after release, and output of test results; The initialization parameter configuration includes configuring the script running environment, application ID, release corresponding environment, and version number; the automated verification before and after release includes domain name status monitoring verification, instance status monitoring verification, application domain name access verification, and verification of whether the release war address is correct.

3. The testing method of a multi-environment multi-role version publishing system according to claim 1 is characterized in that: The test report includes the date and time of the test execution, interface running time, running status pass and failure statistics, whether the test case passed, whether the domain name and instance status and war address were correctly verified, and error log detail information output.

4. The testing method of a multi-environment multi-role version publishing system according to claim 1 is characterized in that: The continuous integration build specifically includes: scheduling according to the configured time, scheduling the test script to execute the test, checking the completion of the test script execution during the test process, tracking the execution status of the test script, and whether the execution fails.

5. A testing system for a multi-environment multi-role version release system, characterized by: The test system includes an information acquisition module, a verification module, a test result output module, and a test report processing module; The information acquisition module is used to obtain the application ID to be smoothly released, the corresponding release environment, the version number, the current version war address, the domain name status corresponding to the cluster, the version war package to be released, and the application member role permission list before the release system releases the version; The verification module is used to simulate smooth release by roles with release authority. After the simulated release is completed, the test script is used to verify whether the domain name status before and after the release is normal, whether the war package after the release is the latest version, and whether the instance status is alive, so as to determine whether the release is normal; The verification module is further specifically implemented as follows: role account login, determine whether the current operating role has the publishing authority, if the current role does not have the publishing authority, switch to an account with publishing authority, if the role has the publishing authority, smoothly publish; To release a non-production environment, perform a simulated smooth release directly; to release a production environment, first release the version in the pre-production environment and conduct a test review. After the review is conducted by a role with release permissions, perform a simulated smooth release in the production environment. After the simulated smooth release is completed, use the test script to poll and query before and after the release to monitor whether the released application domain name is normally accessible, whether the domain name status is 200, whether the instance status is alive, and use md5 to compare the war address before and after the release to see whether it is the latest version; The test result output module is used to write the test results into the test report after the script is executed, and output the error log details after the test fails; The test report processing module uses the Jenkins continuous integration tool to perform continuous integration construction, executes regularly, outputs test reports, and pushes the results to relevant personnel. The test reports are stored on the content server to facilitate subsequent data analysis of failure reasons and pass rates.

6. A test system for a multi-environment multi-role version release system according to claim 5, characterized in that: The functions of the test script include initialization parameter configuration, simulation of release test cases, automated verification before and after release, and output of test results; the initialization parameter configuration, namely, configuration of the script running environment, application ID, release corresponding environment, and version number; the automated verification before and after release, namely, domain name status monitoring verification, instance status monitoring verification, application domain name access verification, and verification of whether the released war address is correct.

7. The test system of a multi-environment multi-role version release system according to claim 5, characterized in that: The test report includes the date and time of the test execution, interface running time, running status pass and failure statistics, whether the test case passed, whether the domain name and instance status and war address were correctly verified, and error log detail information output.

8. The test system of a multi-environment multi-role version release system according to claim 5, characterized in that: The continuous integration build specifically includes: scheduling according to the configured time, scheduling the test script to execute the test, checking the completion of the test script execution during the test process, tracking the execution status of the test script, and whether the execution fails.