Software testing method and system
By generating a timing test instruction set and animation sequence frame mapping that simulates real user operations, the shortcomings of timing anomaly detection in interactive animation continuity verification in existing technologies are solved, achieving efficient detection of animation stuttering and frame loss, and improving the accuracy and applicability of test results.
Patent Information
- Application Number
- CN202511080643.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-04
- Publication Date
- 2025-11-14
AI Technical Summary
Existing software testing methods cannot effectively detect timing anomalies such as animation stuttering and frame loss in interactive animation continuity verification scenarios, resulting in test results that cannot truly reflect the user experience in dynamic interactions, and thus have poor accuracy and applicability.
By recording user interaction operations using automated tools, a timing test instruction set simulating real user operation behavior is generated. Based on the timing mapping relationship, the displacement components between animation sequence frames are calculated, the actual motion trajectory curve is generated and compared with the expected trajectory, and a test report is generated by combining the timing mapping relationship and dual anomaly judgment rules.
It significantly improves the reliability of detecting timing anomalies such as animation stuttering and frame loss, ensuring that test results truly reflect dynamic continuity defects in interactive scenarios, and provides accurate test reports on the timing accuracy of animation rendering and the naturalness of motion trajectories.
Smart Images

Figure CN120950404A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of software testing, and in particular relates to a software testing method and system. Background Technology
[0002] Software testing is a core component in ensuring software quality, especially in interactive applications where the continuity of animation effects directly impacts user experience. With the widespread adoption of mobile internet and smart devices, users have increasingly higher demands for the smoothness of interactive animations. For example, scenarios such as gesture response and interface transition effects require rigorous verification of the timing accuracy and naturalness of motion trajectories. Efficient automated testing methods have become a key technology for improving the reliability of interactive software and have broad application prospects.
[0003] Existing software testing methods primarily utilize static screenshot comparison technology, analyzing pixel differences between captured keyframe images and the expected effect image, suitable for interface layout verification. However, in software testing scenarios involving interactive animation continuity verification, static screenshot comparison methods can only capture single-frame rendering errors and cannot detect timing anomalies such as animation stuttering and frame loss. This results in test results that fail to accurately reflect the user experience in dynamic interactions and make it difficult to pinpoint the key anomalies causing animation distortion. Therefore, existing software testing methods suffer from poor accuracy and applicability in interactive animation continuity verification scenarios. Summary of the Invention
[0004] This application provides a software testing method and system that can improve the accuracy of test results and the applicability of the testing method.
[0005] Firstly, this application provides a software testing method applicable to the continuity verification of interactive animation effects, the method comprising:
[0006] The system uses automated tools to record user interaction operations to generate function command sequences, and simultaneously acquires the animation sequence frame data output by the software under test, as well as the time interval sequence and operation sequence of user interaction operations. The animation sequence frame data includes the timestamp of each animation sequence frame and the motion trajectory coordinates of the corresponding control.
[0007] The timing parameters are used to dynamically reconstruct the sequence of function commands to generate a timing test instruction set that simulates real user operation behavior. The timing parameters are determined by the time interval sequence and operation sequence of user interaction operations. The timing test instruction set is used to trigger the animation rendering process corresponding to the sequence of function commands executed by the software under test.
[0008] Establish a time-series mapping relationship between the time-series test instruction set and the animation sequence frame data based on the timestamp; calculate the displacement components between consecutive animation sequence frames in the animation sequence frame data based on the time-series mapping relationship; and generate motion vector data including displacement vector sequences.
[0009] Based on the displacement vector sequence of the target control in the motion vector data, the actual motion trajectory curve is generated, and the coordinate deviation of the actual motion trajectory curve is compared with the preset expected motion trajectory curve to obtain the deviation data.
[0010] Based on the timestamps of the corresponding animation sequence frames according to the deviation data, the abnormal time periods in the animation sequence frame data that do not meet the preset continuity evaluation conditions are marked, and the target abnormal time period is determined in the abnormal time period using the preset change threshold, and a test report including the target abnormal time period and quantification parameters is generated.
[0011] In one feasible implementation, before calculating the displacement components between consecutive animation sequence frames in the animation sequence frame data based on the temporal mapping relationship and generating displacement vector data, the method further includes:
[0012] Calculate the average delay offset based on the timestamps of user interaction operations and the timestamps of the corresponding animation sequence frames;
[0013] Timing mapping is corrected by linear interpolation based on the average delay offset.
[0014] In one feasible implementation, the timing parameters include interval fluctuation range parameters and operation triggering rule information, and the method further includes:
[0015] Extract the set of time interval values from the time interval sequence of user interaction operations;
[0016] Based on the maximum and minimum time interval values of the time interval value set, determine the interval fluctuation range parameter;
[0017] Based on the logical order of operations in the sequence of user interaction operations, the operation triggering dependencies are determined, and the operation triggering rule information is obtained.
[0018] In one feasible implementation, timing parameters are used to dynamically reconstruct the sequence of functional commands to generate a timing test instruction set that simulates real user operation behavior, including:
[0019] Time offsets are assigned to each operation instruction in the function command sequence to obtain time-delayed operation command data. The time offsets are randomly generated within the interval fluctuation range parameter of the timing parameters.
[0020] Based on the operation triggering rule information of the timing parameters, adjust the triggering order of operation instructions in the time delay operation command data to obtain a timing test instruction set in which the triggering interval of adjacent operation instructions satisfies the operation triggering dependency relationship in the operation triggering rule information.
[0021] In one feasible implementation, a timing mapping relationship between the timing test instruction set and the animation sequence frame data is established based on timestamps. Based on the timing mapping relationship, the displacement components between consecutive animation sequence frames in the animation sequence frame data are calculated to generate motion vector data including a displacement vector sequence, including:
[0022] The trigger time of each test instruction in the timing test instruction set is matched with the timestamp of the animation sequence frame data to establish a timing mapping relationship between the test instructions and the subset of animation sequence frames;
[0023] Based on the subset of animation sequence frames corresponding to each test instruction in the time-series mapping relationship, the horizontal and vertical position changes of continuous animation sequence frames in the animation sequence frame data are calculated pixel by pixel.
[0024] The horizontal and vertical position changes are combined in time sequence to form a pixel displacement vector sequence, generating motion vector data.
[0025] In one feasible implementation, based on the displacement vector sequence of the target control in the motion vector data, an actual motion trajectory curve is generated, and the actual motion trajectory curve is compared with a preset expected motion trajectory curve to obtain deviation data, including:
[0026] Extract the horizontal displacement component sequence and the vertical displacement component sequence from the displacement vector sequence of the target control;
[0027] The horizontal coordinate sequence is generated by accumulating the component values of the horizontal displacement component sequence in chronological order, and the vertical coordinate sequence is generated by accumulating the component values of the vertical displacement component sequence.
[0028] Combine the coordinate values of the same time point in the horizontal and vertical coordinate sequences to form the actual motion trajectory coordinate points of the target control, and connect the actual motion trajectory coordinate points in chronological order to form the actual motion trajectory curve;
[0029] The coordinates of the actual motion trajectory curve are matched with the corresponding coordinates of the expected motion trajectory curve in chronological order. The horizontal distance difference and vertical distance difference of each pair of matched coordinate points are calculated to obtain the deviation data composed of the position deviation value of each time point.
[0030] In one feasible implementation, the abnormal time periods in the animation sequence frame data that do not meet the preset continuity evaluation conditions are marked based on the timestamps of the corresponding animation sequence frames of the deviation data. A target abnormal time period is then determined within the abnormal time periods using a preset change threshold, and a test report including the target abnormal time period and quantification parameters is generated, comprising:
[0031] The time period in the deviation data where the position deviation value of consecutive time points is greater than the preset position deviation threshold is defined as the abnormal time period.
[0032] Extract the displacement change difference of motion vector data between adjacent time points within the abnormal time period, and determine the sub-time period in the abnormal time period where the displacement change difference is greater than a preset change threshold to obtain the target abnormal time period;
[0033] Calculate the duration and average location deviation of the target abnormal time period, generate a set of quantized parameters including timestamp range, duration and average deviation, and obtain a test report including the target abnormal time period and the set of quantized parameters.
[0034] Secondly, this application provides a software testing system suitable for verifying the continuity of interactive animation effects. The system includes:
[0035] The acquisition module is used to record user interaction operations to generate function command sequences through automated tools, and simultaneously acquire animation sequence frame data output by the software under test, as well as the time interval sequence and operation sequence of user interaction operations. The animation sequence frame data includes the timestamp of each animation sequence frame and the motion trajectory coordinates of the corresponding control.
[0036] The generation module is used to dynamically reconstruct the sequence of functional commands using timing parameters, and generate a timing test instruction set that simulates real user operation behavior. The timing parameters are determined by the time interval sequence and operation sequence of user interaction operations. The timing test instruction set is used to trigger the animation rendering process corresponding to the sequence of functional commands executed by the software under test.
[0037] The calculation module is used to establish a time-series mapping relationship between the timing test instruction set and the animation sequence frame data based on the timestamp, and to calculate the displacement components between consecutive animation sequence frames in the animation sequence frame data based on the time-series mapping relationship, thereby generating motion vector data including displacement vector sequences.
[0038] The comparison module is used to generate the actual motion trajectory curve based on the displacement vector sequence of the target control in the motion vector data, and compare the actual motion trajectory curve with the preset expected motion trajectory curve to obtain the deviation data.
[0039] The generation module is also used to mark abnormal time periods in the animation sequence frame data that do not meet the preset continuity evaluation conditions based on the timestamps of the corresponding animation sequence frames of the deviation data, and to determine the target abnormal time period in the abnormal time period using the preset change threshold, and generate a test report including the target abnormal time period and quantification parameters.
[0040] Thirdly, this application provides an electronic device, the device comprising: a processor, and a memory storing computer program instructions; the processor reads and executes the computer program instructions to implement the software testing method as described in any embodiment of the first aspect.
[0041] Fourthly, this application provides a computer-readable storage medium storing computer program instructions, which, when executed by a processor, implement the software testing method as described in any embodiment of the first aspect.
[0042] The software testing method and system of this application simulate the rhythm of real user operations by dynamically reconstructing the timing test instruction set, effectively triggering the animation rendering process of the software under test in interactive scenarios, and solving the problem that traditional static screenshot methods cannot capture timing anomalies. By accumulating displacement components to generate actual motion trajectory curves and comparing them point-by-point with the expected trajectory, the cumulative error of the motion path is accurately quantified, overcoming the limitation of coordinate trajectory detection technology in missing continuous defects. Combining timing mapping relationships and dual anomaly judgment rules, collaborative verification from animation timing distortion to spatial trajectory deviation is achieved, significantly improving the accuracy of locating abnormal time periods. Ultimately, while ensuring the accuracy of animation rendering timing and the naturalness of motion trajectories, a test report that truly reflects the dynamic user experience is provided for interactive software.
[0043] Furthermore, by calculating the average delay offset between user interaction operations and animation sequence frames, timing reference errors caused by system response delays are eliminated. Linear interpolation is used to dynamically correct the timing mapping relationship, compensating for time drift in animation rendering under different operation commands, ensuring strict alignment between the test command triggering time and the animation frame rendering time. This solves the problem of animation frame range matching errors caused by timing inaccuracies, ensuring the timing consistency of subsequent displacement component calculations. Ultimately, this significantly improves the reliability of timing anomaly detection such as animation stuttering and frame loss, allowing test results to truly reflect dynamic continuity defects in interactive scenarios. Attached Figure Description
[0044] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0045] Figure 1This is a flowchart illustrating a software testing method provided in one embodiment of this application;
[0046] Figure 2 This is a flowchart illustrating a method for determining deviation data provided in one embodiment of this application;
[0047] Figure 3 This is a flowchart illustrating a method for generating a software test report according to an embodiment of this application;
[0048] Figure 4 This is a schematic diagram of the structure of a software testing system provided in one embodiment of this application;
[0049] Figure 5 This is a schematic diagram of the hardware structure of an electronic device provided in one embodiment of this application. Detailed Implementation
[0050] The features and exemplary embodiments of various aspects of this application will be described in detail below. To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain this application and not to limit it. For those skilled in the art, this application can be implemented without some of these specific details. The following description of the embodiments is merely to provide a better understanding of this application by illustrating examples.
[0051] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes said element.
[0052] Existing software testing methods primarily utilize static screenshot comparison technology, analyzing pixel differences between captured keyframe images and the expected effect image, suitable for interface layout verification. However, in software testing scenarios involving interactive animation continuity verification, static screenshot comparison methods can only capture single-frame rendering errors and cannot detect timing anomalies such as animation stuttering and frame loss. This results in test results that fail to accurately reflect the user experience in dynamic interactions and make it difficult to pinpoint the key anomalies causing animation distortion. Therefore, existing software testing methods suffer from poor accuracy and applicability in interactive animation continuity verification scenarios.
[0053] To address the problems of the prior art, embodiments of this application provide a software testing method and system. The software testing method provided in this application embodiment is described below first.
[0054] Figure 1 A flowchart illustrating a software testing method provided in one embodiment of this application is shown. Figure 1 As shown, the method includes steps S110 to S150. This method is applicable to the continuity verification of interactive animation effects, and includes:
[0055] S110: The system records user interaction operations to generate function command sequences using automated tools, and simultaneously acquires the animation sequence frame data output by the software under test, as well as the time interval sequence and operation sequence of user interaction operations. The animation sequence frame data includes the timestamp of each animation sequence frame and the motion trajectory coordinates of the corresponding control.
[0056] Interactive animation continuity verification refers to the process of testing the smoothness of dynamic effects triggered by user operations, encompassing dimensions such as animation frame rate stability, motion trajectory smoothness, and timing accuracy. The function command sequence is a set of user operation instructions captured by automated tools, including interactive actions such as clicking, swiping, and zooming, along with their triggering parameters. Animation sequence frame data consists of continuous screen data output by the software under test after responding to an operation; each frame includes a timestamp and the real-time position coordinates of interface controls. The time interval sequence records the time difference between adjacent user operations, reflecting the operation rhythm. The operation sequence describes the logical execution order of the operation instructions. Motion trajectory coordinates refer to the real-time position data of animated controls in the screen coordinate system, which can be recorded in two-dimensional coordinate form.
[0057] First, automated testing tools are used to monitor user interaction events and capture raw operation data. Touch events are parsed to generate standardized functional command sequences; these can be achieved using tools like Appium or Selenium. For example, screen swipe operations are converted into instructions containing starting coordinates, swipe direction, and speed parameters. During user operation, animation sequence frames are acquired periodically at the frame rate using the software under test's rendering interface or system-level screen capture technology. Simultaneously, the timestamp of each frame and the center point coordinates of the target control are extracted to form an animation sequence frame dataset; the target control can be buttons, sliders, etc. Using the operation event timestamps, the time interval difference between adjacent operations is calculated to generate a time interval sequence. Based on the operation type and triggering order, the logical dependencies between operations are deduced to form an operation sequence.
[0058] For example, in a mobile phone photo album image browsing scenario, the automation tool records three quick leftward swipes by the user. A sequence of functional commands is generated: Command 1 (swiping start coordinates X1Y1, ending coordinates X2Y1, speed V1), Command 2 (start X2Y1, ending X3Y1, speed V2), and Command 3 (start X3Y1, ending X4Y1, speed V3). Simultaneously, 30 frames of animation data output by the software under test are collected, each frame containing a timestamp and the center coordinates of the image control. The operation timing is extracted: Command 1 and Command 2 are spaced 200 milliseconds apart, and Command 2 and Command 3 are spaced 180 milliseconds apart, forming a time interval sequence. The operation sequence is defined as a strictly leftward continuous swipe. The motion trajectory coordinates record the horizontal displacement change of the image in each frame, for example, frame 1 coordinates 100x200, frame 2 coordinates 92x200, etc.
[0059] S120: Dynamically reconstruct the function command sequence using timing parameters to generate a timing test instruction set that simulates real user operation behavior. The timing parameters are determined based on the time interval sequence and operation sequence of user interaction operations. The timing test instruction set is used to trigger the animation rendering process corresponding to the function command sequence executed by the software under test.
[0060] Timing parameters refer to configuration data used to describe the timing characteristics of user operations, including interval fluctuation range parameters and operation triggering rule information. The interval fluctuation range parameter defines the variable range of time delay between operation commands, while the operation triggering rule information specifies the triggering order and dependencies of the operation commands. Dynamic refactoring refers to the process of adjusting the sequence of functional commands by introducing time offsets and sequence optimizations to make it closer to the randomness and logic of real user behavior. The timing test instruction set is the set of instructions generated after refactoring, simulating the timing characteristics of real user operations, and is used to drive the software under test to execute animation rendering.
[0061] First, a set of time interval values is extracted based on the time interval sequence of user interaction operations. The maximum and minimum values are calculated to determine the interval fluctuation range parameter. Simultaneously, the logical order of operations is analyzed from the operation sequence to deduce the operation triggering dependencies and obtain operation triggering rule information. Next, a time offset is assigned to each operation instruction in the function command sequence. This offset is randomly generated within the interval fluctuation range parameter, forming time-delayed operation command data. Then, the triggering order of operation instructions in the time-delayed operation command data is adjusted according to the operation triggering rule information to ensure that the interval and order of adjacent instructions satisfy the dependency relationship. Finally, all adjusted instructions are integrated to generate a timing test instruction set. In implementation, a random number generation algorithm is used to allocate time offsets, and a logical analysis algorithm is used to determine the operation order, ensuring that the instruction set can realistically simulate user behavior and trigger the animation rendering process of the software under test.
[0062] S130: Establish a timing mapping relationship between the timing test instruction set and the animation sequence frame data based on the timestamp. Based on the timing mapping relationship, calculate the displacement components between consecutive animation sequence frames in the animation sequence frame data, and generate motion vector data including displacement vector sequences.
[0063] Timing mapping refers to the matching and association between the trigger time of each test instruction in the timing test instruction set and the timestamp of the animation sequence frame data, used to identify the corresponding subset of frame sequences that trigger the animation effect. Displacement components represent the changes in the horizontal and vertical positions of the target control between consecutive animation sequence frames, calculated using pixel coordinate differences. A displacement vector sequence is a sequence composed of the displacement components of each consecutive frame pair in chronological order; each vector contains both horizontal and vertical changes. Motion vector data is a data structure that integrates displacement vector sequences, describing the changes in the motion state of the target control during the animation process.
[0064] First, by matching timestamps, the trigger time of each test instruction in the timing test instruction set is aligned with the timestamp of the animation sequence frame data. A corresponding subset of animation sequence frames is assigned to each instruction, establishing a timing mapping relationship. The trigger time is obtained from the timing test instruction set, and the timestamp is extracted from the animation sequence frame data. Next, based on the timing mapping relationship, frame difference calculation technology is used to process each frame of the animation sequence frame subset corresponding to each instruction: for consecutive animation sequence frames, the motion trajectory coordinates of the target control are read, and the change in horizontal position between adjacent frames is calculated as the horizontal displacement component, and the change in vertical position is calculated as the vertical displacement component. The change in horizontal position is obtained by subtracting the horizontal coordinate of the previous frame from the current frame's horizontal coordinate, and the change in vertical position is obtained by subtracting the vertical coordinate of the previous frame from the current frame's vertical coordinate. Finally, the displacement components of each consecutive frame pair are combined into a displacement vector in chronological order, generating motion vector data composed of a displacement vector sequence.
[0065] S140: Based on the displacement vector sequence of the target control in the motion vector data, generate the actual motion trajectory curve, and compare the coordinate deviation of the actual motion trajectory curve with the preset expected motion trajectory curve to obtain the deviation data.
[0066] The actual motion trajectory curve is the motion path curve of the target control generated by the integral displacement vector sequence, formed by connecting the actual position coordinates of consecutive time points. The expected motion trajectory curve is a preset ideal motion path curve, reflecting the expected coordinate change pattern of the animation effect. Coordinate deviation comparison is the process of calculating the positional difference between the actual motion trajectory curve and the expected motion trajectory curve at the same time point. The deviation data is a sequence composed of the positional deviation values at each time point, quantifying the degree of deviation between the actual motion trajectory and the expected trajectory.
[0067] First, the displacement vector sequence of the target control is extracted from the motion vector data, separating the horizontal displacement component sequence and the vertical displacement component sequence. Next, the horizontal displacement component sequence is accumulated sequentially over time to generate the horizontal coordinate sequence of the target control; similarly, the vertical displacement component sequence is accumulated to generate the vertical coordinate sequence. Each value in the horizontal coordinate sequence is obtained by adding the initial horizontal coordinate to the sum of all preceding horizontal displacement components; the vertical coordinate sequence is generated similarly. Then, the horizontal and vertical coordinate values at the same time point are combined to form the actual motion trajectory coordinate points. All coordinate points are connected sequentially over time to form the actual motion trajectory curve, and linear interpolation is used to ensure curve continuity. Finally, the corresponding coordinate points of the actual motion trajectory curve and the expected motion trajectory curve are matched at each time point. The horizontal and vertical distance differences between each pair of coordinate points are calculated, and the position deviation value is synthesized using the Euclidean distance formula to obtain the deviation data sequence.
[0068] S150: Based on the timestamp of the animation sequence frame corresponding to the deviation data, mark the abnormal time period in the animation sequence frame data that does not meet the preset continuity evaluation conditions, and use the preset change threshold to determine the target abnormal time period in the abnormal time period, and generate a test report including the target abnormal time period and quantification parameters.
[0069] An abnormal time period refers to an animation time segment in the deviation data where the positional deviation value at consecutive time points exceeds a preset positional deviation threshold, reflecting a potential range of animation continuity distortion. The target abnormal time period is a key abnormal sub-segment further filtered out within the abnormal time period through displacement change difference analysis, where the degree of displacement abrupt change exceeds a preset change threshold. Quantitative parameters include timestamp range, duration, and average deviation value. The test report is an output document that integrates the target abnormal time period information and quantitative parameters.
[0070] First, based on the deviation data sequence, intervals where the positional deviation value at consecutive time points exceeds a preset positional deviation threshold are detected and marked as abnormal time periods. The preset positional deviation threshold is pre-set according to the animation smoothness requirements. Next, the displacement change difference of motion vector data is extracted within the abnormal time period: the magnitude change of displacement vectors at adjacent time points is calculated, i.e., the Euclidean distance difference between the displacement vectors of the current frame and the previous frame. If the displacement change difference exceeds a preset change threshold, the segment is determined to have a sudden abnormality and is marked as a target abnormal time period. The preset change threshold is set according to the animation smoothness requirements. Finally, for each target abnormal time period, its start / end timestamps, the duration corresponding to the number of frames, and the average value of the positional deviation value are calculated to generate a quantization parameter set, which is then integrated to obtain a test report.
[0071] This embodiment simulates the rhythm of real user operations by dynamically reconstructing the timing test instruction set, effectively triggering the animation rendering process of the software under test in interactive scenarios, thus solving the problem that traditional static screenshot methods cannot capture timing anomalies. It generates actual motion trajectory curves by accumulating displacement components and compares them point-by-point with the expected trajectory, accurately quantifying the accumulated error of the motion path and overcoming the limitation of coordinate trajectory detection technology in missing continuity defects. Combining timing mapping relationships and dual anomaly judgment rules, it achieves collaborative verification from animation timing distortion to spatial trajectory deviation, significantly improving the accuracy of locating abnormal time periods. Ultimately, while ensuring the accuracy of animation rendering timing and the naturalness of motion trajectories, it provides interactive software with a test report that truly reflects the dynamic user experience.
[0072] In one feasible implementation, before calculating the displacement components between consecutive animation sequence frames in the animation sequence frame data based on the temporal mapping relationship in step S130 and generating displacement vector data, the method further includes:
[0073] The average delay offset is calculated based on the timestamps of user interaction operations and the timestamps of the corresponding animation sequence frames.
[0074] The timestamp of a user interaction operation refers to the precise time point at which the automated tool records the user's action. The timestamp of the corresponding animation sequence frame refers to the timestamp of the frame rendered by the software under test. First, the set of timestamps for the user interaction operations and the set of timestamps for the first frame of the animation that triggered them are extracted. For each operation command, the difference between its timestamp and the timestamp of the first frame of the corresponding subset of animation sequence frames is calculated to obtain the single-action delay offset. An arithmetic mean algorithm is used to calculate the average of all single-action delay offsets, i.e., the sum of all single-action delay offsets divided by the number of operation commands. Finally, the average delay offset value is output for subsequent timing correction.
[0075] Timing mapping is corrected by linear interpolation based on the average delay offset.
[0076] The average delay offset is the arithmetic mean of the differences between the user's operation timestamp and the timestamp of the first frame triggering the animation, reflecting the overall latency level of the system's response. Linear interpolation correction is a mathematical method that adjusts the time coordinates in the timing mapping relationship proportionally based on the average delay offset. The average delay offset is used as the baseline correction value. Using the original time coordinate data in the timing mapping relationship, the trigger time of each test instruction is subtracted from the average delay offset to obtain the corrected trigger time. The same offset is synchronously subtracted from the timestamps of the animation sequence frames. Boundary frames are processed using a linear interpolation algorithm to ensure a continuous and smooth timeline. Finally, a corrected timing mapping relationship table that eliminates system latency is generated.
[0077] For example, in a mobile phone photo album image swiping browsing scenario, the average delay offset is first calculated. The timestamps of the user's three swipe operations are T1, T2, and T3, respectively, and the timestamps of the first frame triggering the animation are F1, F2, and F3, respectively. The delay difference is: ΔT1 = F1 - T1 = 30ms, ΔT2 = F2 - T2 = 35ms, and ΔT3 = F3 - T3 = 25ms. The average delay offset is (30 + 35 + 25) / 3 = 30ms. Then, the timing mapping is corrected. The original instruction 1 trigger time T1 = 100ms, corrected to 70ms; the original animation first frame time F1 = 130ms, corrected to 100ms. Boundary frames are aligned using linear interpolation, such as allocating coordinates to the 1.5 frame according to time weights. Finally, the corrected timing mapping ensures that the instruction trigger time of 70ms precisely corresponds to the animation frame of 100ms, eliminating system latency.
[0078] This embodiment eliminates timing baseline errors caused by system response delays by calculating the average delay offset between user interaction operations and animation sequence frames. It uses linear interpolation to dynamically correct the timing mapping relationship, compensating for time drift in animation rendering under different operation commands, ensuring strict alignment between the test command trigger moment and the animation frame rendering moment. This solves the problem of animation frame range matching errors caused by timing inaccuracies, ensuring the timing consistency of subsequent displacement component calculations. Ultimately, it significantly improves the reliability of timing anomaly detection such as animation stuttering and frame loss, allowing test results to truly reflect dynamic continuity defects in interactive scenarios.
[0079] In one feasible implementation, the timing parameters include interval fluctuation range parameters and operation triggering rule information, and the method further includes:
[0080] Extract a set of time interval values from the time interval sequence of user interaction operations. The set of time interval values is a dataset of independent time differences extracted from the sequence, used to quantify the operation interval characteristics.
[0081] The algorithm iterates through each element in the time interval sequence of user interactions, removes duplicate values, and stores the results as a set data structure. A data deduplication algorithm is used to process the original sequence, ensuring that each time interval value in the set is unique. The final output set of time interval values serves as the basis for calculating the interval fluctuation range parameter.
[0082] The interval fluctuation range parameter is determined based on the maximum and minimum time interval values of the time interval value set. The interval fluctuation range parameter is a closed interval defined by the minimum and maximum values, representing the allowable time delay range between operation commands.
[0083] The maximum and minimum values in the time interval value set are determined using an extreme value search algorithm. The minimum value is used as the lower limit of the interval, and the maximum value is used as the upper limit of the interval to generate an interval fluctuation range parameter. This parameter is used to constrain the range of time offset generation in subsequent instruction reconstruction.
[0084] Based on the logical order of operations in the sequence of user interaction operations, the operation triggering dependencies are determined, and the operation triggering rule information is obtained.
[0085] Operation sequence describes the execution order of user operation commands. Operation logical order refers to the causal relationship between operations, such as a swipe operation needing to be triggered after a click operation. Operation trigger dependency is the sequential constraint between operation commands, such as operation B must be executed after operation A is completed. Operation trigger rule information is a formalized description of dependencies used to guide adjustments to the command triggering order.
[0086] By analyzing the association patterns between instruction types and triggering order in the operation sequence, dependencies are identified using logical reasoning algorithms: if the input of operation B depends on the output of operation A, a triggering dependency from A to B is established. Finally, these dependencies are encoded into structured rules, such as directed graphs or conditional statements, generating operation triggering rule information.
[0087] For example, in a mobile phone photo album image swiping browsing scenario, firstly, the set of time interval values is extracted. The time interval sequence includes a 200ms interval between instructions 1-2 and a 180ms interval between instructions 2-3. After deduplication, the set {200, 180} is obtained. Next, the interval fluctuation range parameter is determined. The maximum value of the set is 200ms, and the minimum value is 180ms. The interval fluctuation range parameter is set to the interval between 180ms and 200ms. Finally, operation triggering rule information is generated. The three leftward swipes in the operation sequence are analyzed, and the triggering dependency is determined to be that the subsequent swipe must start after the previous swipe has ended. This forms the rule: the triggering time of swipe instruction n+1 must be later than the ending time of swipe instruction n.
[0088] This embodiment determines the interval fluctuation range parameter by extracting the set of time interval values of user interaction operations, enabling the test instruction set to simulate the temporal randomness of real operations. Combined with the parsing of operation sequence dependencies to generate operation trigger rules, it ensures the logical integrity of multi-step operations. These two elements work together to reconstruct test instructions that conform to human behavioral characteristics, solving the problem that traditional fixed-sequence testing cannot cover the rhythm of real interactions. Ultimately, this significantly improves the detection rate of animation timing anomalies, allowing test results to accurately reflect user experience defects in dynamic scenarios.
[0089] In one feasible implementation, step S120: dynamically reconstructing the functional command sequence using timing parameters to generate a timing test instruction set simulating real user operation behavior, including:
[0090] Time offsets are assigned to each operation instruction in the function command sequence to obtain time-delayed operation command data. The time offsets are randomly generated within the interval fluctuation range parameter of the timing parameters.
[0091] The time offset is a randomly generated delay value within the interval fluctuation range of the timing parameters, used to simulate the time fluctuation characteristics of real user operations. The time-delayed operation command data is an intermediate instruction dataset generated after adjusting the function command sequence with the time offset, and each operation instruction is appended with a random delay parameter.
[0092] Each operation instruction in the function command sequence is traversed, and a time offset is generated within the interval defined by the interval fluctuation range parameter using a random number generation algorithm. For example, a uniform distribution algorithm is used to generate a random value, which is then appended to the trigger time parameter of the operation instruction to form a new instruction with a random delay. Finally, all delayed instructions are integrated to generate time-delayed operation command data.
[0093] Based on the operation triggering rule information of the timing parameters, adjust the triggering order of operation instructions in the time delay operation command data to obtain a timing test instruction set in which the triggering interval of adjacent operation instructions satisfies the operation triggering dependency relationship in the operation triggering rule information.
[0094] Trigger order adjustment refers to rearranging the execution order of instructions according to rules to ensure that the intervals between adjacent instructions satisfy the operation triggering dependency relationship. The timing test instruction set is the final set of instructions that conforms to the characteristics of real user behavior.
[0095] First, extract operation trigger dependencies from the operation trigger rule information, such as directed graphs or conditional constraints. Then, traverse the time-delay operation command data, checking whether the trigger intervals of adjacent instructions violate the operation trigger dependency rules. If conflicts exist, use an instruction reordering algorithm to adjust the trigger times, for example, by using a sliding time window technique to ensure that the trigger time of a later instruction is later than the end time of the previous instruction. Finally, output a timing test instruction set that satisfies all dependencies.
[0096] For example, in a mobile phone photo album image swiping browsing scenario, the function command sequence includes three swiping operations: Command 1, Command 2, and Command 3. First, a random time offset is assigned to each command: within an interval fluctuation range of 180ms to 200ms, Command 1 offset +5ms, Command 2 offset -3ms, and Command 3 offset +8ms are generated, forming time-delayed operation command data. Next, according to the operation triggering rule information requiring that the subsequent swipe must be triggered after the previous swipe ends, it is detected that the original trigger time of Command 2 is earlier than the end time of Command 1. Therefore, the trigger time of Command 2 is delayed to 10ms after the end time of Command 1, and Command 3 is adjusted similarly. The final generated timing test command set satisfies the continuous dependency relationship of the swiping operations.
[0097] In one feasible implementation, step S130: Establishing a timing mapping relationship between the timing test instruction set and the animation sequence frame data based on timestamps; calculating the displacement components between consecutive animation sequence frames in the animation sequence frame data based on the timing mapping relationship; and generating motion vector data including a displacement vector sequence, including:
[0098] The trigger time of each test instruction in the timing test instruction set is matched with the timestamp of the animation sequence frame data to establish a timing mapping relationship between the test instructions and the subset of animation sequence frames.
[0099] An animation sequence frame subset refers to a continuous sequence of animation frames triggered by a single test command, with boundaries determined by timestamp matching.
[0100] A time window matching algorithm is employed, using the trigger time of the test command as a baseline, to find the start and end frames with the closest timestamps in the animation sequence frame data. A time tolerance threshold is set, classifying all frames within a specific time range before and after the trigger time into a subset corresponding to that command. Finally, a structured mapping table is generated, recording the correspondence between each command and its corresponding subset of animation frames.
[0101] Based on the subset of animation sequence frames corresponding to each test instruction in the time-series mapping relationship, the horizontal and vertical position changes are calculated pixel by pixel for continuous animation sequence frames in the animation sequence frame data.
[0102] The horizontal position change is the difference in the horizontal coordinates of the target control between adjacent animation frames, and the vertical position change is the difference in the vertical coordinates. Pixel-by-pixel calculation refers to independently analyzing the coordinate changes of each pixel in the control's rendering area.
[0103] Iterate through a subset of frames in each animation sequence, processing consecutive frame pairs in chronological order. For each pair of adjacent frames, extract the pixel coordinate matrix of the target control in the preceding and following frames. A pixel-level difference algorithm is used to calculate the horizontal and vertical coordinate differences of each pixel in the matrix. If the control is deformed, feature point matching technology is used to align the pixels before calculating the displacement. Finally, the displacement component matrix for each pair of frames is output.
[0104] The horizontal and vertical position changes are combined in time sequence to form a pixel displacement vector sequence, generating motion vector data.
[0105] A pixel displacement vector is a two-dimensional vector consisting of horizontal and vertical changes, which describes the displacement state of a single pixel.
[0106] The displacement component matrices of all consecutive frame pairs are integrated and sorted along the time axis. The displacement component matrix at each time point is then vectorized: the horizontal and vertical changes of each pixel are combined into independent vectors. Static pixel data is removed using a time-series compression algorithm, ultimately generating a sequence of pixel displacement vectors indexed by timestamps, constituting the motion vector data.
[0107] For example, in a mobile phone photo album image scrolling scenario, the timing test instruction set includes instruction 1 triggered at time T1. When establishing the timing mapping relationship, the animation frame timestamp range T1-10ms to T1+90ms is selected as a subset. Displacement components are calculated for consecutive frames within this subset: for example, the coordinate matrix A of frame 1 and the matrix B of frame 2 are differentially analyzed pixel by pixel to obtain the horizontal and vertical change matrices for all pixels. The horizontal change of -8 and the vertical change of 0 for frames 1-2 are combined into a vector, and the same vector is generated for frames 2-3. Finally, the motion vector data is output in chronological order, including timestamps and the corresponding vector sequence.
[0108] Figure 2 A flowchart illustrating a method for determining deviation data according to an embodiment of this application is shown. Figure 2 As shown, the method includes steps S210 to S240.
[0109] In one feasible implementation, step S140: Based on the displacement vector sequence of the target control in the motion vector data, generate the actual motion trajectory curve, and compare the coordinate deviation between the actual motion trajectory curve and the preset expected motion trajectory curve to obtain deviation data, including:
[0110] S210: Extract the horizontal displacement component sequence and the vertical displacement component sequence from the displacement vector sequence of the target control.
[0111] The horizontal displacement component sequence is a time-series set of all horizontal displacement values in the displacement vector sequence, and the vertical displacement component sequence is a time-series set of all vertical displacement values. Each displacement vector in the displacement vector sequence is traversed, and its horizontal and vertical components are separated. A data splitting algorithm is used to store the horizontal component values in chronological order as a horizontal displacement component sequence, and the vertical component values as a vertical displacement component sequence. Finally, two independent time-series datasets are output.
[0112] S220: Accumulate the component values of the horizontal displacement component sequence in chronological order to generate a horizontal coordinate sequence, and accumulate the component values of the vertical displacement component sequence to generate a vertical coordinate sequence.
[0113] The horizontal coordinate sequence is a set of coordinate values showing the horizontal position of the target control changing over time, generated by accumulating the horizontal displacement components. The vertical coordinate sequence is a set of vertical position coordinate values, generated by accumulating the vertical displacement components. Using the initial position coordinates as a reference, the horizontal displacement component sequence is summed: the horizontal coordinate at each time point equals the initial horizontal coordinate plus the sum of all horizontal displacement components before that time point. The vertical coordinate sequence is generated using the same method. An integral calculation algorithm is used to convert displacement to coordinates, ensuring position continuity.
[0114] S230: Combine the coordinate values of the same time point in the horizontal coordinate sequence and the vertical coordinate sequence into the actual motion trajectory coordinate points of the target control, and connect the actual motion trajectory coordinate points in time order to form the actual motion trajectory curve.
[0115] The actual motion trajectory coordinates are two-dimensional position points composed of horizontal and vertical coordinates. The actual motion trajectory curve is a continuous path curve formed by connecting coordinate points in time sequence, reflecting the motion trajectory of the target control.
[0116] Align the time axes of the horizontal and vertical coordinate sequences, pairing horizontal and vertical coordinate values with the same timestamp to generate coordinate points. A linear interpolation algorithm is used to supplement intermediate points between adjacent coordinate points, and all points are connected in chronological order to form a smooth curve. The final output is the actual motion trajectory curve describing the movement path of the target control.
[0117] S240: Match the coordinates of the actual motion trajectory curve with the corresponding coordinates of the expected motion trajectory curve in chronological order, calculate the horizontal distance difference and vertical distance difference of each pair of matched coordinates, and obtain the deviation data composed of the position deviation value of each time point.
[0118] The expected motion trajectory curve is a preset ideal motion path, generated through physics engine simulation or mathematical modeling based on animation design parameters. The position deviation value is the Euclidean distance between the actual coordinates and the expected coordinates at the same time point, and the deviation data is a sequence of position deviation values at all time points.
[0119] The coordinates of the actual trajectory curve and the expected trajectory curve are aligned using timestamps as indices. For each pair of matching points, the horizontal and vertical distance differences are calculated, and the positional deviation value is synthesized using the Euclidean distance formula. Finally, a deviation data sequence arranged in chronological order is generated, quantifying the degree of trajectory deviation.
[0120] For example, in a mobile phone photo album image scrolling scenario, the displacement vector sequence is extracted from the motion vector data: vectors - and 0 for frames 1-2, and -8 and 0 for frames 2-3. The horizontal displacement component sequence -8 and -8, and the vertical displacement component sequence 0 and 0 are separated. Using the initial coordinates 100x200 as a reference, the horizontal coordinate sequence 100, 92, 84 and the vertical coordinate sequence 200, 200, 200 are accumulated. The coordinate points are combined to form the actual motion trajectory curve: time point 1 coordinates 100, 200; time point 2 coordinates 92, 200; time point 3 coordinates 84, 200. The expected trajectory curve generates the coordinate sequence 98, 200, 90, 00, 82, 200 based on a uniform sliding model. The deviation is calculated: a deviation value of 2 pixels for time point 1 and 2 pixels for time point 2, generating a deviation data sequence.
[0121] Figure 3 A flowchart illustrating a method for generating a software test report according to an embodiment of this application is shown. Figure 3 As shown, the method includes steps S210 to S240.
[0122] In one feasible implementation, step S150: Based on the timestamps of the animation sequence frames corresponding to the deviation data, mark the abnormal time periods in the animation sequence frame data that do not meet the preset continuity evaluation conditions, and use a preset change threshold to determine the target abnormal time period within the abnormal time period, generating a test report including the target abnormal time period and quantification parameters, including:
[0123] S310: The time period in which the position deviation value of consecutive time points in the deviation data is greater than the preset position deviation threshold is regarded as the abnormal time period.
[0124] The preset position deviation threshold is the maximum allowable position deviation value pre-set according to animation smoothness requirements. The deviation data sequence is traversed to detect whether the position deviation values at consecutive time points exceed the preset position deviation threshold. A sliding window detection algorithm is used to identify consecutive exceeding intervals: when all data points within a window exceed the threshold, that time window is marked as an abnormal time period. The preset position deviation threshold is set according to animation smoothness standards and is used for preliminary screening of animation segments that may have continuity issues.
[0125] S320: Extract the displacement change difference of motion vector data between adjacent time points within the abnormal time period, and determine the sub-time period in the abnormal time period where the displacement change difference is greater than the preset change threshold to obtain the target abnormal time period.
[0126] The displacement variation difference refers to the change in the Euclidean distance between displacement vectors at adjacent time points, characterizing the degree of abrupt change in animation motion. The preset variation threshold is set based on the animation acceleration tolerance.
[0127] Motion vector data is extracted within the abnormal time period, and the magnitude change of displacement vectors at adjacent time points is calculated. A mutation detection algorithm is employed: for each time point, the Euclidean distance difference between the current frame and the previous frame's displacement vector is calculated. If this difference exceeds a preset change threshold, it is marked as a mutation point. The interval formed by consecutive mutation points constitutes the target abnormal time period, used to locate severe anomalies such as animation stuttering or frame skipping.
[0128] S330: Calculate the duration and average positional deviation of the target abnormal time period, generate a set of quantized parameters including timestamp range, duration and average deviation, and obtain a test report including the target abnormal time period and the set of quantized parameters.
[0129] The quantitative parameter set is a set of numerical values that describe the characteristics of the target abnormal time period, including indicators such as timestamp range, duration, and average deviation value.
[0130] For each target anomaly time period, its start and end timestamps are calculated, and the frame count is converted into a time length. The arithmetic mean of all positional deviation values within this time period is calculated. A report generation algorithm is used to integrate the timestamp range, duration, and average deviation value to form a quantization parameter set, and finally, a structured test report is output.
[0131] For example, in a mobile phone photo album image scrolling scenario, the deviation data sequence shows a position deviation value of 3.5 pixels in frame 5, 3.8 pixels in frame 6, 4.2 pixels in frame 7, and 4.0 pixels in frame 8. The preset position deviation threshold is 3 pixels. Therefore, four consecutive frames exceeding the threshold are marked as an abnormal time period, corresponding to timestamps T5 to T8. Motion vector data is extracted within this abnormal time period: the displacement vector in frame 5 is -8 and 0 (horizontal -8 pixels, vertical 0 pixels), and the displacement vector in frame 6 is -1 and 0 (horizontal -1 pixel, vertical 0 pixels). The difference in displacement between adjacent frames is calculated using Euclidean distance, resulting in a value of 7 pixels. Since 7 pixels exceeds the preset change threshold of 5 pixels, frames 5-6 are identified as the target abnormal time period, corresponding to timestamps T5 to T6. The start timetamp of this time period is calculated as T5 = 500ms, the end timetamp as T6 = 566ms, and the duration as 66ms; the average position deviation value is (3.5 + 3.8) / 2 = 3.65 pixels. The final test report includes a set of quantization parameters for the target abnormal time period T5-T6, duration 66ms, and average deviation 3.65 pixels, such as "Abnormal segment: 500ms-566ms; duration 66ms; average offset 3.65 pixels".
[0132] Based on the same concept, embodiments of this application provide a software testing system, which will be described below in conjunction with... Figure 4 The software testing system provided in the embodiments of this application will be described in detail.
[0133] Figure 4 This is a structural block diagram of a software testing system shown in an embodiment of this application.
[0134] This system is suitable for verifying the continuity of interactive animation effects, such as... Figure 4 As shown, the system includes:
[0135] The acquisition module 410 is used to record user interaction operations to generate a sequence of function commands through automated tools, and simultaneously acquire the animation sequence frame data output by the software under test, as well as the time interval sequence and operation sequence of user interaction operations. The animation sequence frame data includes the timestamp of each animation sequence frame and the motion trajectory coordinates of the corresponding control.
[0136] The generation module 420 is used to dynamically reconstruct the functional command sequence using timing parameters to generate a timing test instruction set that simulates real user operation behavior. The timing parameters are determined by the time interval sequence and operation sequence of user interaction operations. The timing test instruction set is used to trigger the animation rendering process corresponding to the functional command sequence executed by the software under test.
[0137] The calculation module 430 is used to establish a time-series mapping relationship between the timing test instruction set and the animation sequence frame data based on the timestamp, calculate the displacement components between consecutive animation sequence frames in the animation sequence frame data based on the time-series mapping relationship, and generate motion vector data including displacement vector sequences.
[0138] The comparison module 440 is used to generate the actual motion trajectory curve based on the displacement vector sequence of the target control in the motion vector data, and compare the actual motion trajectory curve with the preset expected motion trajectory curve to obtain the deviation data.
[0139] The generation module 420 is also used to mark abnormal time periods in the animation sequence frame data that do not meet the preset continuity evaluation conditions based on the timestamps of the animation sequence frames corresponding to the deviation data, and to determine the target abnormal time period in the abnormal time period using the preset change threshold, and generate a test report including the target abnormal time period and quantification parameters.
[0140] In one embodiment, the calculation module 430 is further configured to calculate the average delay offset based on the timestamp of the user interaction operation and the timestamp of the corresponding animation sequence frame before calculating the displacement components between consecutive animation sequence frames in the animation sequence frame data based on the time-series mapping relationship and generating displacement vector data; and to correct the time-series mapping relationship by linear interpolation based on the average delay offset.
[0141] In one embodiment, the timing parameters include interval fluctuation range parameters and operation triggering rule information. The generation module 420 is further configured to extract a set of time interval values from the time interval sequence of user interaction operations; determine the interval fluctuation range parameters based on the maximum and minimum time interval values of the time interval value set; and determine the operation triggering dependency based on the operation logical order in the operation sequence of user interaction operations to obtain the operation triggering rule information.
[0142] In one embodiment, the generation module 420 is specifically used to assign a time offset to each operation instruction in the function command sequence to obtain time-delayed operation command data. The time offset is randomly generated within the interval fluctuation range parameter of the timing parameter. The triggering order of the operation instructions in the time-delayed operation command data is adjusted according to the operation triggering rule information of the timing parameter to obtain a timing test instruction set in which the triggering interval of adjacent operation instructions satisfies the operation triggering dependency relationship in the operation triggering rule information.
[0143] In one embodiment, the calculation module 430 is specifically used to match the trigger time of each test instruction in the timing test instruction set with the timestamp of the animation sequence frame data to establish a timing mapping relationship between the test instructions and the subset of animation sequence frames; based on the subset of animation sequence frames corresponding to each test instruction in the timing mapping relationship, to calculate the horizontal position change and vertical position change of each pixel in the continuous animation sequence frames in the animation sequence frame data; and to combine the horizontal position change and vertical position change in time order into a pixel displacement vector sequence to generate motion vector data.
[0144] In one embodiment, the comparison module 440 is specifically used to extract the horizontal displacement component sequence and the vertical displacement component sequence from the displacement vector sequence of the target control; accumulate the component values of the horizontal displacement component sequence in time order to generate a horizontal coordinate sequence, and accumulate the component values of the vertical displacement component sequence to generate a vertical coordinate sequence; combine the coordinate values of the same time point in the horizontal coordinate sequence and the vertical coordinate sequence to form the actual motion trajectory coordinate points of the target control, and connect the actual motion trajectory coordinate points in time order to form the actual motion trajectory curve; match the coordinate points of the actual motion trajectory curve with the corresponding coordinate points of the expected motion trajectory curve in time order, calculate the horizontal distance difference and the vertical distance difference of each pair of matched coordinate points, and obtain the deviation data composed of the position deviation value of each time point.
[0145] In one embodiment, the generation module 420 is specifically used to define the time period in the deviation data where the position deviation value of consecutive time points is greater than a preset position deviation threshold as an abnormal time period; extract the displacement change difference of the motion vector data of adjacent time points within the abnormal time period, determine the sub-time period in the abnormal time period where the displacement change difference is greater than a preset change threshold to obtain the target abnormal time period; calculate the duration and average position deviation value of the target abnormal time period, generate a set of quantized parameters including timestamp range, duration and average deviation value, and obtain a test report including the target abnormal time period and the set of quantized parameters.
[0146] Figure 4 Each module in the system shown has an implementation Figures 1 to 3 The functions of each step in the process and their corresponding technical effects are described in detail here for the sake of brevity.
[0147] Figure 5 A schematic diagram of the hardware structure of an electronic device provided in one embodiment of this application is shown.
[0148] The electronic device may include a processor 510 and a memory 520 storing computer program instructions.
[0149] Specifically, the processor 510 may include a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this application.
[0150] Memory 520 may include mass storage for data or instructions. For example, and not limitingly, memory 520 may include a hard disk drive (HDD), floppy disk drive, flash memory, optical disk, magneto-optical disk, magnetic tape, or Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, memory 520 may include removable or non-removable (or fixed) media. Where appropriate, memory 520 may be internal or external to the integrated gateway disaster recovery device. In a particular embodiment, memory 520 is non-volatile solid-state memory.
[0151] Memory may include read-only memory (ROM), random access memory (RAM), disk storage media devices, optical storage media devices, flash memory devices, and electrical, optical, or other physical / tangible memory storage devices. Therefore, typically, memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to the first aspect of this disclosure.
[0152] The processor 510 implements any of the software testing methods described in the above embodiments by reading and executing computer program instructions stored in the memory 520.
[0153] In one example, the electronic device may also include a communication interface 530 and a bus 540. Wherein, such as Figure 5 As shown, the processor 510, memory 520, and communication interface 530 are connected through bus 540 and complete communication with each other.
[0154] The communication interface 530 is mainly used to realize communication between various modules, devices, units and / or equipment in the embodiments of this application.
[0155] Bus 540 includes hardware, software, or both, that couples components of an online data traffic metering device together. For example, and not limitingly, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an Infinite Bandwidth Interconnect, a Low Pin Count (LPC) bus, a memory bus, a Microchannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or other suitable buses, or combinations of two or more of these. Where appropriate, bus 540 may include one or more buses. Although specific buses are described and illustrated in embodiments of this application, this application contemplates any suitable bus or interconnect.
[0156] The electronic device can execute the software testing method in the embodiments of this application, thereby achieving the combination Figures 1 to 3 The software testing method described.
[0157] Furthermore, in conjunction with the software testing methods in the above embodiments, this application embodiment can provide a computer-readable storage medium for implementation. This computer-readable storage medium stores computer program instructions; when these computer program instructions are executed by a processor, they implement any of the software testing methods in the above embodiments.
[0158] It should be clarified that this application is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of this application is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of this application.
[0159] The functional blocks shown in the above-described structural diagram can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this application are programs or code segments used to perform the required tasks. Programs or code segments can be stored on a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried on a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, etc. Code segments can be downloaded via computer networks such as the Internet, intranets, etc.
[0160] It should also be noted that the exemplary embodiments mentioned in this application describe methods or systems based on a series of steps or apparatus. However, this application is not limited to the order of the above steps; that is, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.
[0161] The aspects of this application have been described above with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It should be understood that each block in the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that these instructions, executable via the processor of the computer or other programmable data processing apparatus, enable the implementation of the functions / actions specified in one or more blocks of the flowchart illustrations and / or block diagrams. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field-programmable logic circuit. It is also understood that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can also be implemented by dedicated hardware performing the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.
[0162] The above description is merely a specific implementation of this application. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, modules, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. It should be understood that the protection scope of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the protection scope of this application.
Claims
1. A software testing method suitable for verifying the continuity of interactive animation effects, characterized in that, include: The system uses automated tools to record user interaction operations to generate function command sequences, and simultaneously acquires animation sequence frame data output by the software under test, as well as the time interval sequence and operation sequence of the user interaction operations. The animation sequence frame data includes the timestamp of each animation sequence frame and the motion trajectory coordinates of the corresponding control. The function command sequence is dynamically reconstructed using timing parameters to generate a timing test instruction set that simulates real user operation behavior. The timing parameters are determined based on the time interval sequence and operation sequence of the user interaction operation. The timing test instruction set is used to trigger the software under test to execute the animation rendering process corresponding to the function command sequence. Based on the timestamp, a timing mapping relationship is established between the timing test instruction set and the animation sequence frame data. Based on the timing mapping relationship, the displacement components between consecutive animation sequence frames in the animation sequence frame data are calculated to generate motion vector data including displacement vector sequences. Based on the displacement vector sequence of the target control in the motion vector data, an actual motion trajectory curve is generated, and the coordinate deviation of the actual motion trajectory curve is compared with the preset expected motion trajectory curve to obtain deviation data. Based on the timestamps of the animation sequence frames corresponding to the deviation data, the abnormal time periods in the animation sequence frame data that do not meet the preset continuity evaluation conditions are marked, and the target abnormal time period is determined in the abnormal time period using the preset change threshold, and a test report including the target abnormal time period and quantification parameters is generated.
2. The method according to claim 1, characterized in that, Before calculating the displacement components between consecutive animation sequence frames in the animation sequence frame data based on the temporal mapping relationship and generating displacement vector data, the method further includes: Calculate the average delay offset based on the timestamps of user interaction operations and the timestamps of the corresponding animation sequence frames; The timing mapping relationship is corrected by linear interpolation based on the average delay offset.
3. The method according to claim 1, characterized in that, The timing parameters include interval fluctuation range parameters and operation triggering rule information; the method further includes: Extract the time interval value set from the time interval sequence of the user interaction operation; The interval fluctuation range parameter is determined based on the maximum and minimum time interval values of the set of time interval values; Based on the logical order of operations in the sequence of user interaction operations, the operation triggering dependency is determined, and the operation triggering rule information is obtained.
4. The method according to claim 3, characterized in that, The step of dynamically reconstructing the functional command sequence using timing parameters to generate a timing test instruction set simulating real user operation behavior includes: A time offset is assigned to each operation instruction in the function command sequence to obtain time-delayed operation command data, wherein the time offset is randomly generated within the interval fluctuation range parameter of the timing parameter; The timing test instruction set is obtained by adjusting the triggering order of the operation instructions in the time delay operation command data according to the operation triggering rule information of the timing parameters, so that the triggering interval of adjacent operation instructions satisfies the operation triggering dependency relationship in the operation triggering rule information.
5. The method according to claim 1, characterized in that, The process involves establishing a temporal mapping relationship between the timing test instruction set and the animation sequence frame data based on the timestamp, calculating the displacement components between consecutive animation sequence frames in the animation sequence frame data based on the temporal mapping relationship, and generating motion vector data including a displacement vector sequence, including: The trigger time of each test instruction in the timing test instruction set is matched with the timestamp of the animation sequence frame data to establish the timing mapping relationship between the test instruction and the subset of animation sequence frames; Based on the subset of animation sequence frames corresponding to each test instruction in the time-series mapping relationship, the horizontal and vertical position changes are calculated pixel by pixel for the continuous animation sequence frames in the animation sequence frame data. The horizontal position change and the vertical position change are combined in time sequence to form a pixel displacement vector sequence, thereby generating the motion vector data.
6. The method according to claim 1, characterized in that, The actual motion trajectory curve is generated based on the displacement vector sequence of the target control in the motion vector data, and the coordinate deviation of the actual motion trajectory curve is compared with the preset expected motion trajectory curve to obtain deviation data, including: From the displacement vector sequence of the target control, extract the horizontal displacement component sequence and the vertical displacement component sequence; The horizontal coordinate sequence is generated by accumulating the component values of the horizontal displacement component sequence in chronological order, and the vertical coordinate sequence is generated by accumulating the component values of the vertical displacement component sequence. The coordinate values of the same time point in the horizontal coordinate sequence and the vertical coordinate sequence are combined to form the actual motion trajectory coordinate points of the target control, and the actual motion trajectory coordinate points are connected in chronological order to form the actual motion trajectory curve. The coordinates of the actual motion trajectory curve are matched with the corresponding coordinates of the expected motion trajectory curve in chronological order. The horizontal distance difference and vertical distance difference of each pair of matched coordinates are calculated to obtain the deviation data composed of the position deviation value of each time point.
7. The method according to claim 1, characterized in that, The process involves marking abnormal time periods in the animation sequence frame data that do not meet the preset continuity evaluation conditions based on the timestamps of the corresponding animation sequence frames of the deviation data, determining the target abnormal time period within the abnormal time period using a preset change threshold, and generating a test report including the target abnormal time period and quantification parameters, including: The time period in which the positional deviation value of consecutive time points in the deviation data is greater than a preset positional deviation threshold is defined as the abnormal time period. Extract the displacement change difference of the motion vector data at adjacent time points within the abnormal time period, and determine the sub-time period in the abnormal time period where the displacement change difference is greater than a preset change threshold to obtain the target abnormal time period; Calculate the duration and average positional deviation of the target abnormal time period, generate a set of quantized parameters including timestamp range, duration and average deviation, and obtain a test report including the target abnormal time period and the set of quantized parameters.
8. A software testing system suitable for verifying the continuity of interactive animation effects, characterized in that, The system includes: The acquisition module is used to record user interaction operations to generate a sequence of function commands through automated tools, and simultaneously acquire the animation sequence frame data output by the software under test, as well as the time interval sequence and operation sequence of the user interaction operations. The animation sequence frame data includes the timestamp of each animation sequence frame and the motion trajectory coordinates of the corresponding control. The generation module is used to dynamically reconstruct the functional command sequence using timing parameters to generate a timing test instruction set that simulates real user operation behavior. The timing parameters are determined by the time interval sequence and operation sequence of the user interaction operation. The timing test instruction set is used to trigger the software under test to execute the animation rendering process corresponding to the functional command sequence. The calculation module is used to establish a temporal mapping relationship between the timing test instruction set and the animation sequence frame data based on the timestamp, calculate the displacement components between consecutive animation sequence frames in the animation sequence frame data based on the temporal mapping relationship, and generate motion vector data including displacement vector sequences. The comparison module is used to generate an actual motion trajectory curve based on the displacement vector sequence of the target control in the motion vector data, and compare the actual motion trajectory curve with the preset expected motion trajectory curve to obtain deviation data. The generation module is also used to mark abnormal time periods in the animation sequence frame data that do not meet the preset continuity evaluation conditions based on the timestamps of the animation sequence frames corresponding to the deviation data, and to determine the target abnormal time period in the abnormal time period using a preset change threshold, and to generate a test report including the target abnormal time period and quantification parameters.
9. An electronic device, characterized in that, The device includes: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, it implements the software testing method as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer program instructions, which, when executed by a processor, implement the software testing method as described in any one of claims 1-7.