A test case automatic re-execution method and system
By constructing a disordered test representation sequence and an entropy-increasing wavefront, abnormal signs in test batches are identified, and re-execution sequences are generated in advance. This solves the problems of inability to provide early warning and delayed re-execution in existing technologies, and achieves more efficient and stable automated re-execution of test cases.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHANGHAI ZEZHONG SOFTWARE TECH CO LTD
- Filing Date
- 2026-06-23
- Publication Date
- 2026-07-31
AI Technical Summary
Existing automated testing platforms struggle to identify fluctuations in execution time, assertion jitter, dependency call offsets, environment recovery delays, and resource contention changes in consecutive test batches. They are unable to generate a pre-intrusion warning set before concentrated failures occur, leading to trigger lag and cascading instability expansion.
The wavefront intrusion early warning method is adopted. By collecting and preprocessing test data, a test disorder characterization sequence is constructed, the disordered continuous enhancement segment and the cross-batch expansion segment are identified, a set of disordered source points is generated, and a test entropy increasing wavefront field is constructed in a unified test execution coordinate space. The wavefront advancement direction, velocity and arrival time are extracted, and a pre-execution re-execution sequence is generated for automated re-execution of test cases.
It enables the detection of execution rhythm imbalances and abnormal expansion trends before concentrated failures occur, allowing test case re-execution to be completed in advance, reducing invalid reruns and resource consumption, and improving the accuracy and overall execution efficiency of automated test case re-execution.
Smart Images

Figure CN122489440A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of test case re-execution, and more particularly to a method and system for automated re-execution of test cases. Background Technology
[0002] Existing automated testing platforms typically trigger test case re-execution based on single test results, failure logs, or fixed retry rules. A common approach is to reschedule, switch nodes, or reallocate resources for failed test cases after execution failures to complete regression verification and anomaly compensation. This type of technology primarily focuses on rerunning after failures and already possesses batch execution, status logging, and automatic retry capabilities.
[0003] However, most existing technologies lack joint characterization of execution time fluctuations, assertion jitter, dependency call offsets, environment recovery delays, and resource contention changes in continuous test batches. They are unable to identify disordered continuous enhancement segments and cross-batch expansion segments, and cannot form a set of disordered source points and a test entropy increase front field. Therefore, they cannot generate a wavefront intrusion warning set and perform pre-execution before concentrated failures occur, resulting in problems such as trigger lag and difficulty in timely suppression of chain instability expansion. Summary of the Invention
[0004] One objective of this invention is to propose a method and system for automated re-execution of test cases. This invention employs a wavefront intrusion warning method to achieve pre-execution of test cases, which has the advantages of early triggering and diffusion suppression.
[0005] A method for automated re-execution of test cases according to an embodiment of the present invention includes the following steps: Collect raw data from consecutive test batches to form the raw dataset of the test batches; Preprocess the raw dataset of the test batch to generate a standardized test state sequence; Based on the standardized test state sequence, a test disordered representation sequence is constructed; Based on the test disordered characterization sequence, identify the disordered continuously enhanced segment and the cross-batch expansion segment, determine the initial position, expansion direction and cumulative intensity of the triggering unstable expansion, and generate a set of disordered source points; The disordered source point set is mapped to a unified test execution coordinate space, and combined with the test case execution order index, a test entropy enhancement front field is constructed. Based on the test entropy increase of the wavefront field, the wavefront advance direction, wavefront advance speed, wavefront boundary coverage depth and wavefront arrival time are extracted, and combined with the distribution of the test cases to be executed in the unified test execution coordinate space, a wavefront intrusion warning set is generated; Based on the wavefront intrusion warning set, a pre-execution re-execution sequence is generated to automate the re-execution of test cases.
[0006] Optionally, the raw data includes test execution records, assertion trigger records, dependency call records, environment recovery records, and resource usage records.
[0007] Optionally, the preprocessing includes time alignment, batch binding, abnormal record removal, missing data completion, and unit unification.
[0008] Optionally, the generation of the test disordered representation sequence specifically includes: Extract the start and end times of execution for the same test case in consecutive test batches from the standardized test state sequence, arrange them according to the batch index to form an execution duration sequence, and generate an execution duration fluctuation characterization based on the magnitude and direction of change in execution duration between adjacent test batches. Retrieve assertion trigger records for the same test case in consecutive test batches, arrange them according to the batch index to form an assertion trigger sequence, and generate assertion jitter representation based on the changes in the number of assertion triggers and the changes in assertion trigger status identifiers between adjacent test batches. Read the dependency call records corresponding to the same test case in consecutive test batches, arrange them according to the batch index to form a dependency call sequence, and generate a dependency call offset representation based on the changes in the duration of dependency calls and the changes in the return status identifier between adjacent test batches. Extract the environment recovery record and resource usage record corresponding to the same test case in consecutive test batches, arrange them according to the batch index to form the environment recovery sequence and resource usage sequence, and generate an environment recovery delay characterization based on the change in environment recovery time between adjacent test batches, and generate a resource contention change characterization based on the change in resource usage value between adjacent test batches. The execution time fluctuation representation, assertion jitter representation, dependency call offset representation, environment recovery delay representation, and resource contention change representation are correlated and organized to generate a test disordered representation sequence.
[0009] Optionally, the generation of the disordered source point set specifically includes: Read the execution time fluctuation, assertion jitter, dependency call offset, environment recovery delay, and resource contention change representations corresponding to the same test case in the batch-indexed test disordered representation sequence, forming a disordered observation trajectory continuously arranged along the batch evolution direction; Based on the disordered observation trajectory, disordered continuous enhancement segments are generated for the continuous enhancement state and synchronous continuation state represented by each adjacent batch index. The location for receiving expansion is determined based on adjacent segments with continuously increasing disorder, and cross-batch receiving expansion segments are generated. The initial location and end tracking of the disorder-reinforcing segment and the cross-batch expansion segment are determined to identify the initial location and expansion direction that triggers instability expansion. The cumulative intensity is determined based on the coverage length, span, and continuous enhancement intensity of the disordered continuous enhancement section and the cross-batch expansion section in the batch evolution direction; The disordered continuous enhancement segments and cross-batch expansion segments are grouped according to their initial position, expansion direction, and cumulative intensity to generate a set of disordered source points.
[0010] Optionally, the generation of the test entropy-enhanced wavefront specifically includes: Read the source point position, source point direction, group cumulative strength and batch index of each unordered source point in the unordered source point set, and extract the batch index, test case execution order index and execution node identifier of each test case in the standardized test state sequence. Construct a unified test execution coordinate space based on the batch index and test case execution order index. Within the unified test execution coordinate space, each unordered source point is mapped to the corresponding batch coordinates and execution order coordinates to generate a source point coordinate set; Based on the sequential relationship of the execution order index of the preceding and subsequent test cases within the same test batch, the execution order sequence relationship between test cases is determined. Starting with the coordinates of each source point, coordinate expansion is performed along the execution sequence and in the direction of batch evolution. The coordinates of the test cases reached by the expansion are connected continuously in the order of succession to generate the wavefront coverage trajectory. Based on the source point direction, group cumulative intensity, and wavefront coverage trajectory corresponding to each disordered source point, the corresponding group cumulative intensity and batch expansion order value are written into each coverage coordinate in the unified test execution coordinate space along the wavefront coverage trajectory to construct the test entropy increasing wavefront field.
[0011] Optionally, the unified test execution coordinate space is a coordinate representation space formed by uniformly mapping the execution position of each test case in a continuous test batch based on the batch index and the test case execution order index. The batch index is used to characterize the test batch position of the test case, and the test case execution order index is used to characterize the execution order of the test case in the corresponding test batch.
[0012] Optionally, the generation of the wavefront intrusion warning set specifically includes: Read the batch expansion sequence value and batch index corresponding to each coverage coordinate in the test entropy-incremented wavefront field, and sort them in ascending order according to the batch index and batch expansion sequence value to form a wavefront expansion sequence. Based on the coordinate displacement direction between adjacent coverage coordinates in the wavefront expansion sequence, the wavefront advance direction is extracted, and based on the batch index difference between adjacent coverage coordinates and the batch expansion sequence value difference, the number of coverage coordinates advanced within a unit batch is calculated to generate the wavefront advance velocity. Extract the coordinate distance between the end coverage coordinate and the corresponding source point coordinate under the current batch index in the wavefront extension sequence, and determine the coordinate distance as the wavefront boundary coverage depth. At the same time, read the batch index corresponding to the first time each coverage coordinate is written into the batch extension sequence value to determine the wavefront arrival time. Extract the coordinates of the test cases to be executed under the current batch index in the unified test execution coordinate space, and compare the position of each coordinate to be executed with the end coverage coordinates under the current batch index. Filter the coordinates to be executed that are located on the front side of the wavefront advance direction and whose coordinate distance is not greater than the wavefront boundary coverage depth, and generate a wavefront intrusion candidate set. Based on the wavefront advance speed, wavefront arrival time, and coordinate distance between each coordinate to be executed and the end coverage coordinate in the wavefront intrusion candidate set, calculate the expected intrusion batch index corresponding to each test case to be executed, and write the test cases to be executed with the expected intrusion batch index not greater than the preset warning batch index into the wavefront intrusion warning set.
[0013] Optionally, the automated re-execution of test cases specifically includes: Read each test case to be executed from the wavefront intrusion warning set, and extract the expected intrusion batch index, current batch index, dependency call record and resource consumption record corresponding to each test case to be executed; Subtract the current batch index from the expected intrusion batch index to obtain the batch advance. Based on the batch advance, determine the re-execution start batch index for each test case to be executed, write the re-execution start batch index into the corresponding test case to be executed, and generate re-execution timing adjustment information. Extract the processor usage, memory usage, connection pool usage, thread pool usage, and queue usage values corresponding to each execution node, perform normalization on each value, and then perform a weighted sum to generate a node load value. Assign the execution node with the lowest node load value to the corresponding test case to be executed, and generate re-execution node allocation information. Read the called service identifier and historical dependency call record corresponding to each test case to be executed, determine the dependency replica identifier corresponding to the current called service identifier, and allocate the dependency replica identifier not occupied by the current batch to the corresponding test case to be executed, and generate dependency replica switching information; Based on the node load value of the execution node corresponding to the re-execution node allocation information and the resource usage record corresponding to the test cases to be executed, determine the processor quota adjustment value, memory quota adjustment value, connection pool capacity adjustment value, thread pool capacity adjustment value and queue capacity adjustment value, and generate environment carrying capacity adjustment information; The re-execution timing adjustment information, re-execution node allocation information, dependency replica switching information, and environment capacity adjustment information are arranged according to the re-execution start batch index and test case execution order index corresponding to the test cases to be executed, generating a pre-re-execution sequence, and automatically re-execute the test cases according to the pre-re-execution sequence.
[0014] An automated test case re-execution system according to an embodiment of the present invention includes: The data acquisition module is used to collect raw data from consecutive test batches to form the raw dataset of the test batch. The data preprocessing module is used to preprocess the raw dataset of the test batch and generate a standardized test state sequence; The disordered representation construction module is used to construct a disordered representation sequence of tests based on the standardized test state sequence. The disordered source point generation module is used to identify the continuously enhanced disordered segments and cross-batch expansion segments based on the test disordered characterization sequence, determine the initial position, expansion direction and cumulative intensity of the triggering unstable expansion, and generate a set of disordered source points. The wavefront construction module is used to map the disordered set of source points to a unified test execution coordinate space, and combine it with the test case execution order index to construct a test entropy increasing wavefront. The wavefront intrusion warning module is used to extract the wavefront advance direction, wavefront advance speed, wavefront boundary coverage depth and wavefront arrival time based on the test entropy increase wavefront field, and generate a wavefront intrusion warning set by combining the distribution of the test cases to be executed in the unified test execution coordinate space. The pre-execution module is used to generate a pre-execution sequence based on the wavefront intrusion warning set, and to automate the re-execution of test cases.
[0015] The beneficial effects of this invention are: This invention constructs a sequence of disordered test characteristics by uniformly collecting, preprocessing, and associating test execution records, assertion trigger records, dependency call records, environment recovery records, and resource usage records from consecutive test batches. It further identifies continuously increasing disordered segments and cross-batch expansion segments, transforming previously scattered anomalies into a continuously traceable chain of unstable evolution. Compared to conventional solutions that only trigger reruns after test case failures, this invention can capture the expansion trends caused by execution rhythm imbalances, decreased assertion stability, dependency call anomalies, and delayed environment recovery before concentrated failures occur. This shifts the timing of reruns from post-event remediation to pre-event intervention, thereby reducing the probability of batch failure propagation and enhancing the stable operation capability under consecutive test batches.
[0016] This invention maps a disordered set of source points to a unified test execution coordinate space, constructing a test entropy-increasing wavefront. Based on the wavefront's advancing direction, speed, boundary coverage depth, and arrival time, it generates a wavefront intrusion warning set, and then uses this set to generate a pre-execution re-execution sequence. This allows for advance adjustments to the timing of test cases to be executed, node allocation, dependency replica switching, and environmental capacity adjustment. This not only narrows the scope of re-execution, reducing invalid reruns and resource congestion, but also makes execution node allocation more targeted, dependency service switching more stable, and execution environment capacity preparation more adequate, thereby improving the accuracy, foresight, and overall execution efficiency of automated test case re-execution. Attached Figure Description
[0017] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings: Figure 1 This is a flowchart of a test case automated re-execution method proposed in this invention; Figure 2 This is a schematic diagram of the test entropy enhancement front field construction for a test case automated re-execution method proposed in this invention. Detailed Implementation
[0018] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.
[0019] refer to Figure 1 and Figure 2 A method for automating test case re-execution includes the following steps: Collect raw data from consecutive test batches to form the raw dataset of the test batches; Preprocess the raw dataset of the test batch to generate a standardized test state sequence; Based on the standardized test state sequence, a test disordered representation sequence is constructed; Based on the test disordered characterization sequence, identify the disordered continuously enhanced segment and the cross-batch expansion segment, determine the initial position, expansion direction and cumulative intensity of the triggering unstable expansion, and generate a set of disordered source points; The disordered source point set is mapped to a unified test execution coordinate space, and combined with the test case execution order index, a test entropy enhancement front field is constructed. Based on the test entropy increase of the wavefront field, the wavefront advance direction, wavefront advance speed, wavefront boundary coverage depth and wavefront arrival time are extracted, and combined with the distribution of the test cases to be executed in the unified test execution coordinate space, a wavefront intrusion warning set is generated; Based on the wavefront intrusion warning set, a pre-execution re-execution sequence is generated to automate the re-execution of test cases.
[0020] In this embodiment, the raw data includes test execution records, assertion trigger records, dependency call records, environment recovery records, and resource usage records. Test execution records are data records used to characterize the actual execution process of test cases in consecutive test batches, including test case identifier, batch index, test case execution order index, execution node identifier, execution start time, and execution end time. Assertion trigger records are data records used to characterize the assertion triggering status of test cases during execution, including test case identifier, batch index, assertion trigger status identifier, and assertion trigger count. Dependency call records are data records used to characterize the invocation of external dependent objects during test case execution, including test case identifier, batch index, called service identifier, call initiation time, call return time, and return status identifier. Environment recovery records are data records used to characterize the completion of environment recovery actions before and after test batch execution and during batch switching, including test case identifier, batch index, recovery start time, and recovery end time. Resource usage records are data records used to characterize the changes in resource load of the execution node during test case execution, including test case identifier, batch index, execution node identifier, processor usage value, memory usage value, connection pool usage value, thread pool usage value, and queue usage value.
[0021] In this embodiment, preprocessing includes time alignment, batch binding, abnormal record removal, missing data completion, and unit unification.
[0022] In this embodiment, the generation of the disordered representation sequence for testing specifically includes: Extract the start and end times of execution for the same test case in consecutive test batches from the standardized test state sequence, arrange them according to the batch index to form an execution duration sequence, and generate an execution duration fluctuation characterization based on the magnitude and direction of change in execution duration between adjacent test batches. The execution duration fluctuation characterization is based on the execution duration sequence formed by the start and end times of the execution of the same test case in consecutive test batches. It is a state characterization formed by extracting the magnitude and direction of the change in execution duration between adjacent test batches. It is used to characterize whether the execution rhythm of the test case in consecutive test batches shows a continuous lengthening, continuous shortening, reversal of direction, or increased fluctuation, and is used to reflect the time stability during the execution of the test case. Retrieve assertion trigger records for the same test case in consecutive test batches, arrange them according to the batch index to form an assertion trigger sequence, and generate assertion jitter representation based on the changes in the number of assertion triggers and the changes in assertion trigger status identifiers between adjacent test batches. The change in assertion trigger count is the difference in the number of times the same test case is triggered in adjacent test batches. The change in assertion trigger status identifier is the change in the status identifier of the same test case after the assertion is triggered in adjacent test batches, from pass, failure, or exception. Both are used together to characterize the change in the assertion stability of the test case in consecutive test batches. Read the dependency call records corresponding to the same test case in consecutive test batches, arrange them according to the batch index to form a dependency call sequence, and generate a dependency call offset representation based on the changes in the duration of dependency calls and the changes in the return status identifier between adjacent test batches. The duration of dependency calls is the difference in duration between the initiation time and return time of the dependency call record corresponding to the dependency call for the same test case in adjacent test batches. The change in return status identifier is the change in the return status identifier corresponding to the completion of the dependency call for the same test case in adjacent test batches from success, failure, timeout, or exception. Both are used together to characterize the change in the stability of dependency calls for the test case in consecutive test batches. Extract the environment recovery record and resource usage record corresponding to the same test case in consecutive test batches, arrange them according to the batch index to form the environment recovery sequence and resource usage sequence, and generate an environment recovery delay characterization based on the change in environment recovery time between adjacent test batches, and generate a resource contention change characterization based on the change in resource usage value between adjacent test batches. The change in environment recovery time is the difference in recovery start time and recovery end time between the environment recovery records of the same test case in adjacent test batches. The change in resource usage value is the change in processor usage value, memory usage value, connection pool usage value, thread pool usage value, and queue usage value between the resource usage records of the same test case in adjacent test batches. Both are used together to characterize the stability of environment recovery and the stability of resource usage of the test case in consecutive test batches. The execution time fluctuation representation, assertion jitter representation, dependency call offset representation, environment recovery delay representation, and resource contention change representation are correlated and organized to generate a test disordered representation sequence. The test disordered representation sequence is an ordered state sequence formed by associating and organizing the execution time fluctuation representation, assertion jitter representation, dependency call offset representation, environment recovery delay representation, and resource contention change representation of the same test case in consecutive test batches according to the batch evolution direction. It is used to represent the instability accumulation and expansion evolution process of the test case in consecutive test batches.
[0023] In this embodiment, the generation of the disordered source point set specifically includes: Read the execution time fluctuation, assertion jitter, dependency call offset, environment recovery delay, and resource contention change representations corresponding to the same test case in the batch-indexed test disordered representation sequence, forming a disordered observation trajectory continuously arranged along the batch evolution direction; The disordered observation trajectory is a state trajectory formed by continuously arranging the execution time fluctuation, assertion jitter, dependency call offset, environment recovery delay, and resource contention change characteristics of the same test case in the batch evolution direction. It is used to characterize the disordered cumulative change and unstable expansion evolution of the test case in continuous test batches. Based on the disordered observation trajectory, disordered continuous enhancement segments are generated for the continuous enhancement state and synchronous continuation state represented by each adjacent batch index. The generation of the disordered continuous enhancement segment specifically includes: reading the execution time fluctuation representation, assertion jitter representation, dependency call offset representation, environment recovery delay representation, and resource contention change representation corresponding to the same test case according to the batch index; performing normalization on the numerical content of the five types of representations; performing one-hot encoding on the status identifier content; and generating execution time fluctuation representation values, assertion jitter representation values, dependency call offset representation values, environment recovery delay representation values, and resource contention change representation values respectively; then aligning and arranging the five types of representation values according to the batch index, and summing the values of each dimension under the same batch to generate a sequence of cumulative representation values; subsequently, comparing adjacent batches on the cumulative representation value sequence, subtracting the cumulative representation value of the previous batch from the current batch's cumulative representation value to generate a batch difference sequence; then reading the batch difference sequence batch by batch along the batch evolution direction, and continuously... Batch segments with three or more batch differences greater than zero are identified as continuous positive segments. The current batch position, located within a continuous positive segment and with a current batch difference greater than the previous batch difference, is marked as a continuous enhancement position, generating a continuous enhancement mark sequence. Then, the number of continuous enhancement positions under the same batch index is counted, and the current batch position, reaching a preset synchronization number, is marked as a synchronization continuation position, generating a synchronization continuation mark sequence. A continuous segment scan is performed along the batch evolution direction on the continuous enhancement mark sequence and the synchronization continuation mark sequence to determine the starting and ending batch indices, generating candidate enhancement segments. The segment length and cumulative batch difference value within each candidate enhancement segment are calculated. Candidate enhancement segments whose segment length reaches a preset batch threshold and whose cumulative batch difference value within the segment reaches a preset enhancement threshold are identified as unordered continuous enhancement segments. The preset synchronization quantity is obtained by counting the number of consecutive enhancement positions under the same batch index in the historical unstable batches, adding the corresponding quantities of each batch, dividing by the number of historical unstable batches, and then rounding up. The preset batch threshold is obtained by counting the segment length of each candidate enhancement segment in the historical unstable batches, adding all segment lengths, dividing by the total number of candidate enhancement segments, and then rounding up. The preset enhancement threshold is obtained by counting the cumulative batch difference value corresponding to each candidate enhancement segment, adding all cumulative values, dividing by the total number of candidate enhancement segments, and then multiplying by 1.5. The location for receiving expansion is determined based on adjacent segments with continuously increasing disorder, and cross-batch receiving expansion segments are generated. The generation of cross-batch expansion segments specifically includes: first, reading adjacent unordered continuous enhancement segments corresponding to the same test case according to the batch index, extracting the end batch index of the preceding segment, the start batch index of the following segment, the cumulative value of the end representation of the preceding segment, the cumulative value of the beginning representation of the following segment, the end position of the preceding segment, and the start position of the following segment to generate segment inheritance data; then, subtracting the end batch index of the preceding segment from the start batch index of the following segment to obtain the batch inheritance interval, subtracting the cumulative value of the end representation of the preceding segment from the cumulative value of the beginning representation of the following segment to obtain the enhancement continuation difference, and subtracting the end position of the preceding segment from the start position of the following segment to obtain the position migration difference; recording the batch position corresponding to the start position of the following segment where the batch inheritance interval is not greater than the preset batch inheritance threshold, the enhancement continuation difference is greater than zero, and the position migration difference is greater than zero as the inheritance expansion position, generating an inheritance expansion mark sequence; sequentially reading the inheritance expansion mark sequence along the batch evolution direction, and determining the batch segments with three or more consecutive inheritance expansion positions as cross-batch inheritance expansion segments; The preset batch acceptance threshold is obtained by statistically analyzing the batch acceptance intervals between adjacent continuously increasing disordered segments in historical unstable batches, adding all batch acceptance intervals, dividing by the logarithm of adjacent continuously increasing disordered segments, and then rounding up. The preceding segment is the continuously increasing disordered segment located in the previous position when arranged along the batch evolution direction, and the following segment is the continuously increasing disordered segment adjacent to the preceding segment and located in the following position. Together, they are used to characterize the acceptance expansion relationship of the disordered change of the same test case in consecutive test batches from the preceding segment to the following segment. The initial location and end tracking of the disorder-reinforcing segment and the cross-batch expansion segment are determined to identify the initial location and expansion direction that triggers instability expansion. The determination of the initial position and expansion direction specifically includes: arranging the unordered continuously enhanced segments and cross-batch expansion segments in ascending order of batch index; extracting the starting batch index, ending batch index, starting position, and ending position of each segment to form a segment boundary set; then determining the starting position of the segment with the smallest starting batch index as the initial position and the ending position of the segment with the largest ending batch index as the ending position; subsequently, subtracting the initial position from the ending position to obtain the position expansion difference; and determining the direction from the initial position to the ending position as the expansion direction. Triggered instability expansion is a test of disordered changes extending from local sustained enhancement to subsequent batches and segments, forming an expansion evolution state that can be characterized by both the disordered sustained enhancement segment and the cross-batch expansion segment; The cumulative intensity is determined based on the coverage length, span, and continuous enhancement intensity of the disordered continuous enhancement section and the cross-batch expansion section in the batch evolution direction; The determination of cumulative intensity specifically includes: first, reading the starting batch index, ending batch index, and cumulative batch difference value within the segment corresponding to the disordered continuous enhancement segment and the cross-batch expansion segment; then, subtracting the starting batch index from the ending batch index of each disordered continuous enhancement segment and the cross-batch expansion segment, and adding 1, and summing the results to obtain the coverage length value; subsequently, subtracting the ending batch index of the preceding segment from the starting batch index of the subsequent segment between each adjacent disordered continuous enhancement segment, and summing the results to obtain the span value; summing the cumulative batch difference values corresponding to each disordered continuous enhancement segment and dividing by the number of disordered continuous enhancement segments to obtain the continuous enhancement intensity value; and then normalizing the coverage length value, span value, and continuous enhancement intensity value and weighting them to obtain the cumulative intensity. The disordered continuous enhancement segments and cross-batch expansion segments are grouped according to their initial position, expansion direction and cumulative intensity to generate a set of disordered source points. The generation of the disordered source point set specifically includes: first, reading the initial position, expansion direction, and cumulative intensity of each disordered continuously enhancing segment and cross-batch expansion segment to form a source point candidate set; then, sorting them in ascending order of initial position, and grouping segments with the same initial position and expansion direction into the same source point group to generate a source point group set; summing the cumulative intensity of each segment within each source point group to obtain the group cumulative intensity, and determining the initial position within the group as the source point position and the expansion direction within the group as the source point direction; and outputting the disordered source point set according to the source point position, source point direction, and group cumulative intensity. If the initial positions are different or the expansion directions are different, they are not merged into the same source point group, but are retained as different source point groups for separate processing. Different initial positions indicate that the starting point of triggering unstable expansion is different, and different expansion directions indicate that the extension path of disordered change is different. Both of these cases indicate that the corresponding segments do not belong to the same disordered source point, and they form independent source point groups. Then, the cumulative intensity of each group is calculated and output to the disordered source point set.
[0024] In this embodiment, the generation of the test entropy-enhanced wavefront specifically includes: Read the source point position, source point direction, group cumulative strength and batch index of each unordered source point in the unordered source point set, and extract the batch index, test case execution order index and execution node identifier of each test case in the standardized test state sequence. Construct a unified test execution coordinate space based on the batch index and test case execution order index. Disordered source points are source point objects formed by aggregating disordered continuously enhanced segments and cross-batch inherited expansion segments according to their initial positions, source point directions, and group cumulative intensities. Within the unified test execution coordinate space, each unordered source point is mapped to the corresponding batch coordinates and execution order coordinates to generate a source point coordinate set; The source point coordinate set is a set of coordinates formed by mapping the disordered source points in the unified test execution coordinate space according to the corresponding batch index and test case execution order index. It is used to characterize the specific landing point distribution of each disordered source point in a continuous test batch. Based on the sequential relationship of the execution order index of the preceding and subsequent test cases within the same test batch, the execution order sequence relationship between test cases is determined. The execution sequence succession relationship is the sequential connection of preceding and subsequent test cases within the same test batch according to the test case execution order index, and the execution end time of the preceding test case and the execution start time of the subsequent test case satisfy the time succession condition. It is used to characterize the sequential propagation path of instability expansion in the test execution process. The time succession condition is that the time difference between the execution start time of the subsequent test case and the execution end time of the preceding test case within the same test batch is greater than or equal to zero and not greater than the preset sequence succession duration threshold. When this condition is met, it is determined that the preceding and subsequent test cases have a continuous connection relationship in time, and the execution sequence succession relationship between them is determined accordingly. Starting with the coordinates of each source point, coordinate expansion is performed along the execution sequence and in the direction of batch evolution. The coordinates of the test cases reached by the expansion are connected continuously in the order of succession to generate the wavefront coverage trajectory. The wavefront coverage trajectory is a trajectory formed by continuously expanding along the execution sequence and connecting the coordinates of the test cases reached, starting from the coordinates of the source point corresponding to the disordered source point, and extending in the batch evolution direction according to the execution sequence. It is used to characterize the coverage path and extension process of unstable expansion in the unified test execution coordinate space. Based on the source point direction, group cumulative intensity and wavefront coverage trajectory corresponding to each disordered source point, the corresponding group cumulative intensity and batch expansion order value are written into each coverage coordinate in the unified test execution coordinate space along the wavefront coverage trajectory to construct the test entropy increasing wavefront field. The group cumulative intensity is used to characterize the overall strength of the unstable expansion corresponding to the disordered source point. When constructing the test entropy-increasing wavefront field, the group cumulative intensity corresponding to the disordered source point is written into each coverage coordinate along the wavefront coverage trajectory corresponding to the disordered source point, and the forward writing order of the batch expansion sequence value is determined according to the source point direction. When different disordered source points expand to the same coverage coordinate along the wavefront coverage trajectory, the group cumulative intensity corresponding to each disordered source point is compared. The disordered source point with the larger group cumulative intensity is determined as the dominant writing source point of the coverage coordinate, and the group cumulative intensity and batch expansion sequence value corresponding to the dominant writing source point are retained to ensure that the expansion strength attribution and forward advancement trend of each coverage coordinate in the test entropy-increasing wavefront field are consistent. Coverage coordinates are the test case coordinates that the wavefront coverage trajectory passes through and reaches in the unified test execution coordinate space. Batch expansion order values are the order values written to each coverage coordinate to characterize the order in which the coverage coordinates arrive during the wavefront expansion process in the batch evolution direction.
[0025] In this embodiment, the unified test execution coordinate space is a coordinate representation space formed by uniformly mapping the execution position of each test case in a continuous test batch based on the batch index and the test case execution order index. The batch index is used to characterize the test batch position of the test case, and the test case execution order index is used to characterize the execution order of the test case in the corresponding test batch.
[0026] In this embodiment, the generation of the wavefront intrusion warning set specifically includes: Read the batch expansion sequence value and batch index corresponding to each coverage coordinate in the test entropy-incremented wavefront field, and sort them in ascending order according to the batch index and batch expansion sequence value to form a wavefront expansion sequence. Based on the coordinate displacement direction between adjacent coverage coordinates in the wavefront expansion sequence, the wavefront advance direction is extracted, and based on the batch index difference between adjacent coverage coordinates and the batch expansion sequence value difference, the number of coverage coordinates advanced within a unit batch is calculated to generate the wavefront advance velocity. The generation of wavefront advance direction and wavefront advance velocity specifically includes: first, reading the test case execution order index, batch index, and batch expansion order value corresponding to adjacent coverage coordinates in the wavefront expansion sequence order; subtracting the test case execution order index of the previous coverage coordinate from the test case execution order index of the later coverage coordinate to generate a coordinate displacement value sequence; then, adding all coordinate displacement values, determining the wavefront advance direction as the direction of increasing test case execution order index when the sum is greater than zero, determining the direction of the source point corresponding to the unordered source point as the wavefront advance direction when the sum is equal to zero, and determining the direction of decreasing test case execution order index as the wavefront advance direction when the sum is less than zero; subsequently... The batch index difference sequence is generated by subtracting the batch index of the previous coverage coordinate from the batch index of the subsequent coverage coordinate. The batch expansion order value difference sequence is generated by subtracting the batch expansion order value of the previous coverage coordinate from the batch expansion order value of the subsequent coverage coordinate. Next, adjacent coverage coordinates with a batch index difference greater than zero are selected, and the corresponding batch expansion order value difference is divided by the batch index difference to obtain the number of coverage coordinates advanced within a unit batch. The total number of coverage coordinates advanced is added together and divided by the calculated number to obtain the wavefront advance velocity. The calculated number is the number of adjacent coverage coordinate pairs that satisfy the condition of a batch index difference greater than zero and are included in the calculation of the coverage coordinate advance velocity. Extract the coordinate distance between the end coverage coordinate and the corresponding source point coordinate under the current batch index in the wavefront extension sequence, and determine the coordinate distance as the wavefront boundary coverage depth. At the same time, read the batch index corresponding to the first time each coverage coordinate is written into the batch extension sequence value to determine the wavefront arrival time. The generation of wavefront boundary coverage depth and wavefront arrival time specifically includes: reading all coverage coordinates written by the same disordered source point in the test entropy increasing wavefront field according to the current batch index, and extracting the test case execution order index and batch expansion order value corresponding to each coverage coordinate; then determining the end coverage coordinates according to the source point direction. When the source point direction is the direction of increasing test case execution order index, the coverage coordinate with the largest test case execution order index is selected as the end coverage coordinate; when the source point direction is the direction of decreasing test case execution order index, the coverage coordinate with the smallest test case execution order index is selected as the end coverage coordinate, and the end coverage coordinate is output; then reading the source point coordinates corresponding to the disordered source point, subtracting the test case execution order index of the source point coordinates from the test case execution order index of the end coverage coordinates, and taking the absolute value of the difference to obtain the coordinate distance, which is determined as the wavefront boundary coverage depth; then reading the batch expansion order value write records corresponding to each coverage coordinate one by one, extracting the batch index corresponding to the write record with the smallest batch index, and determining it as the wavefront arrival time of the coverage coordinate; Extract the coordinates of the test cases to be executed under the current batch index in the unified test execution coordinate space, and compare the position of each coordinate to be executed with the end coverage coordinates under the current batch index. Filter the coordinates to be executed that are located on the front side of the wavefront advance direction and whose coordinate distance is not greater than the wavefront boundary coverage depth, and generate a wavefront intrusion candidate set. If a coordinate is located ahead of the wavefront advance direction, the current wavefront boundary position is first determined by using the end coverage coordinate under the current batch index. Then, the wavefront advance direction is used to determine whether the coordinate to be executed is on the forward extension side of the end coverage coordinate. If the wavefront advance direction is the direction of increasing test case execution order index, the test case execution order index of the coordinate to be executed is subtracted from the test case execution order index of the end coverage coordinate. If the difference is greater than zero, the coordinate to be executed is considered to be ahead. If the wavefront advance direction is the direction of decreasing test case execution order index, the test case execution order index of the end coverage coordinate is subtracted from the test case execution order index of the coordinate to be executed. If the difference is greater than zero, the coordinate to be executed is considered to be ahead. Based on this, the difference between the test case execution order index of the coordinate to be executed and the test case execution order index of the end coverage coordinate is taken as the absolute value to obtain the coordinate distance. When the coordinate distance is not greater than the wavefront boundary coverage depth, the coordinate to be executed is considered to have fallen into the forward coverage range that the current wavefront can continue to invade. The wavefront invasion candidate set is used to characterize the test cases to be executed that have entered the range that the current wavefront can continue to invade. Based on the wavefront advance speed, wavefront arrival time, and coordinate distance between each coordinate to be executed and the end coverage coordinate in the wavefront intrusion candidate set, calculate the expected intrusion batch index corresponding to each test case to be executed, and write the test cases to be executed with the expected intrusion batch index not greater than the preset warning batch index into the wavefront intrusion warning set. The specific steps for generating a wavefront intrusion warning set are as follows: First, read the coordinates to be executed, the corresponding end-cover coordinates, the coordinate distance between them, and the wavefront arrival time corresponding to the end-cover coordinates from the wavefront intrusion candidate set to generate an intrusion prediction dataset; then, divide each coordinate distance by the wavefront advance speed and round up the resulting quotient to generate an intrusion batch increment; add the corresponding intrusion batch increment to the wavefront arrival time corresponding to each end-cover coordinate to generate an expected intrusion batch index for each test case to be executed; then, write the test cases to be executed whose expected intrusion batch index is not greater than the preset warning batch index into the wavefront intrusion warning set. The preset warning batch index is obtained by summing all batch differences between the actual intrusion batch index and the expected intrusion batch index in the historical unstable batches, dividing by the number of historical unstable batches, rounding up, and then adding it to the current batch index.
[0027] In this embodiment, the automated re-execution of test cases specifically includes: Read each test case to be executed from the wavefront intrusion warning set, and extract the expected intrusion batch index, current batch index, dependency call record and resource consumption record corresponding to each test case to be executed; Subtract the current batch index from the expected intrusion batch index to obtain the batch advance. Based on the batch advance, determine the re-execution start batch index for each test case to be executed, write the re-execution start batch index into the corresponding test case to be executed, and generate re-execution timing adjustment information. Extract the processor usage, memory usage, connection pool usage, thread pool usage, and queue usage values corresponding to each execution node, perform normalization on each value, and then perform a weighted sum to generate a node load value. Assign the execution node with the lowest node load value to the corresponding test case to be executed, and generate re-execution node allocation information. Read the called service identifier and historical dependency call record corresponding to each test case to be executed, determine the dependency replica identifier corresponding to the current called service identifier, and allocate the dependency replica identifier not occupied by the current batch to the corresponding test case to be executed, and generate dependency replica switching information; The called service identifier is the identification information used to uniquely identify the external dependent service object called during the execution of the test case. The dependent copy identifier is the identification information used to uniquely identify the service copy instance corresponding to the external dependent service object, which can be switched and used for the re-execution of the test case. Based on the node load value of the execution node corresponding to the re-execution node allocation information and the resource usage record corresponding to the test cases to be executed, determine the processor quota adjustment value, memory quota adjustment value, connection pool capacity adjustment value, thread pool capacity adjustment value and queue capacity adjustment value, and generate environment carrying capacity adjustment information; The re-execution timing adjustment information is the re-execution start batch index information determined based on the expected intrusion batch index, current batch index, and batch advance of the test case to be executed. It is used to characterize the batch timing when the test case to be executed should enter the automated re-execution in advance. The re-execution node allocation information is the node assignment information formed after allocating execution nodes to the test case to be executed based on the node load value of each execution node. It is used to characterize the execution node corresponding to the test case to be executed during the pre-re-execution process. The dependency replica switching information is the replica switching information formed after determining and allocating the dependency replica identifier for the test case to be executed based on the called service identifier and historical dependency call record corresponding to the test case to be executed. It is used to characterize the dependency service replica corresponding to the test case to be executed during the pre-re-execution process. The environment load adjustment information is the processor quota adjustment value, memory quota adjustment value, connection pool capacity adjustment value, thread pool capacity adjustment value, and queue capacity adjustment value determined based on the node load value and resource usage record corresponding to the execution node. It is used to characterize the load adjustment content of the execution environment corresponding to the test case to be executed before the pre-re-execution. The re-execution timing adjustment information, re-execution node allocation information, dependency replica switching information, and environment capacity adjustment information are arranged according to the re-execution start batch index and test case execution order index corresponding to the test cases to be executed, generating a pre-re-execution sequence, and automatically re-execute the test cases according to the pre-re-execution sequence; The pre-execution re-execution sequence is an ordered execution sequence formed by arranging re-execution timing adjustment information, re-execution node allocation information, dependency replica switching information, and environment carrying capacity adjustment information according to the re-execution start batch index and test case execution order index corresponding to the test cases to be executed. It is used to characterize the automated re-execution arrangement content and execution order of the test cases to be executed before the wavefront intrusion occurs.
[0028] A test case automated re-execution system, comprising: The data acquisition module is used to collect raw data from consecutive test batches to form the raw dataset of the test batch. The data preprocessing module is used to preprocess the raw dataset of the test batch and generate a standardized test state sequence; The disordered representation construction module is used to construct a disordered representation sequence of tests based on the standardized test state sequence. The disordered source point generation module is used to identify the continuously enhanced disordered segments and cross-batch expansion segments based on the test disordered characterization sequence, determine the initial position, expansion direction and cumulative intensity of the triggering unstable expansion, and generate a set of disordered source points. The wavefront construction module is used to map the disordered set of source points to a unified test execution coordinate space, and combine it with the test case execution order index to construct a test entropy increasing wavefront. The wavefront intrusion warning module is used to extract the wavefront advance direction, wavefront advance speed, wavefront boundary coverage depth and wavefront arrival time based on the test entropy increase wavefront field, and generate a wavefront intrusion warning set by combining the distribution of the test cases to be executed in the unified test execution coordinate space. The pre-execution module is used to generate a pre-execution sequence based on the wavefront intrusion warning set, and to automate the re-execution of test cases.
[0029] Example 1: To verify the feasibility of this invention in practice, it was applied to the automated testing center of a financial software R&D company. This testing center is responsible for continuous integration testing and nighttime regression testing of account services, transaction services, message services, and permission services. Test batches are closely linked, there are many test cases, dependent service calls are frequent, and execution nodes are constantly switching. In the past, testers typically determined whether to rerun a test based on single failure logs. This often resulted in a small number of anomalies in one batch gradually spreading to subsequent batches, ultimately leading to a large number of test cases failing passively in consecutive batches.
[0030] In this scenario, test execution records, assertion trigger records, dependency call records, environment recovery records, and resource usage records from consecutive test batches are first collected to form the original test batch dataset. Then, the original test batch dataset is aligned by execution time, bound to batches, anomaly records are removed, missing data is filled in, and dimensions are unified to generate a standardized test state sequence. Based on this, representations of execution duration fluctuations, assertion jitter, dependency call offsets, environment recovery delays, and resource contention changes are constructed and organized into a test disorder representation sequence according to the batch evolution direction. Subsequently, based on this sequence, continuously increasing disorder segments and cross-batch expansion segments are identified, determining the initial position, expansion direction, and cumulative intensity of the triggered instability expansion, generating a set of disorder source points. This set of disorder source points is then mapped to a unified test execution coordinate space, and a test entropy-increasing wavefront is constructed using the test case execution order index. The wavefront propagation direction, wavefront propagation speed, wavefront boundary coverage depth, and wavefront arrival time are extracted from this wavefront data. Before executing a new round of regression testing, the testing center preemptively identifies test cases that will be affected by the wave intrusion warning set, generates a pre-execution sequence, and synchronously adjusts the timing of re-execution, execution nodes, dependent copies, and environmental support. This ensures that unstable chains that might have been passively exposed in subsequent batches are intercepted before entering the concentrated failure phase.
[0031] To verify the performance of the present invention, it was compared with the traditional method. The comparison results are shown in Table 1.
[0032] Table 1. Comprehensive Comparison of the Invention Method and Traditional Methods
[0033] As shown in Table 1, the most significant improvement of the method in this invention is not merely "reducing the number of test cases that need to be rerun," but rather preventing instability propagation at its inception. Under traditional methods, the average number of failed test cases per round reaches 47, while the method in this invention reduces this to 18. This indicates that a large number of anomalies that would otherwise be exposed in subsequent batches are identified and addressed in advance during the pre-intrusion warning stage. Correspondingly, the batch span for instability propagation is reduced from 4.6 batches to 1.7 batches, which particularly highlights the core value of this invention. Traditional methods often only begin remediation after a failure is discovered within a single batch, by which time the anomaly has already propagated along the execution chain. In contrast, this invention first constructs a test disorder representation sequence from consecutive test batches, then identifies the set of disordered source points and the test entropy increase front field, and finally triggers pre-execution re-runs based on the pre-intrusion warning set. Therefore, the interruption of the propagation chain is earlier and more accurate.
[0034] From the perspective of resource utilization and execution efficiency, the method of this invention also has significant advantages. The average number of invalid re-execution test cases per round decreased from 31 to 9, a reduction of 71.0%. This indicates that this invention does not simply expand the scope of re-execution, but rather generates a pre-execution sequence only for truly high-risk test cases after predicting the intrusion batch index. This significantly reduces the ineffective consumption caused by the traditional method of "failure first, then global re-run, and then secondary screening." The reduction in manual investigation time from 6.8 hours to 2.7 hours also directly corresponds to this point. In traditional methods, testers often need to backtrack step by step based on failure logs, dependency call fluctuations, and resource congestion. This invention, however, makes the unstable evolution path explicit through disordered continuous enhancement segments, cross-batch expansion segments, and wavefront coverage trajectories, so that problem localization no longer relies on a large amount of manual judgment, thus significantly reducing the intensity of manual intervention.
[0035] The average regression completion time per round decreased from 10.9 hours to 8.4 hours. While the reduction may not seem as significant as the previous metrics, this metric better illustrates the stable and continuous process optimization capabilities of this invention. Regression time is inherently influenced by test scale, number of execution nodes, response status of dependent services, and batch switching rhythm, and is naturally less prone to drastic fluctuations than a concentrated number of failed test cases. Even so, this invention still achieved a 22.9% compression, indicating that it is not merely a localized patch, but rather a proactive scheduling of the entire test execution chain. The fundamental reason is that this invention does not wait for failures to occur before reallocating resources, but rather adjusts the timing, allocates nodes, and regulates the environment in advance based on the expected intrusion batch index, the re-execution starting batch index, node load values, and dependent replica switching information. Therefore, it effectively reduces back-end blocking, node queuing, and dependent replica contention, resulting in a smoother overall test rhythm.
[0036] The above are merely preferred embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A test case automated re-execution method, characterized in that, Includes the following steps: Collect raw data from consecutive test batches to form the raw dataset of the test batches; Preprocess the raw dataset of the test batch to generate a standardized test state sequence; Based on the standardized test state sequence, a test disordered representation sequence is constructed; Based on the test disordered characterization sequence, identify the disordered continuously enhanced segment and the cross-batch expansion segment, determine the initial position, expansion direction and cumulative intensity of the triggering unstable expansion, and generate a set of disordered source points; The disordered source point set is mapped to a unified test execution coordinate space, and combined with the test case execution order index, a test entropy enhancement front field is constructed. Based on the test entropy increase of the wavefront field, the wavefront advance direction, wavefront advance speed, wavefront boundary coverage depth and wavefront arrival time are extracted, and combined with the distribution of the test cases to be executed in the unified test execution coordinate space, a wavefront intrusion warning set is generated; Based on the wavefront intrusion warning set, a pre-execution re-execution sequence is generated to automate the re-execution of test cases.
2. The method of claim 1, wherein, The raw data includes test execution records, assertion trigger records, dependency call records, environment recovery records, and resource usage records.
3. The method of claim 1, wherein the test case is automatically re-executed if the test case fails. The preprocessing includes time alignment, batch binding, abnormal record removal, missing data completion, and unit unification.
4. The method of claim 1, wherein the test case is automatically re-executed if the test case fails. The generation of the disordered representation sequence for testing specifically includes: Extract the start and end times of execution for the same test case in consecutive test batches from the standardized test state sequence, arrange them according to the batch index to form an execution duration sequence, and generate an execution duration fluctuation characterization based on the magnitude and direction of change in execution duration between adjacent test batches. Retrieve assertion trigger records for the same test case in consecutive test batches, arrange them according to the batch index to form an assertion trigger sequence, and generate assertion jitter representation based on the changes in the number of assertion triggers and the changes in assertion trigger status identifiers between adjacent test batches. Read the dependency call records corresponding to the same test case in consecutive test batches, arrange them according to the batch index to form a dependency call sequence, and generate a dependency call offset representation based on the changes in the duration of dependency calls and the changes in the return status identifier between adjacent test batches. Extract the environment recovery record and resource usage record corresponding to the same test case in consecutive test batches, arrange them according to the batch index to form the environment recovery sequence and resource usage sequence, and generate an environment recovery delay characterization based on the change in environment recovery time between adjacent test batches, and generate a resource contention change characterization based on the change in resource usage value between adjacent test batches. The execution time fluctuation representation, assertion jitter representation, dependency call offset representation, environment recovery delay representation, and resource contention change representation are correlated and organized to generate a test disordered representation sequence.
5. The method of claim 1, wherein the test case is automatically re-executed if the test case fails. The generation of the disordered source point set specifically includes: Read the execution time fluctuation, assertion jitter, dependency call offset, environment recovery delay, and resource contention change representations corresponding to the same test case in the batch-indexed test disordered representation sequence, forming a disordered observation trajectory continuously arranged along the batch evolution direction; Based on the disordered observation trajectory, disordered continuous enhancement segments are generated for the continuous enhancement state and synchronous continuation state represented by each adjacent batch index. The location for receiving expansion is determined based on adjacent segments with continuously increasing disorder, and cross-batch receiving expansion segments are generated. The initial location and end tracking of the disorder-reinforcing segment and the cross-batch expansion segment are determined to identify the initial location and expansion direction that triggers instability expansion. The cumulative intensity is determined based on the coverage length, span, and continuous enhancement intensity of the disordered continuous enhancement section and the cross-batch expansion section in the batch evolution direction; The disordered continuous enhancement segments and cross-batch expansion segments are grouped according to their initial position, expansion direction, and cumulative intensity to generate a set of disordered source points.
6. The method of claim 1, wherein, The generation of the test entropy augmentation front field specifically includes: Read the source point position, source point direction, group cumulative strength and batch index of each unordered source point in the unordered source point set, and extract the batch index, test case execution order index and execution node identifier of each test case in the standardized test state sequence. Construct a unified test execution coordinate space based on the batch index and test case execution order index. Within the unified test execution coordinate space, each unordered source point is mapped to the corresponding batch coordinates and execution order coordinates to generate a source point coordinate set; Based on the sequential relationship of the execution order index of the preceding and subsequent test cases within the same test batch, the execution order sequence relationship between test cases is determined. Starting with the coordinates of each source point, coordinate expansion is performed along the execution sequence and in the direction of batch evolution. The coordinates of the test cases reached by the expansion are connected continuously in the order of succession to generate the wavefront coverage trajectory. Based on the source point direction, group cumulative intensity, and wavefront coverage trajectory corresponding to each disordered source point, the corresponding group cumulative intensity and batch expansion order value are written into each coverage coordinate in the unified test execution coordinate space along the wavefront coverage trajectory to construct the test entropy increasing wavefront field.
7. The method of claim 6, wherein the test case is automatically re-executed if the test case fails. The unified test execution coordinate space is a coordinate representation space formed by uniformly mapping the execution position of each test case in a continuous test batch based on the batch index and the test case execution order index. The batch index is used to characterize the position of the test case in the test batch, and the test case execution order index is used to characterize the execution order of the test case in the corresponding test batch.
8. The method of claim 1, wherein the test case is automatically re-executed if the test case fails. The generation of the wavefront intrusion warning set specifically includes: Read the batch expansion sequence value and batch index corresponding to each coverage coordinate in the test entropy-incremented wavefront field, and sort them in ascending order according to the batch index and batch expansion sequence value to form a wavefront expansion sequence. Based on the coordinate displacement direction between adjacent coverage coordinates in the wavefront expansion sequence, the wavefront advance direction is extracted, and based on the batch index difference between adjacent coverage coordinates and the batch expansion sequence value difference, the number of coverage coordinates advanced within a unit batch is calculated to generate the wavefront advance velocity. Extract the coordinate distance between the end coverage coordinate and the corresponding source point coordinate under the current batch index in the wavefront extension sequence, and determine the coordinate distance as the wavefront boundary coverage depth. At the same time, read the batch index corresponding to the first time each coverage coordinate is written into the batch extension sequence value to determine the wavefront arrival time. Extract the coordinates of the test cases to be executed under the current batch index in the unified test execution coordinate space, and compare the position of each coordinate to be executed with the end coverage coordinates under the current batch index. Filter the coordinates to be executed that are located on the front side of the wavefront advance direction and whose coordinate distance is not greater than the wavefront boundary coverage depth, and generate a wavefront intrusion candidate set. Based on the wavefront advance speed, wavefront arrival time, and coordinate distance between each coordinate to be executed and the end coverage coordinate in the wavefront intrusion candidate set, calculate the expected intrusion batch index corresponding to each test case to be executed, and write the test cases to be executed with the expected intrusion batch index not greater than the preset warning batch index into the wavefront intrusion warning set.
9. The method of claim 1, wherein the test case is automatically re-executed if the test case fails. The automated re-execution of test cases specifically includes: Read each test case to be executed from the wavefront intrusion warning set, and extract the expected intrusion batch index, current batch index, dependency call record and resource consumption record corresponding to each test case to be executed; Subtract the current batch index from the expected intrusion batch index to obtain the batch advance. Based on the batch advance, determine the re-execution start batch index for each test case to be executed, write the re-execution start batch index into the corresponding test case to be executed, and generate re-execution timing adjustment information. Extract the processor usage, memory usage, connection pool usage, thread pool usage, and queue usage values corresponding to each execution node, perform normalization on each value, and then perform a weighted sum to generate a node load value. Assign the execution node with the lowest node load value to the corresponding test case to be executed, and generate re-execution node allocation information. Read the called service identifier and historical dependency call record corresponding to each test case to be executed, determine the dependency replica identifier corresponding to the current called service identifier, and allocate the dependency replica identifier not occupied by the current batch to the corresponding test case to be executed, and generate dependency replica switching information; Based on the node load value of the execution node corresponding to the re-execution node allocation information and the resource usage record corresponding to the test cases to be executed, determine the processor quota adjustment value, memory quota adjustment value, connection pool capacity adjustment value, thread pool capacity adjustment value and queue capacity adjustment value, and generate environment carrying capacity adjustment information; The re-execution timing adjustment information, re-execution node allocation information, dependency replica switching information, and environment capacity adjustment information are arranged according to the re-execution start batch index and test case execution order index corresponding to the test cases to be executed, generating a pre-re-execution sequence, and automatically re-execute the test cases according to the pre-re-execution sequence.
10. A test case automatic re-execution system, which executes the test case automatic re-execution method according to any one of claims 1 to 9, characterized by, include: The data acquisition module is used to collect raw data from consecutive test batches to form the raw dataset of the test batch. The data preprocessing module is used to preprocess the raw dataset of the test batch and generate a standardized test state sequence; The disordered representation construction module is used to construct a disordered representation sequence of tests based on the standardized test state sequence. The disordered source point generation module is used to identify the continuously enhanced disordered segments and cross-batch expansion segments based on the test disordered characterization sequence, determine the initial position, expansion direction and cumulative intensity of the triggering unstable expansion, and generate a set of disordered source points. The wavefront construction module is used to map the disordered set of source points to a unified test execution coordinate space, and combine it with the test case execution order index to construct a test entropy increasing wavefront. The wavefront intrusion warning module is used to extract the wavefront advance direction, wavefront advance speed, wavefront boundary coverage depth and wavefront arrival time based on the test entropy increase wavefront field, and generate a wavefront intrusion warning set by combining the distribution of the test cases to be executed in the unified test execution coordinate space. The pre-execution module is used to generate a pre-execution sequence based on the wavefront intrusion warning set, and to automate the re-execution of test cases.