Regression testing method and device, storage medium and computer device
By automating the processing of tracking data sets from both new and old application versions, the problem of low efficiency in manual verification was solved, enabling efficient and reliable regression testing and ensuring the accuracy and coverage of data comparison.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUANGZHOU PINWEI SOFTWARE CO LTD
- Filing Date
- 2026-04-21
- Publication Date
- 2026-06-19
AI Technical Summary
In existing technologies, as business scenarios become more complex and the number of tracking points increases, manual verification becomes inefficient, has limited coverage, and is difficult to systematically distinguish between valid changes and noise interference, resulting in low efficiency and poor reliability of regression testing methods.
By receiving test instructions, determining test cases and new and old versions of the application, recording the data set of event tracking points, performing noise reduction and matching, generating regression test reports, and using automated intra-group data comparison to identify added, missing, or abnormal event tracking points.
It improves data comparability and analytical accuracy, overcomes time offset issues caused by network jitter or performance fluctuations, ensures semantic consistency of comparisons, reduces the degree of human intervention and the risk of errors and omissions, and improves testing efficiency and reliability.
Smart Images

Figure CN122240503A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of software testing technology, and in particular to a regression testing method, apparatus, storage medium, and computer equipment. Background Technology
[0002] As mobile applications become increasingly complex and iterate rapidly, regression verification of business event tracking data has become a crucial step in ensuring the reliability of data analysis. Current technologies typically rely on manual comparison for verification, where testers execute test cases for specific business scenarios and then compare the data generated by the new and old versions of the application during the same process to perform regression verification.
[0003] However, with the increasing complexity of business scenarios and the growing number of tracking points, manual verification becomes inefficient and has limited coverage. When tracking points experience time shifts due to network or performance fluctuations, or when parameter content changes unexpectedly, manual checks are prone to missing differences and struggle to systematically distinguish between valid changes and noise interference. Consequently, existing regression testing methods suffer from low efficiency and poor reliability. Summary of the Invention
[0004] The purpose of this application is to address at least one of the aforementioned technical shortcomings, particularly the low efficiency and limited coverage of manual verification in existing technologies due to the increasing complexity of business scenarios and the growing number of tracking points. When tracking points experience time shifts due to network or performance fluctuations, or when parameter content changes unexpectedly, manual checks are prone to missing differences and struggle to systematically distinguish between valid changes and noise interference. This results in the low efficiency and poor reliability of existing regression testing methods.
[0005] Firstly, this application provides a regression testing method, the method comprising:
[0006] When a test instruction is received, the test cases and the new and old versions of the application to be tested are determined according to the test instruction.
[0007] The test cases are executed in both the new version of the application and the old version of the application, and the first data set of the new version of the application and the second data set of the old version of the application are recorded during the execution of the test cases in both applications.
[0008] The first and second event tracking datasets are denoised, and the denoised datasets are matched with business keywords to obtain multiple event tracking data groups.
[0009] Perform intra-group data comparison for each data point group, and generate a regression test report based on the data comparison results.
[0010] In one embodiment, determining the test cases and the new and old versions of the application participating in the test according to the test instructions includes:
[0011] Parse the test instructions to extract the test scenario identifier, new version identifier, and old version identifier;
[0012] The corresponding test scenario is determined based on the test scenario identifier, and test cases associated with the test scenario are retrieved from the preset test case library;
[0013] The new version application and the old version application participating in the test are determined based on the new version identifier and the old version identifier, respectively.
[0014] In one embodiment, the step of executing the test cases in the new version application and the old version application, and recording the first data set of the new version application and the second data set of the old version application during the execution of the test cases in the new version application and the old version application, includes:
[0015] The test cases are executed in both the new version of the application and the old version of the application, and the embedded data is intercepted during the execution.
[0016] The data points intercepted in the new version of the application and the old version of the application are sorted according to the timestamp order.
[0017] A first event tracking dataset is generated based on the sorted event tracking data intercepted in the new version of the application, and a second event tracking dataset is generated based on the sorted event tracking data intercepted in the old version of the application.
[0018] In one embodiment, the noise reduction processing of the first and second event tracking datasets includes:
[0019] Identify the event tracking data when the user is not logged in in the first event tracking dataset and the second event tracking dataset, and remove the identified event tracking data from the first event tracking dataset and the second event tracking dataset;
[0020] After removing timestamp-related data from the first and second event tracking datasets, the first and second event tracking datasets are obtained after noise reduction.
[0021] In one embodiment, the matching of the first and second data sets after noise reduction based on business keywords yields multiple data sets, including:
[0022] Extract the key business fields from each data point in the first and second datasets after noise reduction;
[0023] The tracking data in the second tracking data set is traversed sequentially. The current time window is determined by the timestamp of the tracking data. Based on the key business fields of each tracking data, the tracking data is matched with the tracking data in the first tracking data set that are in the current time window to obtain a tracking data group including the tracking data.
[0024] In one embodiment, the step of performing intra-group data comparison on each data set and generating a regression test report based on the data comparison results includes:
[0025] For each data group, the new version of the data points and the old version of the data points within the group are compared one by one at the field level.
[0026] When inconsistencies in field content are detected, the difference information is recorded, and the comparison result of the data set is generated based on the recorded difference information when the comparison is completed.
[0027] The comparison results of all data sets are statistically analyzed to form a data comparison result. Based on the data comparison result, a regression test report is generated according to the data set dimensions.
[0028] In one embodiment, the method further includes:
[0029] Obtain the update logs of the new version of the application, and combine the update logs with the regression test report to determine the anomaly points of the new version of the application.
[0030] Secondly, this application provides a regression testing apparatus, the apparatus comprising:
[0031] The instruction receiving module is used to determine the test cases and the new and old versions of the application participating in the test based on the test instructions when a test instruction is received.
[0032] The event tracking module is used to execute the test cases in the new version application and the old version application, and to record the first event tracking dataset of the new version application and the second event tracking dataset of the old version application during the execution of the test cases in the new version application and the old version application.
[0033] The event tracking matching module is used to perform noise reduction processing on the first event tracking dataset and the second event tracking dataset, and to match the noise-reduced first event tracking dataset and the second event tracking dataset according to business keywords to obtain multiple event tracking data groups.
[0034] The data comparison module is used to compare data within each data point group and generate a regression test report based on the comparison results.
[0035] Thirdly, this application provides a storage medium storing computer-readable instructions that, when executed by one or more processors, cause the one or more processors to perform the steps of the regression testing method as described in any of the above embodiments.
[0036] Fourthly, this application provides a computer device, including: one or more processors, and a memory;
[0037] The memory stores computer-readable instructions, and when the one or more processors execute the computer-readable instructions, they perform the steps of the regression testing method as described in any of the above embodiments.
[0038] As can be seen from the above technical solutions, the embodiments of this application have the following advantages:
[0039] The regression testing method, apparatus, storage medium, and computer equipment provided in this application, upon receiving test instructions, determine the test cases and the new and old versions of the application participating in the test, and record the event tracking data sets of the new and old versions of the application respectively during the execution of the test cases. By denoising these datasets, non-business interference factors are effectively removed, allowing data comparison to focus on real business behavior, thus improving data comparability and analytical accuracy. Subsequently, based on business keywords, the new and old versions of the event tracking datasets are precisely aligned according to the same business events, overcoming the time offset problem caused by network jitter or performance fluctuations, and ensuring semantic consistency of the comparison. Finally, through automated intra-group data comparison and difference report generation, it is possible to quickly identify cases of added, missing, or abnormal event tracking. This significantly reduces the degree of manual intervention and the risk of error omissions while ensuring coverage, not only improving testing efficiency but also enhancing the reliability of test results. Attached Figure Description
[0040] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0041] Figure 1 A flowchart illustrating a regression testing method provided in an embodiment of this application;
[0042] Figure 2 This is a schematic diagram of the structure of a regression testing device provided in an embodiment of this application;
[0043] Figure 3 This is an internal structural diagram of a computer device provided in an embodiment of this application. Detailed Implementation
[0044] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0045] In one embodiment, this application provides a regression testing method. The following embodiments illustrate the application of this method to a testing platform, hereinafter referred to as the platform. It is understood that the platform can be deployed in a computer device to execute the regression testing method provided in this application.
[0046] like Figure 1 As shown, this application provides a regression testing method, the method comprising:
[0047] S101: When a test instruction is received, determine the test cases and the new and old versions of the application to be tested according to the test instruction.
[0048] Test cases refer to a set of input data, operation steps, tracking information, and expected results designed to verify whether an application functions correctly in a specific scenario. A new version of the application refers to a version of the application that has been developed and updated. An older version of the application refers to a version of the application released before the new version.
[0049] In this step, when testers need to perform regression testing on a new version of the application, they can send a test command to the testing platform. Upon receiving the test command, the testing platform determines the specific test cases and the new and old versions of the application to be tested based on its content. For example, in testing an e-commerce app, the test command might specify the scenario to be tested as "searching for products and adding them to the cart." The test cases would then include a series of specific steps, such as entering keywords to search for products, selecting products, and clicking "add to cart." Simultaneously, the platform automatically identifies and loads both the newly developed new version of the application and the previously released older version for comparative testing.
[0050] S102: Execute test cases in both the new and old versions of the application, and record the first data set of the new version and the second data set of the old version during the execution of test cases.
[0051] The first data set refers to the collection of data points collected and summarized during the execution of test cases in the new version of the application. The second data set refers to the collection of data points collected and summarized during the execution of test cases in the old version of the application. Both the first and second data sets contain multiple data points, and each data point includes at least business keywords, timestamps, and structured parameter information related to business behavior.
[0052] In this step, after obtaining the test cases and the old and new versions of the application, the platform controls both applications to execute the same sequence of operations, i.e., the test cases, in their respective test environments. Then, the event tracking data reported internally by the application can be captured in real time through an event tracking agent or log interception mechanism, resulting in the first event tracking dataset and the second event tracking dataset.
[0053] Specifically, since there may be operational differences between new and old versions of the application, the same test case mentioned above can be understood as a test case with the same identifier in the corresponding version, that is, a test case that tests the same scenario but in different versions.
[0054] For example, suppose that in the testing of a social app, test cases may include user login, posting updates, browsing friends' updates, and other operations. When these operations are performed, the system will record the timestamps, operation paths, and related parameters of each user's click, input, swipe, etc. in the new version of the application, forming the first data collection dataset; at the same time, the same test cases will be executed in the old version of the application, recording the corresponding user behavior data, forming the second data collection dataset.
[0055] S103: Perform noise reduction on the first and second event tracking datasets, and match the noise-reduced first and second event tracking datasets with business keywords to obtain multiple event tracking data groups.
[0056] Among them, business keywords refer to business identification information closely related to the core business functions of the application and user operation scenarios. The event tracking data group contains a set of event tracking data from both old and new versions.
[0057] In this step, noise reduction processing is performed on the first and second event tracking datasets to remove noise interference, such as invalid, duplicate, or abnormal data points. This process can be achieved through data cleaning algorithms and filtering rules to ensure data reliability. After noise reduction, the event tracking data in the old and new datasets is matched based on business keywords, that is, relevant data in the old version of the application is paired with corresponding data in the new version of the application. For example, in a financial app, business keywords may include "transfer," "receive payment," and "account balance inquiry." In this case, the event tracking data of users performing "transfer" operations in the new version can be matched with data of the same operation in the old version, ultimately forming multiple event tracking data groups.
[0058] S104: Perform intra-group data comparison for each data point group and generate a regression test report based on the data comparison results.
[0059] The regression test report records the comparison results between the new version of the application and the old version of the application under the same test cases.
[0060] In this step, the platform iterates through each successfully matched event tracking data group, comparing the detailed content of the old and new versions of the tracking points within the group, including event parameters, JSON structure, and key business field values. During the comparison process, inconsistencies such as missing parameters, type changes, and numerical discrepancies can be identified. Afterward, the platform categorizes and aggregates the comparison results, for example, by type "completely consistent," "parameter differences," "missing events," and "new events." Finally, the platform summarizes the aggregated data for each event tracking data group to obtain a regression test report.
[0061] Furthermore, when the event tracking dataset includes performance metrics, this data can clearly identify whether the new version of the application offers performance improvements or degrades compared to the old version. In this case, the regression test report can detail the differences between the new and old versions across various metrics, including areas for improvement and potential issues.
[0062] In the above embodiments, upon receiving the test instructions, test cases and the new and old versions of the application participating in the test are determined, and the event tracking datasets of the new and old versions are recorded respectively during the execution of the test cases. By denoising these datasets, non-business interference factors are effectively removed, allowing data comparison to focus on real business behavior, thus improving data comparability and analytical accuracy. Subsequently, based on business keywords, the new and old versions of the event tracking datasets are precisely aligned according to the same business events, overcoming the time offset problem caused by network jitter or performance fluctuations, and ensuring semantic consistency of the comparison. Finally, through automated intra-group data comparison and difference report generation, the addition, absence, or content anomalies of event tracking can be quickly identified. This significantly reduces the degree of manual intervention and the risk of error omissions while ensuring coverage, not only improving testing efficiency but also enhancing the reliability of test results.
[0063] In one embodiment, determining test cases and the new and old versions of the application participating in the test according to test instructions includes:
[0064] S1: Parse the test instructions and extract the test scenario identifier, new version identifier, and old version identifier.
[0065] S2: Determine the corresponding test scenario based on the test scenario identifier, and retrieve the test cases associated with the test scenario from the preset test case library.
[0066] S3: Determine the new version application and the old version application to participate in the test based on the new version identifier and the old version identifier respectively.
[0067] The test case library stores pre-set test cases, which can be categorized according to test scenarios.
[0068] In this embodiment, the test instructions are parsed, specifically through a detailed analysis of the instruction content, extracting the test scenario identifier, new version identifier, and old version identifier. By parsing these fields, the platform can quickly obtain specific identifier information. Based on the test scenario identifier, test cases associated with that test scenario are retrieved from a pre-defined test case library. The test case library is a database or file system that stores test cases corresponding to various test scenarios. Simultaneously, based on the new version identifier and the old version identifier, the platform can separately determine the new version application and the old version application participating in the test. For example, if the new version identifier is v2.0.1 and the old version identifier is v1.9.5, these two versions of the application can be loaded from the application repository for testing.
[0069] It's understandable that parsing test commands allows for quick identification of specific test scenarios and relevant versions, avoiding errors and inefficiencies caused by manual operations. Retrieving test cases associated with the test scenario from the test case library ensures comprehensiveness and coverage of the tests, enabling a systematic evaluation of the new version's performance in specific scenarios, as well as the differences between new and old versions in those scenarios.
[0070] In one embodiment, test cases are executed in both the new and old versions of the application, and during the execution of test cases in both applications, a first data tracking dataset for the new version and a second data tracking dataset for the old version are recorded, including:
[0071] S1: Execute test cases in both the new and old versions of the application, and intercept the data tracking points during the execution process.
[0072] S2: Sort the event tracking data intercepted in the new version application and the old version application according to the timestamp order.
[0073] S3: Generate the first event tracking dataset based on the sorted event tracking data intercepted in the new version of the application, and generate the second event tracking dataset based on the sorted event tracking data intercepted in the old version of the application.
[0074] In this embodiment, after the test cases begin execution, the event tracking agent listens for and captures network requests or log outputs reported within the application in real time, identifying and extracting event-related data. Subsequently, the platform records the corresponding timestamp for each captured event data point and sorts it according to the chronological order of the timestamps within the data stream corresponding to that version, forming a data sequence ordered by occurrence time. During the execution of the new version application, the sorted event tracking sequence is organized and packaged into the first event tracking dataset. Similarly, in the old version application, the sorted data is organized into the second event tracking dataset. By intercepting and sorting the event tracking data in the new and old versions chronologically, the platform can ensure the integrity and temporal accuracy of the collected data.
[0075] Specifically, a data tracking agent is a software component or middleware module used to automatically capture, intercept, and collect data tracking logs generated internally during application runtime. It can be transparently embedded in the test execution environment, identifying and extracting data streams related to data tracking in real time by listening to network requests, system log output, or hooking specific function calls, without modifying the application source code. Furthermore, the data tracking agent can be integrated into test cases, automatically triggering the collection of data tracking data during test case execution by calling interfaces or injecting listening mechanisms.
[0076] In one embodiment, noise reduction processing is performed on the first and second event tracking datasets, including:
[0077] S1: Identify the event tracking data when the user is not logged in in the first event tracking dataset and the second event tracking dataset, and remove the identified event tracking data from the first event tracking dataset and the second event tracking dataset.
[0078] S2: Remove timestamp-related data from the first and second event tracking datasets after the initial data removal process to obtain the first and second event tracking datasets after noise reduction.
[0079] Among them, timestamp-related data refers to information in the embedded data that is directly related to the timestamp, including the specific time point when the data was generated and the format of the timestamp.
[0080] In this embodiment, identifying event tracking data in the first and second event tracking datasets when the user is not logged in can be achieved by examining fields related to the user's login status. For example, the event tracking data may contain a field called `is_logged_in`, which has a value of `true` or `false`, indicating whether the user is logged in. The platform can iterate through each data entry in both datasets and check the value of this field. If `is_logged_in` is `false`, the data entry is marked as event tracking data when the user is not logged in. Subsequently, the platform can remove these marked data from the first and second event tracking datasets. Then, it further identifies and removes all timestamp-related fields, finally retaining only structured content directly related to business logic, such as event identifiers and business parameters, resulting in the first and second event tracking datasets after noise reduction processing.
[0081] Understandably, identifying and removing event tracking data from logged-out states ensures that all analyzed tracking points occur within valid user sessions, thus focusing on behavioral sequences in real-world business scenarios. Further removing timestamp-related data eliminates non-business-related differences caused by network latency, device time asynchrony, or minor execution timing drifts, allowing the tracking data comparison to focus more on the differences between event content and the parameters themselves. This enhances the accuracy and effectiveness of the regression testing process.
[0082] In one embodiment, the first and second data sets after noise reduction are matched based on business keywords to obtain multiple data sets, including:
[0083] S1: Extract the key business fields of each data point in the first and second data point datasets after noise reduction.
[0084] S2: Iterate through the event data in the second event data set in sequence, determine the current time window based on the timestamp of the event data, and match the event data with the event data in the first event data set that is in the current time window based on the key business fields of each event data set to obtain the event data group including the event data.
[0085] In this embodiment, after extracting the key business fields of each data point from the two datasets, each data point in the second dataset is sequentially traversed. For each data point, a current time window is determined based on its timestamp. The size of the time window can be set according to specific application scenarios and business requirements, for example, it can be 3 seconds before or after, or 5 seconds after. This application does not impose specific limitations on this.
[0086] Then, within the defined current time window, based on the extracted key business fields, the current tracking data in the second tracking dataset is matched with the tracking data in the first tracking dataset that is within the current time window. Specifically, the matching success can be determined by whether the values of the key business fields are the same or similar.
[0087] For example, assuming the timestamp of the current data is 10:00:00, if the length of the time window is set to the last 5 seconds, then the current time window is from 10:00:00 to 10:00:05.
[0088] Specifically, by extracting key business fields and performing sliding matching based on a time window, it is possible to accurately align the tracking data corresponding to the same business event in both the old and new versions, while allowing for reasonable time offsets. This time window mechanism accommodates minor fluctuations in timing caused by network latency, differences in client performance, or asynchronous processing, thereby enhancing the robustness of the matching.
[0089] In one embodiment, intra-group data comparison is performed on each data set, and a regression test report is generated based on the data comparison results, including:
[0090] S1: For each data point group, perform a field-by-field comparison between the new version data point data and the old version data point data within the group.
[0091] S2: When inconsistencies in field content are detected, record the difference information, and generate the comparison result of the data set based on the recorded difference information when the comparison is completed.
[0092] S3: Compare the results of all data sets with tracking points, generate data comparison results, and generate a regression test report based on the data comparison results according to the dimensions of the tracking point data.
[0093] The difference information refers to the specific details of inconsistencies in the field content when comparing fields between the new and old versions of the tracking data. The comparison results include all inconsistencies identified during the comparison process.
[0094] In this embodiment, the old and new version data in each data point group are compared field by field, and the differences are recorded. This allows for precise identification of specific changes in user behavior and functional performance between the old and new versions. Field-level comparison ensures that no minor differences are overlooked, providing a detailed evaluation of improvement effects and the discovery of potential problems. Subsequently, the difference information is recorded and comparison results are generated. These differences are systematically organized and presented to form a regression test report, enabling the development team to quickly understand the improvements and potential problems introduced by the new version.
[0095] In one embodiment, the regression testing method further includes:
[0096] Obtain the update logs of the new version of the application, and combine the update logs with the regression test report to identify the anomalies in the new version of the application.
[0097] In this context, the changelog refers to the detailed record of changes made to a new version of the application, provided by the developer. Anomaly checkpoints refer to specific functionalities identified during regression testing based on the changelog and test reports that may present problems or require further testing.
[0098] In this embodiment, the update logs of the new version of the application are obtained to identify improvements compared to the old version. Then, the update logs and regression test reports are combined to determine the anomalies in the new version of the application. For example, the update logs may only show changes to feature 'a', but the regression test report shows discrepancies in the test results for feature 'b'; in this case, feature 'b' may be identified as an anomaly. Finally, the identified anomalies can be sent to testers, allowing them to quickly initiate targeted testing or fixes based on these anomalies.
[0099] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0100] The regression testing apparatus provided in the embodiments of this application is described below. The regression testing apparatus described below and the regression testing method described above can be referred to in correspondence.
[0101] like Figure 2 As shown, this application provides a regression testing apparatus 200, the apparatus comprising:
[0102] The instruction receiving module 201 is used to determine the test cases and the new and old versions of the application participating in the test based on the test instructions when a test instruction is received.
[0103] The event tracking module 202 is used to execute test cases in the new version application and the old version application, and to record the first event tracking dataset of the new version application and the second event tracking dataset of the old version application during the execution of test cases in the new version application and the old version application.
[0104] The event tracking matching module 203 is used to perform noise reduction processing on the first event tracking dataset and the second event tracking dataset, and to match the noise-reduced first event tracking dataset and the second event tracking dataset according to business keywords to obtain multiple event tracking data groups.
[0105] The data comparison module 204 is used to compare the data within each data group of each tracking point and generate a regression test report based on the data comparison results.
[0106] In the above embodiments, upon receiving the test instructions, test cases and the new and old versions of the application participating in the test are determined, and the event tracking datasets of the new and old versions are recorded respectively during the execution of the test cases. By denoising these datasets, non-business interference factors are effectively removed, allowing data comparison to focus on real business behavior, thus improving data comparability and analytical accuracy. Subsequently, based on business keywords, the new and old versions of the event tracking datasets are precisely aligned according to the same business events, overcoming the time offset problem caused by network jitter or performance fluctuations, and ensuring semantic consistency of the comparison. Finally, through automated intra-group data comparison and difference report generation, the addition, absence, or content anomalies of event tracking can be quickly identified. This significantly reduces the degree of manual intervention and the risk of error omissions while ensuring coverage, not only improving testing efficiency but also enhancing the reliability of test results.
[0107] In one embodiment, the instruction receiving module includes:
[0108] The instruction parsing submodule is used to parse test instructions and extract test scenario identifiers, new version identifiers, and old version identifiers.
[0109] The test case determination submodule is used to determine the corresponding test scenario based on the test scenario identifier and retrieve the test cases associated with the test scenario from the preset test case library;
[0110] The application determination submodule is used to determine the new version application and the old version application participating in the test based on the new version identifier and the old version identifier, respectively.
[0111] In one embodiment, the data tracking module includes:
[0112] The test case execution submodule is used to execute test cases in both the new and old versions of the application, and to intercept the data tracking points during the execution process.
[0113] The event tracking sorting submodule is used to sort the event tracking data intercepted in the new version of the application and the old version of the application according to the timestamp order.
[0114] The dataset generation submodule is used to generate the first event tracking dataset based on the sorted event tracking data intercepted in the new version of the application, and to generate the second event tracking dataset based on the sorted event tracking data intercepted in the old version of the application.
[0115] In one embodiment, the tracking point matching module includes:
[0116] The first filtering submodule is used to identify the event tracking data of users who are not logged in in the first event tracking dataset and the second event tracking dataset, and to remove the identified event tracking data from the first event tracking dataset and the second event tracking dataset.
[0117] The second filtering submodule is used to remove timestamp-related data from the first and second event tracking datasets after the initial data removal process, so as to obtain the first and second event tracking datasets after noise reduction.
[0118] In one embodiment, the tracking point matching module includes:
[0119] The field extraction submodule is used to extract the key business fields of each data point in the first and second data point datasets after noise reduction.
[0120] The event tracking matching submodule is used to sequentially traverse the event tracking data in the second event tracking dataset, determine the current time window based on the timestamp of the event tracking data, and match the event tracking data with the event tracking data in the first event tracking dataset that is in the current time window based on the key business fields of each event tracking data to obtain an event tracking data group that includes the event tracking data.
[0121] In one embodiment, the data comparison module includes:
[0122] The field comparison submodule is used to perform a field-by-field comparison of the new version of the tracking data and the old version of the tracking data in each tracking data group.
[0123] The difference comparison submodule is used to record difference information when inconsistencies in field content are detected, and to generate the comparison result of the data group based on the recorded difference information when the comparison is completed.
[0124] The results statistics submodule is used to statistically analyze the comparison results of all data sets, generate data comparison results, and generate a regression test report based on the data comparison results according to the data set dimensions.
[0125] In one embodiment, the regression testing apparatus further includes:
[0126] The troubleshooting point identification module is used to obtain the update logs of the new version of the application and, in combination with the update logs and regression test reports, identify the anomalies and troubleshooting points of the new version of the application.
[0127] The division of modules in the above regression testing device is merely illustrative. In other embodiments, the regression testing device can be divided into different modules as needed to complete all or part of its functions. Each module in the above regression testing device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0128] In one embodiment, this application also provides a storage medium storing computer-readable instructions that, when executed by one or more processors, cause the one or more processors to perform the steps of the regression testing method as described in any of the above embodiments.
[0129] In one embodiment, this application also provides a computer device storing computer-readable instructions that, when executed by one or more processors, cause the one or more processors to perform the steps of the regression testing method as described in any of the above embodiments.
[0130] Indicatively, such as Figure 3 As shown, Figure 3 This is a schematic diagram of the internal structure of a computer device 300 provided in an embodiment of this application. The computer device 300 can be provided as a server. (Refer to...) Figure 3 The computer device 300 includes a processing component 302, which further includes one or more processors, and memory resources represented by memory 301 for storing instructions, such as application programs, that can be executed by the processing component 302. The application programs stored in memory 301 may include one or more modules, each corresponding to a set of instructions. Furthermore, the processing component 302 is configured to execute instructions to perform the regression testing methods of any of the above embodiments.
[0131] The computer device 300 may also include a power supply component 303 configured to perform power management of the computer device 300, a wired or wireless network interface 304 configured to connect the computer device 300 to a network, and an input / output (I / O) interface 305. The computer device 300 may operate on an operating system stored in memory 301, such as Windows Server™, Mac OS X™, Unix™, Linux™, Free BSD™, or similar.
[0132] Those skilled in the art will understand that Figure 3 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0133] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only 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 a…" does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element. In this document, the singular forms "a," "an," and "the" may also include the plural forms unless the context clearly indicates otherwise. It should also be understood that the terms “comprising / including” or “having” specify the presence of the stated features, wholes, steps, operations, components, parts or combinations thereof, but do not exclude the possibility of the presence or addition of one or more other features, wholes, steps, operations, components, parts or combinations thereof. Meanwhile, the term “and / or” as used in this specification includes any and all combinations of the associated listed items.
[0134] The various embodiments in this specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. The various embodiments can be combined as needed, and the same or similar parts can be referred to each other.
[0135] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A regression testing method, characterized in that, The method includes: When a test instruction is received, the test cases and the new and old versions of the application to be tested are determined according to the test instruction. The test cases are executed in both the new version of the application and the old version of the application, and the first data set of the new version of the application and the second data set of the old version of the application are recorded during the execution of the test cases in both applications. The first and second event tracking datasets are denoised, and the denoised datasets are matched with business keywords to obtain multiple event tracking data groups. Perform intra-group data comparison for each data point group, and generate a regression test report based on the data comparison results.
2. The regression testing method according to claim 1, characterized in that, The step of determining test cases and participating new and old versions of the application according to the test instructions includes: Parse the test instructions to extract the test scenario identifier, new version identifier, and old version identifier; The corresponding test scenario is determined based on the test scenario identifier, and test cases associated with the test scenario are retrieved from the preset test case library; The new version application and the old version application participating in the test are determined based on the new version identifier and the old version identifier, respectively.
3. The regression testing method according to claim 1, characterized in that, The process of executing the test cases in both the new and old versions of the application, and recording the first data set of the new version and the second data set of the old version during the execution of the test cases, includes: The test cases are executed in both the new version of the application and the old version of the application, and the embedded data is intercepted during the execution. The data points intercepted in the new version of the application and the old version of the application are sorted according to the timestamp order. A first event tracking dataset is generated based on the sorted event tracking data intercepted in the new version of the application, and a second event tracking dataset is generated based on the sorted event tracking data intercepted in the old version of the application.
4. The regression testing method according to claim 1, characterized in that, The noise reduction processing of the first and second event tracking datasets includes: Identify the event tracking data when the user is not logged in in the first event tracking dataset and the second event tracking dataset, and remove the identified event tracking data from the first event tracking dataset and the second event tracking dataset; After removing timestamp-related data from the first and second event tracking datasets, the first and second event tracking datasets are obtained after noise reduction.
5. The regression testing method according to claim 1, characterized in that, The first and second data sets after noise reduction are matched based on business keywords to obtain multiple data sets, including: Extract the key business fields from each data point in the first and second datasets after noise reduction; The tracking data in the second tracking data set is traversed sequentially. The current time window is determined by the timestamp of the tracking data. Based on the key business fields of each tracking data, the tracking data is matched with the tracking data in the first tracking data set that are in the current time window to obtain a tracking data group including the tracking data.
6. The regression testing method according to claim 1, characterized in that, The process of comparing data within each data set and generating a regression test report based on the comparison results includes: For each data group, the new version of the data points and the old version of the data points within the group are compared one by one at the field level. When inconsistencies in field content are detected, the difference information is recorded, and the comparison result of the data set is generated based on the recorded difference information when the comparison is completed. The comparison results of all data sets are statistically analyzed to form a data comparison result. Based on the data comparison result, a regression test report is generated according to the data set dimensions.
7. The regression testing method according to any one of claims 1 to 6, characterized in that, The method further includes: Obtain the update logs of the new version of the application, and combine the update logs with the regression test report to determine the anomaly points of the new version of the application.
8. A regression testing device, characterized in that, The device includes: The instruction receiving module is used to determine the test cases and the new and old versions of the application participating in the test based on the test instructions when a test instruction is received. The event tracking module is used to execute the test cases in the new version application and the old version application, and to record the first event tracking dataset of the new version application and the second event tracking dataset of the old version application during the execution of the test cases in the new version application and the old version application. The event tracking matching module is used to perform noise reduction processing on the first event tracking dataset and the second event tracking dataset, and to match the noise-reduced first event tracking dataset and the second event tracking dataset according to business keywords to obtain multiple event tracking data groups. The data comparison module is used to compare data within each data point group and generate a regression test report based on the comparison results.
9. A storage medium, characterized in that: The storage medium stores computer-readable instructions that, when executed by one or more processors, cause the one or more processors to perform the steps of the regression testing method as described in any one of claims 1 to 7.
10. A computer device, characterized in that, include: One or more processors, and memory; The memory stores computer-readable instructions that, when executed by the one or more processors, perform the steps of the regression testing method as described in any one of claims 1 to 7.