Application of automated testing methods, systems, terminal devices, and storage media

By analyzing interface changes and determining the test case set based on the iterative code information and module topology relationships, the problem of low accuracy in the application of automated testing in existing technologies is solved, and an efficient and accurate automated testing process is achieved.

CN122285503APending Publication Date: 2026-06-26XIAMEN INTRETECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
XIAMEN INTRETECH
Filing Date
2026-03-25
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

In existing application automation testing processes, developers manually select test cases after completing code iterations, which leads to strong subjectivity and large errors, reducing the accuracy of application automation testing.

Method used

By acquiring iterative code information of the target application, we can analyze interface changes, identify changed interfaces and functional modules, and automatically determine the test case set by combining module topology and test case database. We can then perform test case testing and generate a change tracing report.

Benefits of technology

It improves the accuracy of test case sets, avoids redundant operations in full regression testing, significantly shortens the testing cycle, adapts to the rapid iteration development pace of the APP, and improves testing efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122285503A_ABST
    Figure CN122285503A_ABST
Patent Text Reader

Abstract

This invention provides an application automated testing method, system, terminal device, and storage medium. The method includes: acquiring iterative code information of a target application; performing interface change analysis on the iterative code information to obtain application change interfaces; determining changed functional modules based on the application change interfaces; determining a list of modules affected by the changes based on the changed functional modules and a pre-set module topology; determining a test case set based on the list of modules affected by the changes and a test case database; combining the iterative code information, application change interfaces, changed functional modules, and test case set to obtain a change tracing report; and sending the test case set to the target application for test case testing to obtain test execution results. In this embodiment of the invention, the test case set can be automatically determined based on the list of modules affected by changes and the test case database, eliminating the need for manual test case selection and improving the accuracy of the test case set.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of application testing technology, and in particular to an application automation testing method, system, terminal device, and storage medium. Background Technology

[0002] As software applications become increasingly complex, especially with the rapid iteration of mobile applications (APPs), developers frequently modify and optimize code, posing a dual challenge to testing efficiency and accuracy. Automated testing, as a core means of improving testing efficiency, has been widely applied in the software development process. It automatically executes test cases through pre-set scripts, reducing manual intervention and shortening the testing cycle.

[0003] In existing application automation testing processes, after developers complete code iterations, they manually select test cases, which leads to strong subjectivity and large errors in application testing, reducing the accuracy of application automation testing. Summary of the Invention

[0004] The purpose of this invention is to provide an application of automated testing methods, systems, terminal devices, and storage media to solve the problem of low accuracy in existing automated testing technologies.

[0005] This invention is implemented as follows: an application automated testing method, the method comprising: An application-automated testing method, characterized by comprising: Obtain the iterative code information of the target application, and perform interface change analysis on the iterative code information to obtain the application change interface; The change function modules are determined based on the application change interface, and a list of modules affected by the change is determined based on the change function modules and the pre-set module topology relationship. Based on the list of modules affected by the change and the test case database, a set of test cases is determined, and the iterative code information, the application change interface, the changed functional module and the set of test cases are combined to obtain a change tracing report; The test case set is sent to the target application for test case testing, and the test execution results are obtained.

[0006] Preferably, the test case set is determined based on the list of modules affected by the change and the test case database, including: Obtain the module identifier of each affected module in the list of affected modules, and match the module identifier with the test case database to obtain a set of matching test cases; Obtain the functional weights of each influencing module and the correlation weights between different influencing modules; The priority weight of each affected module corresponding to the matching test case set is determined according to the functional weight and the association weight, and the matching test case set is sorted according to the priority weight to obtain the target test case set; The target test case set is marked with the affected modules, test objectives, and execution steps, and the marked target test case set is converted into a script format to obtain the test case set.

[0007] Preferably, the test case set is sent to the target application for test case testing, and the test execution results are obtained, including: Obtain the current version and running status information of the target application, and perform testing and detection on the target application based on the current version and running status information; If the target application passes the test, the test case set is sent to the target application to execute the test cases, and the test case execution results, test case execution time, and test case exception information are recorded. Obtain the test case identifier and the module identifier of the affected module corresponding to the test case execution result, and store the test case execution result, the test case execution time, the test case exception information, the test case identifier and the module identifier accordingly to obtain the test execution result.

[0008] Preferably, sending the test case set to the target application for test case testing and obtaining test execution results further includes: Obtain the operation logs, crash logs, and server interaction logs generated by the target application during test case testing, and associate and store the operation logs, crash logs, and server interaction logs with the corresponding test case identifiers and module identifiers to obtain a structured log library; Retrieve failed test cases from the structured log library, perform error analysis on the failed test cases, and obtain test case error reports.

[0009] Preferably, error analysis is performed on the failed test cases to obtain a test case error report, including: Obtain the log data of the failed test cases, and extract keyword features, stack frame features, timing fluctuation features, and call chain features from the log data; The keyword features, stack frame features, time-series fluctuation features, and call chain features are combined into a matrix to obtain a log feature matrix; Calculate the feature similarity between the keyword feature, the stack frame feature, the temporal fluctuation feature, and the call chain feature and their corresponding preset features, respectively. The log feature matrix is ​​adjusted based on the feature similarity to obtain the log adjustment matrix, and the matrix similarity between the log adjustment matrix and the preset feature matrix is ​​calculated. The target feature matrix in the preset feature matrix is ​​determined based on the matrix similarity, and the main cause of failure of the test failure case is determined based on the target feature matrix. The log data is marked as failed based on the cause of failure, and the marked log data and the cause of failure are combined to obtain the test case error report.

[0010] Preferably, the log feature matrix is ​​adjusted based on the feature similarity to obtain a log adjustment matrix, including: Based on the feature similarity, determine the high similarity matrix elements and low similarity matrix elements in the log feature matrix; Clustering is performed on the elements of the high similarity matrix based on the feature similarity to obtain the clustering result. In the log feature matrix, the elements of the high similarity matrix are assigned high weights based on the clustering result. The elements of the low similarity matrix are weighted according to the feature similarity to obtain a weighted result. Then, in the log feature matrix after high weight allocation, the elements of the low similarity matrix are allocated low weight according to the weighted result to obtain the log adjustment matrix.

[0011] Preferably, the iterative code information is analyzed for interface changes to obtain the application change interface, including: The iterative code information is compared with the current code information of the target application, and the code change information is determined based on the code comparison results; Obtain the interface association footer from the code change information, and determine the application change interface based on the interface association footer.

[0012] Another objective of this invention is to provide an application automated testing system, the system comprising: The interface change analysis module is used to obtain the iterative code information of the target application and perform interface change analysis on the iterative code information to obtain the application change interface. The change impact determination module is used to determine the change function module based on the application change interface, and to determine the list of change impact modules based on the change function module and the preset module topology relationship; The test case determination module is used to determine a set of test cases based on the list of modules affected by the change and the test case database, and to combine the iterative code information, the application change interface, the changed functional module and the test case set to obtain a change tracing report; The test case testing module is used to send the set of test cases to the target application for test case testing and obtain the test execution results.

[0013] This invention, through interface change analysis of iterative code information, can effectively identify application change interfaces that have undergone functional changes. Based on these application change interfaces, it can effectively identify the changed functional modules. Based on the list of affected modules and the test case database, it can automatically determine the test case set without manual test case selection, thus improving the accuracy of the test case set, avoiding redundant operations in full regression testing, significantly shortening the testing cycle, and adapting to the rapid iteration development pace of APPs. By combining iterative code information, application change interfaces, changed functional modules, and test case sets, a change tracing report is obtained, effectively facilitating information tracing during the application's automated testing process. Attached Figure Description

[0014] Figure 1 This is a flowchart of the application automation testing method provided in the first embodiment of the present invention; Figure 2 This is a schematic diagram of the application automation testing system provided in the second embodiment of the present invention; Figure 3 This is a schematic diagram illustrating the implementation of the application automated testing system provided in the second embodiment of the present invention; Figure 4 This is a schematic diagram of the structure of the terminal device provided in the third embodiment of the present invention. Detailed Implementation

[0015] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0016] To illustrate the technical solution described in this invention, specific embodiments are described below.

[0017] Example 1 Please see Figure 1 This is a flowchart of an application automation testing method provided in the first embodiment of the present invention. This application automation testing method can be applied to any device or system, and includes the following steps: Step S10: Obtain the iterative code information of the target application, and perform interface change analysis on the iterative code information to obtain the application change interface; This involves deeply binding the application programming interfaces (APIs) of the target application with functional modules. During the software development phase, based on a unified standardized footer specification, structured association identifiers are embedded in the API interface implementation code. Each API interface is linked to its corresponding business functional module, forming a machine-resolvable "API-functional module" mapping baseline, laying a structured data foundation for subsequent impact tracing.

[0018] Optionally, interface change analysis is performed on the iterative code information to obtain the application change interface, including: The iterative code information is compared with the current code information of the target application, and the code change information is determined based on the code comparison results; wherein, when the user's iterative code information for the target application is obtained, the full list of changed files is extracted by parsing the commit records / branch comparison results. The interface association footnotes in the code change information are obtained, and the application change interface is determined based on the interface association footnotes. Specifically, the full list of change files is parsed at the syntax level, and based on regular expression matching and text analysis technology, the API association footnotes embedded in the files are automatically identified. All API interface identifiers involved in the change are extracted to form a mapping relationship of "change file - associated API" to determine the application change interface.

[0019] Step S20: Determine the change function module according to the application change interface, and determine the list of change-affected modules according to the change function module and the preset module topology relationship; The extracted application change interfaces are precisely matched with a pre-set mapping library. Through set operations and association analysis, the list of functional modules affected by this code change is automatically derived to determine the changed functional modules. The pre-set mapping library stores the correspondence between different application change interfaces and corresponding changed functional modules. Combined with the dependency topology relationship between modules (pre-set module topology relationship), the scope of impact is hierarchically expanded to generate a complete impact map containing "core affected modules + indirectly related modules" to form a list of modules affected by the change.

[0020] Step S30: Determine the test case set based on the list of modules affected by the change and the test case database, and combine the iterative code information, the application change interface, the changed functional module and the test case set to obtain a change tracing report; In this process, the list of modules affected by changes is matched with the test case database to obtain a set of test cases. This embodiment decomposes software requirements (especially APP requirements) into multiple levels and in a refined manner, establishes a standardized module system and relationships, and obtains a test case database. The specific process is as follows: requirements are decomposed according to business / module / function, and the dependencies and associated weights of each module are recorded. For example, if a change in module A affects module B, a test case database is established for each module and test cases to ensure that each module corresponds to a dedicated set of test cases (including functional test cases, performance test cases, abnormal scenario test cases, etc.), and supports dynamic updates and maintenance of test cases.

[0021] Taking a smart home control app as an example, the specific breakdown is as follows: Primary business: 1. Device Management Domain (responsible for adding, binding, and deleting smart home devices); 2. Equipment control domain (responsible for the switching and parameter adjustment of various equipment); 3. Scene linkage domain (responsible for custom scenes and automatic triggering rules); 4. Personal central domain (responsible for account, permission, and log management).

[0022] Level 2 module: 1. Under the device management domain: device search module, device binding module, device unbinding module, device grouping module, and device information synchronization module; 2. Under the equipment control domain: lighting control module, air conditioning control module, curtain control module, security equipment control module, and equipment status query module; 3. Scene linkage domain: Scene creation module, scene editing module, scene trigger rule setting module, scene manual execution module, scene automatic triggering module; 4. Under the personal center domain: account login module, permission allocation module, operation log query module, APP version update module, and message notification settings module.

[0023] Level 3 Function (Lighting as an Example): The control module includes: light switch function (ID: M121), brightness adjustment function (ID: M122), color temperature adjustment function (ID: M123), and light mode switching function (ID: M124).

[0024] Optionally, a set of test cases is determined based on the list of modules affected by the changes and the test case database, including: Obtain the module identifier of each affected module in the list of affected modules, and match the module identifier with the test case database to obtain a set of matching test cases; wherein, the test case database stores the correspondence between different module identifiers and corresponding test cases; Obtain the functional weights of each influencing module and the correlation weights between different influencing modules; where the functional weights represent the functional priority of the corresponding influencing module and the correlation weights represent the degree of correlation between different influencing modules. The priority weight of each influencing module corresponding to the matching test case set is determined based on the functional weight and the association weight, and the matching test case set is sorted according to the priority weight to obtain the target test case set; wherein, for the same influencing module, the total associated functional value between it and different influencing modules is calculated based on the functional weight and the association weight, and the functional weight of the influencing module and the total associated functional value are weighted to obtain the priority weight, and the weighting coefficient in the weighting process can be set according to the requirements; The target test case set is marked with the affected modules, test objectives, and execution steps, and the marked target test case set is converted into a script format to obtain the test case set.

[0025] In this step, a secondary matching of the list of modules affected by the change can be performed based on the pre-set "functional module-test case" mapping table. The full pool of test cases is intelligently filtered and converged according to the "module dimension", eliminating unrelated test cases and outputting a set of test cases strongly bound to the changed modules. At the same time, it supports hierarchical sorting by test case priority and coverage dimension to form a precise "module-test case" association list, providing clear scope guidance for test execution.

[0026] The entire data chain from "Change File → Associated API → Affected Module → Matched Test Cases" is structured and integrated to output a visual report that includes a list of affected modules, a list of test cases, and traceability of related relationships. This enables the quantification, traceability, and verification of the impact of code changes, supporting improved decision-making efficiency in review, testing, and release stages of the R&D process.

[0027] Optionally, the steps for selecting targeted test cases from the test case database are as follows: 1. Extract all module IDs from the "Affected Module List" and match them with the corresponding module's dedicated test case set in the mapping relationship library; 2. Prioritize test cases based on their impact. Set core test cases (such as main functional process test cases and abnormal scenario test cases) corresponding to high-impact modules as the highest priority, and secondary test cases (such as boundary value test cases) corresponding to medium- and low-impact modules as the second priority. Remove duplicate test cases (i.e., the same test case shared by multiple modules), generate a "target test case set", and label each test case with information such as the affected module, test purpose, and execution steps. 3. Convert the target test case set into a script format that can be recognized by the automated testing engine (such as the Appium script commonly used in APP testing) to obtain the test case set.

[0028] Step S40: Send the test case set to the target application for test case testing and obtain the test execution results; By sending the test case set to the target application, the target application can be effectively controlled to perform automated test case testing. Optionally, the test case set is sent to the target application for test case testing to obtain test execution results, including: The current version and running status information of the target application are obtained, and the target application is tested and detected based on the current version and running status information; wherein, by establishing a connection with the APP testing environment (real device, emulator), the current version, running status and other information of the APP are obtained to ensure that the testing environment meets the execution conditions; If the target application passes the test, the test case set is sent to the target application to execute the test cases, and the test case execution results, test case execution time, and test case exception information are recorded. Among them, test scripts are sent to the APP in order of test case priority, and test cases are executed through control recognition, operation simulation (such as clicking, input, swiping), etc. Obtain the test case identifier and the module identifier of the affected module corresponding to the test case execution result, and store the test case execution result, the test case execution time, the test case exception information, the test case identifier and the module identifier accordingly to obtain the test execution result.

[0029] Furthermore, sending the test case set to the target application for test case testing and obtaining test execution results also includes: The system acquires operation logs, crash logs, and server interaction logs generated by the target application during test case testing, and associates and stores these logs with the corresponding test case identifiers and module identifiers to obtain a structured log library. Furthermore, the system associates and stores the operation logs, crash logs, and server interaction logs returned by the APP with the test case ID, affected module ID, and execution result to form a structured log library that supports rapid retrieval by module, test case, time, exception type, and other dimensions. The system retrieves failed test cases from the structured log library and performs error analysis on these cases to generate test case error reports. It can identify error information in the logs using preset rules (such as keyword matching and exception stack analysis), determine the cause of test failures (such as module dependency exceptions, code logic errors, and control location failures), and associate the corresponding affected modules and modified code to quickly locate the root cause of the problem. It can also display the test pass rate, details of failed test cases, problem distribution, and root cause analysis results for each affected module, pushing these results to testers and developers. The system also supports report export and traceability. Furthermore, it provides update suggestions for module relationships based on test results. If actual testing reveals that a modification to a module affects modules that originally did not need testing, new relationships and weights can be added to achieve dynamic adjustments and optimize testing efficiency.

[0030] Furthermore, error analysis is performed on the failed test cases to obtain test case error reports, including: Obtain log data of the failed test cases and extract keyword features, stack frame features, timing fluctuation features, and call chain features from the log data. Specifically, keyword features are extracted from the log data based on preset keywords. Key structured information such as function call chains, class names, method names, file names, line numbers, and exception types are extracted from the log data to obtain stack frame features. The log times in the log data are aligned, and the aligned log data is time-bucketed. In-window statistics are performed on the time-bucketed log data, and timing fluctuation features are calculated based on the in-window statistics results. The log data is grouped according to the unique ID number (TraceID) of each request. Span information is parsed on the grouped log data, and call chain, time, depth, topology, and exception points are generated based on the parsed service name, time consumption, parent ID, and exception information to obtain call chain features. The keyword features, stack frame features, timing fluctuation features, and call chain features are combined into a matrix to obtain a log feature matrix; wherein, the keyword features, stack frame features, timing fluctuation features, and call chain features are mapped to obtain mapping vectors, and the mapping vectors are combined into a matrix according to a preset matrix element order to obtain the log feature matrix. Calculate the feature similarity between the keyword feature, the stack frame feature, the timing fluctuation feature, and the call chain feature and their corresponding preset features; wherein, the preset features can be set according to requirements; The log feature matrix is ​​adjusted based on the feature similarity to obtain a log adjustment matrix, and the matrix similarity between the log adjustment matrix and the preset feature matrix is ​​calculated; wherein, adjusting the log feature matrix based on feature similarity effectively improves the accuracy of the log adjustment matrix; The target feature matrix in the preset feature matrix is ​​determined based on the matrix similarity, and the main cause of failure of the test failure case is determined based on the target feature matrix; wherein, the preset feature matrix corresponding to the maximum matrix similarity is determined as the target feature matrix, and the factors corresponding to the target feature matrix are determined as the main cause of failure of the test failure case; The log data is marked as a failure based on the failure cause, and the marked log data and the failure cause are combined to obtain the use case error report; wherein, by marking the log data as a failure cause, the association information of the failure cause in the log data is marked.

[0031] Preferably, the log feature matrix is ​​adjusted based on the feature similarity to obtain a log adjustment matrix, including: Based on the feature similarity, high similarity matrix elements and low similarity matrix elements in the log feature matrix are determined; wherein, matrix elements in the log feature matrix with feature similarity greater than a similarity threshold are determined as high similarity matrix elements, and matrix elements with feature similarity less than or equal to the similarity threshold are determined as low similarity matrix elements. Clustering is performed on the elements of the high similarity matrix based on the feature similarity to obtain clustering results. Then, in the log feature matrix, the elements of the high similarity matrix are assigned high weights based on the clustering results. Specifically, clustering is performed on the elements of the high similarity matrix based on feature similarity, and high weights are assigned to the elements of the high similarity matrix based on the number of clusters in the clustering results, thereby increasing the weight of the elements of the high similarity matrix in the log feature matrix. The elements of the low-similarity matrix are weighted according to the feature similarity to obtain a weighted result. Then, in the log feature matrix after high-weight allocation, the elements of the low-similarity matrix are allocated low weights according to the weighted result to obtain the log adjustment matrix. Specifically, weighting coefficients are calculated based on feature similarity, and the elements of the low-similarity matrix are weighted based on the weighting coefficients to obtain weighted weight values. In the log feature matrix after high-weight allocation, the elements of the low-similarity matrix are allocated low weights based on the weighted weight values ​​to obtain the log adjustment matrix.

[0032] In this embodiment, by modularly decomposing requirements and establishing a mapping relationship between modules and test cases, test cases are automatically selected and automated test execution and log linkage analysis are achieved after module modifications. This solves the problems of low testing efficiency, poor accuracy, and difficulty in troubleshooting in existing technologies. Compared with existing automated testing technologies, this embodiment can effectively improve the efficiency, accuracy, and traceability of software testing, adapting to the needs of rapid iteration in R&D.

[0033] Testing efficiency is greatly improved and time costs are reduced: By modifying and filtering the affected modules, and then filtering related test cases based on the affected modules, redundant operations of full regression testing are avoided, the testing cycle is greatly shortened, and the development pace of the app's rapid iteration is adapted.

[0034] The testing is highly targeted and the accuracy is significantly improved: Based on the refined decomposition of requirement modules and the precise mapping of modules to test cases, it ensures that test cases are highly matched with the changed modules, effectively avoids missing core test scenarios and redundant tests, reduces human judgment errors, improves the accuracy of test results, and reduces the risk of missing online issues.

[0035] Highly scalable and adaptable to complex business needs: The modular architecture design supports the dynamic addition and maintenance of requirement modules and test cases. When the APP adds new functions or adjusts module dependencies, only the module association graph and test case mapping library need to be updated. There is no need to reconstruct the entire testing system, which can adapt to the testing needs of different types and complexities of APPs.

[0036] In this embodiment, by analyzing interface changes in iterative code information, application change interfaces that have undergone functional changes can be effectively identified. Based on these application change interfaces, the changed functional modules can be effectively identified. Based on the list of modules affected by the changes and the test case database, the test case set can be automatically determined without manual test case selection, thus improving the accuracy of the test case set. This avoids redundant operations in full regression testing, significantly shortens the testing cycle, and adapts to the rapid iteration development pace of the APP. By combining iterative code information, application change interfaces, changed functional modules, and test case sets, a change tracing report is obtained, effectively facilitating information tracing during the application's automated testing process.

[0037] Example 2 Please see Figure 2 This is a schematic diagram of the structure of the application automated testing system 100 provided in the second embodiment of the present invention, including: The interface change analysis module 10 is used to obtain the iterative code information of the target application and perform interface change analysis on the iterative code information to obtain the application change interface.

[0038] Optionally, the interface change analysis module 10 is further configured to: compare the iterative code information with the current code information of the target application, and determine the code change information based on the code comparison result; Obtain the interface association footer from the code change information, and determine the application change interface based on the interface association footer.

[0039] The change impact determination module 11 is used to determine the change function module based on the application change interface, and to determine the change impact module list based on the change function module and the preset module topology relationship.

[0040] The test case determination module 12 is used to determine a set of test cases based on the list of modules affected by the change and the test case database, and to combine the iterative code information, the application change interface, the changed functional module and the set of test cases to obtain a change tracing report.

[0041] Optionally, the test case determination module 12 is further configured to: obtain the module identifier of each affected module in the list of affected change modules, and match the module identifier with the test case database to obtain a set of matching test cases; Obtain the functional weights of each influencing module and the correlation weights between different influencing modules; The priority weight of each affected module corresponding to the matching test case set is determined according to the functional weight and the association weight, and the matching test case set is sorted according to the priority weight to obtain the target test case set; The target test case set is marked with the affected modules, test objectives, and execution steps, and the marked target test case set is converted into a script format to obtain the test case set.

[0042] The test case testing module 13 is used to send the set of test cases to the target application for test case testing and obtain test execution results.

[0043] Optionally, the test case module 13 is further configured to: obtain the current version and running status information of the target application, and perform testing and detection on the target application based on the current version and the running status information; If the target application passes the test, the test case set is sent to the target application to execute the test cases, and the test case execution results, test case execution time, and test case exception information are recorded. Obtain the test case identifier and the module identifier of the affected module corresponding to the test case execution result, and store the test case execution result, the test case execution time, the test case exception information, the test case identifier and the module identifier accordingly to obtain the test execution result.

[0044] Furthermore, the test case module 13 is also used to: obtain the operation logs, crash logs, and server interaction logs generated by the target application during the test case testing process, and associate and store the operation logs, crash logs, and server interaction logs with the corresponding test case identifiers and module identifiers to obtain a structured log library; Retrieve failed test cases from the structured log library, perform error analysis on the failed test cases, and obtain test case error reports.

[0045] Furthermore, the test case module 13 is also used to: obtain log data of the failed test cases, and extract keyword features, stack frame features, timing fluctuation features and call chain features from the log data; The keyword features, stack frame features, time-series fluctuation features, and call chain features are combined into a matrix to obtain a log feature matrix; Calculate the feature similarity between the keyword feature, the stack frame feature, the temporal fluctuation feature, and the call chain feature and their corresponding preset features, respectively. The log feature matrix is ​​adjusted based on the feature similarity to obtain the log adjustment matrix, and the matrix similarity between the log adjustment matrix and the preset feature matrix is ​​calculated. The target feature matrix in the preset feature matrix is ​​determined based on the matrix similarity, and the main cause of failure of the test failure case is determined based on the target feature matrix. The log data is marked as failed based on the cause of failure, and the marked log data and the cause of failure are combined to obtain the test case error report.

[0046] Preferably, the test case module 13 is further configured to: determine the high similarity matrix elements and low similarity matrix elements in the log feature matrix based on the feature similarity; Clustering is performed on the elements of the high similarity matrix based on the feature similarity to obtain the clustering result. In the log feature matrix, the elements of the high similarity matrix are assigned high weights based on the clustering result. The elements of the low similarity matrix are weighted according to the feature similarity to obtain a weighted result. Then, in the log feature matrix after high weight allocation, the elements of the low similarity matrix are allocated low weight according to the weighted result to obtain the log adjustment matrix.

[0047] Please see Figure 3 Based on the modifications made by the developers, the affected modules are identified and submitted to the test case generation engine. Test cases are then selected based on the affected modules, and the generated test cases are distributed to the automated testing engine. The automated testing engine then injects the selected test cases into the APP for test case testing. After the test is completed, the testing process of each test case is uploaded to the backend for log analysis and a test report is generated.

[0048] In this embodiment, by analyzing interface changes in iterative code information, application change interfaces that have undergone functional changes can be effectively identified. Based on these application change interfaces, the changed functional modules can be effectively identified. Based on the list of modules affected by the changes and the test case database, the test case set can be automatically determined without manual test case selection, thus improving the accuracy of the test case set. This avoids redundant operations in full regression testing, significantly shortens the testing cycle, and adapts to the rapid iteration development pace of the APP. By combining iterative code information, application change interfaces, changed functional modules, and test case sets, a change tracing report is obtained, effectively facilitating information tracing during the application's automated testing process.

[0049] Example 3 Figure 4 This is a structural block diagram of a terminal device 2 provided in the third embodiment of this application. For example... Figure 4 As shown, the terminal device 2 in this embodiment includes a processor 20, a memory 21, and a computer program 22 stored in the memory 21 and executable on the processor 20, such as a program for applying automated testing methods. When the processor 20 executes the computer program 22, it implements the steps in the various embodiments of the applied automated testing methods described above.

[0050] For example, the computer program 22 may be divided into one or more modules, which are stored in the memory 21 and executed by the processor 20 to complete this application. The one or more modules may be a series of computer program instruction segments capable of performing specific functions, which describe the execution process of the computer program 22 in the terminal device 2. The terminal device may include, but is not limited to, the processor 20 and the memory 21.

[0051] The processor 20 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.

[0052] The memory 21 can be an internal storage unit of the terminal device 2, such as a hard drive or memory of the terminal device 2. The memory 21 can also be an external storage device of the terminal device 2, such as a plug-in hard drive, SmartMediaCard (SMC), SecureDigital (SD) card, or FlashCard equipped on the terminal device 2. Furthermore, the memory 21 can include both internal and external storage units of the terminal device 2. The memory 21 is used to store the computer program and other programs and data required by the terminal device. The memory 21 can also be used to temporarily store data that has been output or will be output.

[0053] Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0054] If an integrated module is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. This computer-readable storage medium can be non-volatile or volatile. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable storage medium can include: any entity or device capable of carrying computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the contents of a computer-readable storage medium may be appropriately added to or subtracted from the contents as required by the legislation and patent practice in a jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, a computer-readable storage medium may not include electrical carrier signals and telecommunication signals.

[0055] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. An application of automated testing method, characterized in that, include: Obtain the iterative code information of the target application, and perform interface change analysis on the iterative code information to obtain the application change interface; The change function modules are determined based on the application change interface, and a list of modules affected by the change is determined based on the change function modules and the pre-set module topology relationship. Based on the list of modules affected by the change and the test case database, a set of test cases is determined, and the iterative code information, the application change interface, the changed functional module and the set of test cases are combined to obtain a change tracing report; The test case set is sent to the target application for test case testing, and the test execution results are obtained.

2. The application automation testing method according to claim 1, characterized in that, Based on the list of modules affected by the changes and the test case database, a set of test cases is determined, including: Obtain the module identifier of each affected module in the list of affected modules, and match the module identifier with the test case database to obtain a set of matching test cases; Obtain the functional weights of each influencing module and the correlation weights between different influencing modules; The priority weight of each affected module corresponding to the matching test case set is determined according to the functional weight and the association weight, and the matching test case set is sorted according to the priority weight to obtain the target test case set; The target test case set is marked with the affected modules, test objectives, and execution steps, and the marked target test case set is converted into a script format to obtain the test case set.

3. The application automation testing method according to claim 1, characterized in that, The test case set is sent to the target application for test case testing, and the test execution results are obtained, including: Obtain the current version and running status information of the target application, and perform testing and detection on the target application based on the current version and running status information; If the target application passes the test, the test case set is sent to the target application to execute the test cases, and the test case execution results, test case execution time, and test case exception information are recorded. Obtain the test case identifier and the module identifier of the affected module corresponding to the test case execution result, and store the test case execution result, the test case execution time, the test case exception information, the test case identifier and the module identifier accordingly to obtain the test execution result.

4. The application automation testing method according to claim 3, characterized in that, Sending the test case set to the target application for test case testing and obtaining test execution results, also includes: Obtain the operation logs, crash logs, and server interaction logs generated by the target application during test case testing, and associate and store the operation logs, crash logs, and server interaction logs with the corresponding test case identifiers and module identifiers to obtain a structured log library; Retrieve failed test cases from the structured log library, perform error analysis on the failed test cases, and obtain test case error reports.

5. The application automation testing method according to claim 4, characterized in that, Error analysis is performed on the failed test cases to obtain a test case error report, including: Obtain the log data of the failed test cases, and extract keyword features, stack frame features, timing fluctuation features, and call chain features from the log data; The keyword features, stack frame features, time-series fluctuation features, and call chain features are combined into a matrix to obtain a log feature matrix; Calculate the feature similarity between the keyword feature, the stack frame feature, the temporal fluctuation feature, and the call chain feature and their corresponding preset features, respectively. The log feature matrix is ​​adjusted based on the feature similarity to obtain the log adjustment matrix, and the matrix similarity between the log adjustment matrix and the preset feature matrix is ​​calculated. The target feature matrix in the preset feature matrix is ​​determined based on the matrix similarity, and the main cause of failure of the test failure case is determined based on the target feature matrix. The log data is marked as failed based on the cause of failure, and the marked log data and the cause of failure are combined to obtain the test case error report.

6. The application automation testing method according to claim 5, characterized in that, The log feature matrix is ​​adjusted based on the feature similarity to obtain a log adjustment matrix, including: Based on the feature similarity, determine the high similarity matrix elements and low similarity matrix elements in the log feature matrix; Clustering is performed on the elements of the high similarity matrix based on the feature similarity to obtain the clustering result. In the log feature matrix, the elements of the high similarity matrix are assigned high weights based on the clustering result. The elements of the low similarity matrix are weighted according to the feature similarity to obtain a weighted result. Then, in the log feature matrix after high weight allocation, the elements of the low similarity matrix are allocated low weight according to the weighted result to obtain the log adjustment matrix.

7. The application automated testing method according to claim 1, characterized in that, The iterative code information is analyzed for interface changes to obtain the application change interface, including: The iterative code information is compared with the current code information of the target application, and the code change information is determined based on the code comparison results; Obtain the interface association footer from the code change information, and determine the application change interface based on the interface association footer.

8. An application-automated testing system, characterized in that, include: The interface change analysis module is used to obtain the iterative code information of the target application and perform interface change analysis on the iterative code information to obtain the application change interface. The change impact determination module is used to determine the change function module based on the application change interface, and to determine the list of change impact modules based on the change function module and the preset module topology relationship; The test case determination module is used to determine a set of test cases based on the list of modules affected by the change and the test case database, and to combine the iterative code information, the application change interface, the changed functional module and the test case set to obtain a change tracing report; The test case testing module is used to send the set of test cases to the target application for test case testing and obtain the test execution results.

9. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method as described in any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1 to 7.