Test method and system based on automatic regression test case tuning
Through the secondary development and code instrumentation technology of the Jacoco open source project, the problem of duplication and invalidity of automated test cases is solved. The cases are optimized through coverage calculation, which improves the efficiency and accuracy of automated testing and solves the problem of case adjustment in the existing technology. Excellent problem.
Patent Information
- Application Number
- CN202410697912.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-31
- Publication Date
- 2024-09-13
AI Technical Summary
Existing technology cannot effectively solve the problems of continuous expansion of automated test cases, duplicate cases, and invalid cases, resulting in extended test cycles and waste of resources, and there is a lack of effective tuning methods for automated test cases.
Through the secondary development of the Jacoco open source project, code instrumentation and coverage calculations are performed, automated cases are executed one by one, the code execution process is recorded, and cases are tuned based on code coverage contribution, duplicate and invalid cases are eliminated, and uncovered code is supplemented piece.
It has improved the efficiency and accuracy of automated test cases, eliminated duplicate cases, supplemented uncovered code blocks, optimized case scale, and reduced test cycles and resource waste.
Smart Images

Figure CN118642949A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of testing and automation technology, and in particular to a testing method and system based on automatic regression test case tuning. Background Art
[0002] Precision Testing is a testing method widely used in software development, which aims to improve testing efficiency and coverage by accurately selecting test cases and test data. Its technical background mainly involves the following aspects:
[0003] 1. Software testing theory: Precision testing is developed based on software testing theory, including concepts such as test pyramid, test strategy, and test coverage. Under the guidance of software testing theory, precision testing improves test quality through reasonable test case selection and test data generation.
[0004] 2. Test automation: With the continuous shortening of software development cycles and the rapid changes in requirements, test automation has become an indispensable technical means. Accurate testing relies on automated testing tools and frameworks to achieve test case selection, execution and result analysis, thereby improving testing efficiency.
[0005] 3. Static analysis technology: Static analysis is a technical means of analyzing source code without running the program. In precision testing, static analysis technology can be used to identify potential code defects and errors, thereby helping to determine the focus of testing and the selection of test cases.
[0006] 4. Test case generation: Accurate testing requires generating appropriate test cases based on the requirements and features of the software. Test case generation technology can generate test cases that can cover different code paths and boundary conditions based on methods such as model-driven, symbolic execution, and random testing.
[0007] 5. Data mining and machine learning: In recent years, data mining and machine learning technologies have been widely used in the field of software testing. In precision testing, these technologies can be used to analyze historical test data, identify abnormal behaviors, optimize test case selection and test data generation, thereby improving the efficiency and accuracy of testing.
[0008] The initial test automation cases come from the conversion and accumulation of functional test cases. The subsequent maintenance is basically based on the initial case set and participates in daily regression. The automated case set is executed over the years, and some cases will fail or repeat other cases, resulting in resource waste or long-term code regression, which leads to extended test cycles or missed defects.
[0009] In response to the above technical problems, the main solutions for collecting progress are as follows:
[0010] Supplement automation cases based on production accident analysis;
[0011] Use the code coverage tool to collect code coverage during the automated execution phase and analyze test cases that need to be supplemented;
[0012] Option 1 is too costly and can only be handled after an accident occurs;
[0013] Two of the solutions can solve the problem of incomplete case coverage, but cannot solve the problem of duplicate or invalid cases, and will still cause the problem of continued increase in the number of cases.
[0014] Moreover, neither Solution 1 nor Solution 2 can effectively optimize the automated test cases, and they are subjective and have little effect on shortening the test cycle. Summary of the invention
[0015] In view of the technical problems existing in the prior art, the present invention provides a testing method and system based on automated regression test case tuning to solve the problems of continuous expansion of automated test cases, a large number of repeated cases, invalid cases, excessive reliance on manual processing, etc.
[0016] According to a first aspect of the present invention, the present invention provides a testing method based on automated regression test case tuning, comprising the following steps:
[0017] Conduct secondary development based on the Jacoco open source project, add Jacoco processing logic, and record the code execution process;
[0018] Perform code instrumentation when deploying applications through on-the-fly mode;
[0019] Adjust the automated test scripts, execute the automated cases one by one in a single-threaded manner, and mark the stored code;
[0020] Calculate the contribution of automated cases to code coverage during execution, and tune the cases based on the contribution to code coverage.
[0021] Based on the above technical solution, the present invention can also make the following improvements.
[0022] Optionally, the secondary development based on the Jacoco open source project, adding processing logic, and recording the code execution process includes:
[0023] Deploy a local database; ①Create a new code case association table to store code snippets, timestamps, and associated case IDs in real time; ②Create a new code association status table to store case IDs and batch status. The default batch status is P;
[0024] Using the monitoring instructions Probe Instructions inserted by Jacoco in Java bytecode, add the Probe Instructions trigger processing logic. When the probe instruction is triggered, the monitored code block information is stored in the code case association table in the local database, and the real-time timestamp is recorded at the same time;
[0025] Recompile and package jacocoagent.jar.
[0026] Optionally, the code instrumentation during application deployment in the on-the-fly mode includes:
[0027] Add the Jacoco startup line to the spring boot background automatic startup command and set the jacocoagent.jar address in the command;
[0028] Set the auto-start command in the previous step on the Jenkins deployment pipeline in the automated testing environment;
[0029] Start the application service under test, perform code instrumentation in on-the-fly mode, and start the TCP Server.
[0030] Optionally, the adjusting the automated test script, executing the automated cases one by one in a single-threaded manner, and marking the stored code includes:
[0031] In the automation script, a pre-step is added before each case is executed: ① The data with case ID null in the code case association table in the local database is batch updated to "none" to avoid dirty data caused by abnormal interruption; ② The batch status of the data in the code association status table in the local database is batch updated to S, and a piece of data is inserted to record the ID of the currently executed case, and the batch status is P;
[0032] Add a post-step after each case is executed to batch update the data with case ID null in the code case association table to the current case ID, and change the batch status of the current case ID in the code association status table to S;
[0033] Execute automated test cases in single-threaded mode, execute cases one by one, and associate the relationship between code blocks and case IDs in sequence through recording logic.
[0034] Optionally, the calculating the contribution of the automation case to the code coverage when it is executed, and tuning the case according to the contribution of the code coverage includes:
[0035] After the automation case is executed, extract the code case association table data, group and count by code block ID, the maximum count value is N, and create three sequences: ① non-replaceable sequence A, ② replaceable sequence B, the code contribution of this sequence is 0%; ③ deletable sequence C, the code contribution of this sequence is 0%;
[0036] Store the code blocks with a group count of 1, and store the corresponding case IDs in the irreplaceable sequence A after deduplication;
[0037] The code block storing the group count as 2 determines whether the case ID exists in sequence A;
[0038] The process is repeated until all the case IDs of the code blocks with group count N are stored, and the final irreplaceable sequence A and replaceable sequence B are obtained.
[0039] Optionally, the determining whether the case ID exists in sequence A includes:
[0040] If it exists in sequence A, store the case ID corresponding to the code block in sequence B.
[0041] If it does not exist in sequence A, determine whether it exists in sequence B:
[0042] If it exists in sequence B, remove the case ID from sequence B and store it in sequence A;
[0043] If it does not exist in sequence B, it is directly stored in sequence A.
[0044] Optionally, after obtaining the final non-substitutable sequence A and substitutable sequence B, the process further comprises:
[0045] Compare the case IDs in sequence A and sequence B with the total case IDs in turn to determine whether there are cases in the total case IDs that do not exist in both sequence A and sequence B:
[0046] If it exists, store the corresponding case ID into the deletable sequence C;
[0047] If not present, skip:
[0048] The cases in sequence C obtained by looping sequentially are not related to the current application system.
[0049] Optionally, the sequence A is a set of cases with a minimum number of cases that currently cover the code, and the sequence B is a set of cases that can be eliminated.
[0050] Optionally, the tuning of the case according to the contribution of code coverage includes:
[0051] ① Extract and analyze the test case ID with a contribution of 0 to determine whether the case is repeated;
[0052] ② Pay attention to the code without case labels and add cases to cover it in time.
[0053] According to a second aspect of the present invention, there is provided a test system based on automated regression test case tuning, comprising:
[0054] The first processing module is used to perform secondary development based on the Jacoco open source project, add Jacoco processing logic, and record the code execution process;
[0055] The second processing module is used to perform code instrumentation when the application is deployed through the on-the-fly mode;
[0056] The third processing module is used to adjust the automated test script, execute the automated cases one by one in a single-threaded manner, and mark the stored code;
[0057] The fourth processing module is used to calculate the contribution of the automated case to code coverage during execution, and to optimize the case according to the contribution to code coverage.
[0058] Technical effects and advantages of the present invention:
[0059] The present invention provides a testing method and system based on automated regression test case tuning, which performs code instrumentation when an automated test environment is deployed, collects code blocks covered when a single case is executed during automated test execution, and calculates the coverage contribution of each case. On the one hand, cases with repeated coverage are eliminated, and on the other hand, uncovered code blocks are supplemented, thereby optimizing the case scale and improving the efficiency and accuracy of automated test cases. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] Figure 1 It is a flowchart of a testing method based on automated regression test case tuning provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0061] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0062] It is understandable that, based on the defects in the background technology, the embodiment of the present invention proposes a test method based on automatic regression test case tuning, specifically as follows: Figure 1 As shown, the test method comprises the following steps:
[0063] Step 1: Perform secondary development based on the Jacoco open source project, add Jacoco processing logic, and record the code execution process;
[0064] In this embodiment, the Jacoco processing logic is: when the code is executed to the probe position, in addition to setting the Brewer value of the probe to true, the code corresponding to the probe is stored in the local database.
[0065] In another implementation, step 1 is mainly based on adding the processing logic of jacoco, and specifically includes the following steps:
[0066] Step 1.1: Logically adjust the Jacoco source code, which can be broken down into the following process:
[0067] Stage 1: Deploy a local database. ①Create a new code case association table to store code snippets, timestamps, and associated case IDs in real time. ②Create a new code association status table to store case IDs and batch status. The default batch status is P.
[0068] Stage 2: Use the Probe Instructions that Jacoco inserts into the Java bytecode to add the Probe Instructions trigger processing logic. When the probe instruction is triggered, the monitored code block information is stored in the code case association table in the local database, and the real-time timestamp is recorded at the same time;
[0069] Stage 3: Recompile and package jacocoagent.jar.
[0070] Step 2: Use the on-the-fly mode to perform code instrumentation when deploying the application;
[0071] In another implementation, step 2 is mainly to automatically start jacocoagent.jar and enable monitoring when the application is deployed. The specific implementation includes the following sub-steps:
[0072] Step 2.1: Add the Jacoco startup line to the spring boot background automatic startup command and set the jacocoagent.jar address in the command;
[0073] Step 2.2: Set the auto-start command in step 2.1 on the Jenkins deployment pipeline in the automated testing environment;
[0074] Step 2.3: Start the application service under test, perform code instrumentation in on-the-fly mode, and start TCPServer.
[0075] Step 3: Adjust the automated test script to execute the automated cases one by one in a single-threaded manner;
[0076] In another embodiment, step 3 is mainly for marking the stored code, and the specific implementation includes the following sub-steps:
[0077] Step 3.1: In the automation script, add a pre-step before each case is executed: ① Update the case ID of the data with null case ID in the code case association table in the local database to "none" in batches to avoid dirty data caused by abnormal interruption; ② Update the batch status of the data in the code association status table in the local database to S in batches, and insert a piece of data to record the ID of the currently executed case, with the batch status of P;
[0078] Step 3.2: Add a post-step after each case is executed to batch update the data with case ID null in the code case association table to the current case ID, and change the batch status of the current case ID in the code association status table to S;
[0079] Step 3.3: Execute the automated test cases in single-threaded mode, execute the cases one by one, and associate the relationship between the code blocks and the case IDs in sequence through the recording logic in Stage 2 of step 1.1.
[0080] Step 4: Calculate the contribution of the automated case to code coverage during execution, and tune the case based on the contribution to code coverage.
[0081] In another embodiment, step 4 is implemented to calculate the test exclusivity of the case to the code block, and includes the following sub-steps:
[0082] Step 4.1: After the automation case is executed in step 3.3, extract the code case association table data, group and count by code block ID, the maximum count value is N, and create two sequences: ① non-replaceable sequence A, ② replaceable sequence B, the code contribution of this sequence is 0%; ③ deletable sequence C, the code contribution of this sequence is 0%;
[0083] Step 4.2: Store the code blocks with a group count of 1, and store the corresponding case IDs in the irreplaceable sequence A after deduplication;
[0084] Step 4.3: The code block that stores the group count as 2 determines whether the case ID exists in sequence A:
[0085] If it exists in sequence A, store the case ID corresponding to the code block in sequence B.
[0086] If it does not exist in sequence A, determine whether it exists in sequence B:
[0087] If it exists in sequence B, remove the case ID from sequence B and store it in sequence A;
[0088] If it does not exist in sequence B, it is directly stored in sequence A.
[0089] The process is repeated until the case IDs of the code blocks with a group count of N are stored, and the final irreplaceable sequence A and replaceable sequence B are obtained, where sequence A is a case set with the minimum number of cases that currently cover the code, and sequence B is a case set that can be eliminated.
[0090] Step 4.4: Compare the case IDs in sequence A and sequence B with the full case ID in turn to determine whether there are cases in the full case ID that do not exist in both sequence A and sequence B:
[0091] If it exists, store the corresponding case ID into the deletable sequence C;
[0092] If not present, skip:
[0093] The cases in sequence C obtained by looping sequentially are not related to the current application system.
[0094] Additionally, in another implementation, the specific implementation of tuning the cases according to the contribution of code coverage includes the following sub-steps:
[0095] ① Extract and analyze the test case ID with a contribution of 0 to determine whether the case is repeated;
[0096] ② Pay attention to the code without case labels and add cases to cover it in time.
[0097] In actual application, the tuning steps include: 1) The test manager approves the tester's daily report. If the daily report is approved, go to step 4.2. Otherwise, the daily report is returned and the tester re-fills the content of the daily report;
[0098] 2) Update the progress in real time, and use the following logic to calculate the current task node, current test process, and overall progress of the test plan: Conduct a secondary review of sequence B obtained in step 4.3 to determine whether it needs to be eliminated:
[0099] If it needs to be eliminated, change the status of this part of the case to abandoned;
[0100] If retention is required, the case IDs are whitelisted and sequence removal is not performed.
[0101] Finally, use the dump data generated by jacoco to generate an HTML report, analyze the code coverage, organize reviews, supplement cases, and perform continuous testing and optimization.
[0102] The present invention is further described below through specific embodiments. Zhongbang Bank's automated testing platform has the following requirements for automated regression test cases:
[0103] Requirement 1: Automated regression cases need to be bound to code blocks;
[0104] Requirement 2: invalid cases need to be eliminated in a timely manner;
[0105] Requirement 3: For cases where the execution results are repeated in other cases, the cases should be evaluated to improve the quality of the cases;
[0106] Therefore, using manpower or existing technology to achieve the above three requirements, the difficulties are as follows:
[0107] Difficulty 1: Code coloring technology can only calculate the overall coverage, and cannot associate code blocks with cases;
[0108] Difficulty 2: judging whether it is effective or too repetitive by manual means;
[0109] Due to the above two difficulties, it is impossible to effectively tune the automation cases.
[0110] After the implementation of the present invention, secondary development is carried out based on the Jacoco open source project. When deploying the application, the on-the-fly mode is used for instrumentation. Secondly, the automated test cases are executed one by one, and when executing, the local code storage generated in this stage is labeled with the test case ID. After the automated test is completed, the local code storage is analyzed and the contribution of the case execution to the code coverage is calculated.
[0111] During the automated testing process, the present invention realizes the execution code path of the collected cases at zero cost, automatically calculates the association between the cases and the code blocks, and simultaneously calculates the contribution, directly proposes invalid cases, and provides the test team with the opportunity to analyze repetitive cases to determine whether they should be optimized, thereby improving the overall quality of the test cases.
[0112] In summary, automated testing is a conventional technology and important support for iterative project regression testing. The embodiments of the present invention perform code instrumentation when the automated testing environment is deployed, collect the code blocks covered by a single case when the automated test is executed, and calculate the coverage contribution of each case. On the one hand, it eliminates cases with repeated coverage, and on the other hand, it supplements the uncovered code blocks, thereby optimizing the case scale and improving the efficiency and accuracy of automated testing cases.
[0113] According to a second aspect of the present invention, there is provided a test system based on automated regression test case tuning, comprising:
[0114] The first processing module is used to perform secondary development based on the Jacoco open source project, add Jacoco processing logic, and record the code execution process;
[0115] The second processing module is used to perform code instrumentation when the application is deployed through the on-the-fly mode;
[0116] The third processing module is used to adjust the automated test script, execute the automated cases one by one in a single-threaded manner, and mark the stored code;
[0117] The fourth processing module is used to calculate the contribution of the automated case to code coverage during execution, and to optimize the case according to the contribution to code coverage.
[0118] It can be understood that the test system based on automated regression test case tuning provided by the present invention corresponds to the test method based on automated regression test case tuning provided by the aforementioned embodiments. The relevant technical features of the test system based on automated regression test case tuning can refer to the relevant technical features of the test method based on automated regression test case tuning, which will not be repeated here.
[0119] The present invention also provides an electronic device, which may include: a processor, a communications interface, a memory, and a communications bus, wherein the processor, the communications interface, and the memory communicate with each other via the communications bus. The processor may call the logic instructions in the memory to execute the above-mentioned test method based on automated regression test case tuning, which includes the following steps:
[0120] Step 1: Perform secondary development based on the Jacoco open source project, add Jacoco processing logic, and record the code execution process;
[0121] Step 2: Use the on-the-fly mode to perform code instrumentation when deploying the application;
[0122] Step 3: Adjust the automated test script, execute the automated cases one by one in a single-threaded manner, and mark the stored code;
[0123] Step 4: Calculate the contribution of the automated case to code coverage during execution;
[0124] Step 5: Fine-tune the cases based on their contribution to code coverage.
[0125] In addition, the logic instructions in the above-mentioned memory can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0126] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0127] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0128] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.
[0129] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A test method based on automated regression test case tuning, characterized in that: The following steps are involved: Conduct secondary development based on the Jacoco open source project, add Jacoco processing logic, and record the code execution process; Perform code instrumentation when deploying applications through on-the-fly mode; Adjust the automated test scripts, execute the automated cases one by one in a single-threaded manner, and mark the stored code; Calculate the contribution of automated cases to code coverage during execution, and tune the cases based on the contribution to code coverage.
2. A test method based on automated regression test case tuning according to claim 1, characterized in that: The secondary development based on the Jacoco open source project, adding Jacoco processing logic, and recording the code execution process include: Deploy a local database; including: creating a new code case association table to store code snippets, timestamps, and associated case IDs in real time; creating a new code association status table to store case IDs and batch status, with the default batch status being P; Using the monitoring instructions inserted by Jacoco in Java bytecode, we add monitoring instruction trigger processing logic. When the probe instruction is triggered, the monitored code block information is stored in the code case association table in the local database, and the real-time timestamp is recorded at the same time. Recompile and package jacocoagent.jar.
3. A test method based on automated regression test case tuning according to claim 1, characterized in that: The code instrumentation during application deployment in the on-the-fly mode includes: Add the Jacoco startup line to the spring boot background automatic startup command and set the jacocoagent.jar address in the command; Set up a self-start command on the Jenkins deployment pipeline in the automated testing environment; Start the application service under test, perform code instrumentation in on-the-fly mode, and start the TCP Server.
4. A test method based on automated regression test case tuning according to claim 1, characterized in that: The adjusting of the automated test script, executing the automated cases one by one in a single-threaded manner, and marking the stored codes include: In the automation script, add the following pre-steps before executing each case: batch update the case ID of the data with null case ID in the code case association table in the local database to "none", batch update the data batch status in the code association status table in the local database to S, and insert a piece of data to record the ID of the currently executed case, with the batch status of P; After each case is executed, add the following post-steps: batch update the data with case ID null in the code case association table to the current case ID, and change the batch status of the current case ID in the code association status table to S; Execute automated test cases in single-threaded mode, execute cases one by one, and associate the relationship between code blocks and case IDs in sequence through recording logic.
5. The test method based on automated regression test case tuning according to claim 1, characterized in that: The calculation of the contribution of the automation case to the code coverage during execution and tuning the case according to the contribution to the code coverage include: After the automation case is executed, extract the code case association table data, group and count by code block ID, the maximum count value is N, and create three sequences: ① non-replaceable sequence A, ② replaceable sequence B, and ③ deletable sequence C; Store the code blocks with a group count of 1, and store the corresponding case IDs in the irreplaceable sequence A after deduplication; The code block storing the group count as 2 determines whether the case ID exists in sequence A; The process is repeated until all the case IDs of the code blocks with group count N are stored, and the final irreplaceable sequence A and replaceable sequence B are obtained.
6. A test method based on automated regression test case tuning according to claim 5, characterized in that: The step of determining whether the case ID exists in sequence A comprises the following steps: If it exists in sequence A, store the case ID corresponding to the code block in sequence B. If it does not exist in sequence A, determine whether it exists in sequence B: If it exists in sequence B, remove the case ID from sequence B and store it in sequence A; If it does not exist in sequence B, it is directly stored in sequence A.
7. The test method based on automated regression test case tuning according to claim 5, characterized in that: After obtaining the final non-replaceable sequence A and replaceable sequence B, the method further includes: Compare the case IDs in sequence A and sequence B with the total case IDs in turn to determine whether there are cases in the total case IDs that do not exist in both sequence A and sequence B: If it exists, store the corresponding case ID into the deletable sequence C; If not present, skip: The sequence C obtained by looping sequentially contains cases that are not related to the current application system.
8. The test method based on automated regression test case tuning according to claim 7, characterized in that: The sequence A is a set of cases with the minimum number of cases that currently cover the code, and the sequence B is a set of cases that can be eliminated.
9. The test method based on automated regression test case tuning according to claim 1, characterized in that: The tuning of cases according to the contribution of code coverage includes: ① Extract and analyze the test case ID with a contribution of 0 to determine whether the case is repeated; ② Pay attention to the code without case labels and add cases to cover it in time.
10. A test system based on automated regression test case tuning, characterized in that: include: The first processing module is used to perform secondary development based on the Jacoco open source project, add Jacoco processing logic, and record the code execution process; The second processing module is used to perform code instrumentation when the application is deployed through the on-the-fly mode; The third processing module is used to adjust the automated test script, execute the automated cases one by one in a single-threaded manner, and mark the stored code; The fourth processing module is used to calculate the contribution of the automated case to code coverage during execution, and to optimize the case according to the contribution to code coverage.
