Mobile terminal software system automatic testing method and device based on intelligent waiting strategy

By introducing an inference engine component into the automated testing of mobile software systems, and using current page and device feature data to estimate waiting time, the problem of interruption or failure caused by test script failure is solved, intelligent test waiting optimization is achieved, and test efficiency and stability are improved.

CN122332267APending Publication Date: 2026-07-03INSPUR GENERSOFT CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-03-11
Publication Date
2026-07-03

AI Technical Summary

Technical Problem

Existing automated test scripts for software systems cannot adapt flexibly to different test equipment and network environments, resulting in low testing efficiency. They also require high evaluation skills from the writers and are prone to interruptions or failures during the testing process.

Method used

An automated testing method for mobile software systems based on an intelligent waiting strategy is adopted. By introducing an inference engine component, the waiting time is estimated using current page feature data, mobile device feature data, and historical average waiting time. The status of the target element is judged in a loop until the maximum waiting time is reached. The test results are recorded to optimize the inference engine component.

Benefits of technology

It has achieved intelligent test waiting optimization, which has improved the efficiency and stability of automatic testing of mobile software systems, reduced invalid waiting time, optimized environment adaptation, and reduced test script debugging time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122332267A_ABST
    Figure CN122332267A_ABST
Patent Text Reader

Abstract

This invention relates to the field of automated software system testing technology, and provides an automated testing method and apparatus for mobile software systems based on an intelligent waiting strategy. The method includes: introducing an inference engine component into the automated testing project file of the mobile software system and configuring its parameters; acquiring current page feature data and the historical average waiting time of the current page scenario to form an input feature vector; calling the inference engine component and processing the input feature vector to estimate the waiting time of the current page; based on the estimated waiting time of the current page, cyclically judging the status of page elements and whether the corresponding operation was successful; if the page element is not acquired after the estimated waiting time of the current page, a retry process is initiated until a preset maximum waiting time is reached and the retry process ends. This enables intelligent optimization of test waiting, improving the efficiency of automated testing of mobile software systems.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of automated testing technology for software systems, and in particular to an automated testing method and apparatus for mobile software systems based on an intelligent waiting strategy. Background Technology

[0002] The statements in this section are merely background information related to the present invention and do not necessarily constitute prior art.

[0003] Existing automated test scripts for software systems primarily employ fixed-duration wait times. These scripts lack flexibility to adapt to varying test device performance and network environments, leading to issues such as script execution failures or prolonged periods of ineffective waiting, resulting in low testing efficiency. Furthermore, different scenarios place significant demands on the evaluation skills of the automated script writers, and repeated script debugging wastes considerable writing time. With variations in test devices and environments, excessively long wait times result in substantial periods of ineffective waiting, degrading automated testing efficiency. Conversely, excessively short wait times can easily lead to test script malfunctions, causing test interruptions or failures. Summary of the Invention

[0004] To address the aforementioned technical problems, this invention provides an automatic testing method and apparatus for mobile software systems based on an intelligent waiting strategy, which can achieve intelligent test waiting optimization and improve the efficiency of automatic testing of mobile software systems.

[0005] To achieve the above objectives, the present invention adopts the following technical solution: The first aspect of the present invention provides an automatic testing method for mobile software systems based on an intelligent waiting strategy.

[0006] In one or more embodiments, an automated testing method for a mobile software system based on an intelligent waiting strategy is provided, including: Introduce the inference engine component and configure its parameters within the automated testing project file for the mobile software system. Obtain current page feature data, mobile device feature data, and historical average waiting time for the current page scenario to form an input feature vector; The inference engine component is invoked and the input feature vector is processed to estimate the waiting time of the current page. Based on the estimated waiting time of the current page, the status of the target element on the page is checked repeatedly. If the target element on the page is not obtained after the estimated waiting time of the current page, the retry process is initiated until the preset maximum waiting time is reached and the retry process ends. When the target element of the page is obtained, page tests are performed and the execution status of the current page test is fed back to the preset sample database, so as to continuously optimize the inference engine component using the data samples in the preset sample database.

[0007] As one implementation method, within the estimated waiting time range of the current page, the target element of the page is attempted to be obtained at preset intervals. If the target element of the page is obtained, the availability of the target element is determined based on its state. If the target element of the page is not obtained or the target element is unavailable, the process continues to wait.

[0008] As one implementation method, a data model is constructed to pre-store page feature data, mobile device feature data, and historical average waiting time for page scenarios.

[0009] In one implementation, the page feature data includes page context, page package name, page source code data, whether the target element of the page is clickable, and whether the target element is available.

[0010] In one implementation, the mobile device feature data includes the current mobile device CPU utilization rate and the current mobile device memory usage rate.

[0011] As one implementation method, the maximum waiting time is set to: an adaptive adjustment coefficient. The calculation consists of: base waiting time + network latency compensation time + safety margin time; where base waiting time, network latency compensation time, and safety margin time are all known data; the adaptive adjustment coefficient is a positive number greater than or equal to 1, which is positively correlated with server response time and system load.

[0012] As one implementation method, the inference engine component is pre-embedded with the following: the regression coefficients of the regression model are determined by fitting a sample dataset consisting of page feature data, mobile device feature data, historical average waiting time of page scene and its corresponding actual page waiting time; wherein, the page feature data and mobile device feature data are both normalized to the range of [0,1].

[0013] As one implementation, the inference engine component pre-embeds a pre-trained neural network model, which is used to characterize the relationship between current page feature data, mobile device feature data, historical average waiting time of the current page scene, and the estimated waiting time of the current page; wherein, the parameters of the pre-trained neural network model are obtained by training according to a preset loss function and in combination with a sample dataset consisting of page feature data, mobile device feature data, historical average waiting time of the page scene, and the corresponding actual waiting time of the page.

[0014] A second aspect of the present invention provides an automatic testing device for mobile software systems based on an intelligent waiting strategy.

[0015] In one or more embodiments, an automatic testing device for a mobile software system based on an intelligent waiting strategy includes: The inference engine component configuration module is used to import the inference engine component and configure its parameters in the automatic test project file of the mobile software system. The input feature vector construction module is used to obtain the current page feature data, mobile device feature data, and the historical average waiting time of the current page scene to form the input feature vector. The waiting time estimation module is used to call the inference engine component and process the input feature vector to estimate the waiting time of the current page. The target element acquisition module is used to repeatedly determine the status of the target element on the page based on the estimated waiting time of the current page. If the target element is not acquired after the estimated waiting time of the current page is exceeded, the retry process is initiated until the preset maximum waiting time is reached and the retry process ends. The inference engine component optimization module is used to perform page tests when the target element of the page is obtained and to feed back the execution status of the current page test to the preset sample database, so as to continuously optimize the inference engine component using the data samples in the preset sample database.

[0016] A third aspect of the present invention provides an electronic device.

[0017] An electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the steps in the automatic testing method for a mobile software system based on an intelligent waiting strategy as described above.

[0018] Compared with the prior art, the beneficial effects of the present invention are: This invention provides an automated testing method for mobile software systems based on an intelligent waiting strategy. It pre-introduces an inference engine component into the automated testing project file of the mobile software system. The inference engine component processes current page feature data, mobile device feature data, and the historical average waiting time of the current page scenario to estimate the waiting time of the current page. Simultaneously, based on the estimated waiting time, it iteratively judges the state of the target elements on the page. When the target element is obtained, page testing is performed, and the execution status of the current page test is fed back to a preset sample database. This allows for continuous optimization of the inference engine component using data samples from the preset sample database. This solves the problem of test interruptions or failures caused by test script failures, achieving intelligent test waiting optimization and improving the efficiency of automated testing of mobile software systems. Attached Figure Description

[0019] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.

[0020] Figure 1 This is a flowchart of an automatic testing method for a mobile software system based on an intelligent waiting strategy, according to an embodiment of the present invention. Figure 2 This is a schematic diagram of the structure of an automatic testing device for a mobile software system based on an intelligent waiting strategy according to an embodiment of the present invention. Figure 3 This is a schematic diagram of an electronic device according to an embodiment of the present invention. Detailed Implementation

[0021] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0022] It should be noted that the following detailed description is illustrative and intended to provide further explanation of the invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.

[0023] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of exemplary embodiments according to the invention. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.

[0024] This invention addresses the problems mentioned in the background section by providing an environment-aware adaptive intelligent waiting mechanism. It can estimate the expected waiting time based on current page feature data, mobile device feature data, and the historical average waiting time of the current page scene, and uses a traditional waiting mechanism as a backup, thereby improving overall testing efficiency and enhancing the stability of automated test scripts.

[0025] While existing technologies (application number 202411588030.9) propose dynamic waiting and visual AI-assisted localization based on environmental parameters (operating system, hardware, network), their solutions focus more on element localization problems in general software testing environments. Moreover, their system architecture is complex, involving visual model training and multi-strategy fusion, and is not suitable for resource-constrained mobile (especially Android) automated testing scenarios that emphasize lightweight and real-time response.

[0026] Figure 1A schematic diagram of an automatic testing method for mobile software systems based on an intelligent waiting strategy, according to an embodiment of the present invention, is provided. Figure 1 The automatic testing method for mobile software systems based on intelligent waiting strategies in this embodiment may include the following steps S101 to S105.

[0027] The specific implementation process of steps S101 to S105 is as follows: Step S101: Import the inference engine component into the mobile software system automatic test project file and configure its parameters.

[0028] In this embodiment, the mobile software system takes the CloudPlus application as an example. The CloudPlus application is a complex collaborative office mobile application that includes modules such as communication, address book, calendar, and applications. Its lightweight application module integrates customized lightweight applications for enterprises, such as check-in, workflow approval, and attendance. As the CloudPlus application's functions become increasingly sophisticated, manual testing becomes more cumbersome, and automated test scripts become increasingly large and complex. However, existing automated test scripts mainly use a method of putting the current thread into a blocked state for a fixed duration to wait for page refreshes and changes. This traditional waiting mechanism has significant limitations and is highly unreliable. Different scenarios also place high demands on the evaluation capabilities of automated script writers, and repeated script debugging wastes a significant amount of script writing time.

[0029] In other embodiments, the mobile software system may also use other application software as examples, which will not be described in detail here.

[0030] In this embodiment, the inference engine component adopts ONNX Runtime; ONNX Runtime is a lightweight, efficient, intelligent waiting mechanism that can sense the device status in real time and has self-learning capabilities. In particular, it uses historical waiting time as data to strengthen the training of machine models, making the models more and more accurate with use, and specifically solves the problems of waiting efficiency and stability in Android automated testing.

[0031] ONNX Runtime is a cross-platform inference engine specifically designed for executing models in the Open Neural NetworkExchange (ONNX) format. Open-sourced and maintained by Microsoft, it is a widely adopted deployment standard in the industry. It features cross-platform support (Windows / Linux / macOS, etc.), multiple languages ​​(Java, Python, C++, C#, JavaScript, etc.), millisecond-level low latency, and lightweight efficiency. It is now widely used in IoT devices, edge computing for industrial quality inspection, mobile devices such as AI functions in mobile apps (beauty filters, translation), Office smart functions, and design software.

[0032] In the specific implementation of step S101, the ONNX Runtime component is introduced into the pom.xml file of the Java automated testing project, and the ONNX Runtime dependency is configured. The pom.xml file acts as a "functional building block" in the Java project, adding various tools and capabilities. In the project, only the identifier and version information of the toolkit need to be configured in the pom.xml file to load the toolkit into the local tool library. During actual development, only the implementation of business logic needs to be focused on, and the preset functions can be achieved by calling some methods of the toolkit configured in this file at set times. This embodiment introduces the ONNX Runtime component, which allows the ONNXRuntime native library (written in C++) to be called after extracting page features, thereby achieving inference performance close to native code in the Java environment.

[0033] Step S102: Obtain the current page feature data, mobile device feature data, and the historical average waiting time of the current page scene to form an input feature vector.

[0034] In the specific implementation process, a data model is built to pre-store page feature data, mobile device feature data, and historical average waiting time for page scenarios.

[0035] The page feature data includes the page context, page package name (activity), page source code data, and whether the target element on the page is clickable and enabled. The mobile device feature data includes the current mobile device's CPU usage and memory usage.

[0036] It's important to note here that the target elements mainly include page components such as text boxes and buttons. For example, when sending a message, initially, `clickable=true` and `enabled=false` indicate that the "Send" button component has been rendered, but the input box is empty. While the user is entering text, `clickable=true` and `enabled=true` indicate that the input box contains content, and the "Send" button is clickable at any time. After the user clicks the "Send" button, `clickable=true` and `enabled=false` indicate that the message is being processed, preventing duplicate sending. Similarly, for the "Login" button, `enabled=true` (to avoid disabling it and causing form data to fail to serialize), but if the user hasn't checked prerequisite options such as "User Agreement" or "Privacy Policy," then `clickable=false`, and it remains clickable until these prerequisites are completed. Of course, in actual testing, this doesn't apply to all scenarios, and intelligent waiting is necessary.

[0037] In some specific implementations, the page context is mainly obtained through the Appium native API tool, and the value is generally WEBVIEW (web page) or NATIVE_APP (application native page). The page package name (activity) is obtained through the test configuration file, or by first obtaining the source code and extracting the package name using regular expressions. The page source code data is also obtained through the Appium native API tool, then dehazed and converted to a hexadecimal string for easy storage. Whether a target element is clickable or enabled is determined primarily by obtaining the target element's attribute values. The current device's CPU usage and memory usage are obtained via the command line of the ADB performance monitoring tool. The historical average wait time for the current page scene is the historical average wait time for each time the program runs this scene, with an initial value of 3 seconds.

[0038] Step S103: Invoke the inference engine component and process the input feature vector to estimate the waiting time of the current page.

[0039] In an optional embodiment, the inference engine component pre-embeds a feature whereby the regression coefficients of the regression model are determined by fitting a sample dataset consisting of page feature data, mobile device feature data, the historical average waiting time of a page scene, and its corresponding actual page waiting time; wherein, both the page feature data and the mobile device feature data are normalized to the range [0,1]. The regression model here can be implemented using a linear regression model.

[0040] This enables the estimation of the current page's waiting time, taking into account page feature data, mobile device feature data, and the historical average waiting time of the page scenario. It automatically performs inference calculations in real time, without requiring developers to concern themselves with the underlying model parsing, operator optimization, or hardware acceleration details.

[0041] In some alternative embodiments, the inference engine component pre-embeds a pre-trained neural network model, which is used to characterize the relationship between current page feature data, mobile device feature data, and the historical average waiting time of the current page scene, and the estimated waiting time of the current page; wherein, the parameters of the pre-trained neural network model are obtained by training according to a preset loss function and in combination with a sample dataset consisting of page feature data, mobile device feature data, historical average waiting time of the page scene and its corresponding actual waiting time.

[0042] Among them, the current page feature data, mobile device feature data and the historical average waiting time of the current page scene can be encoded by an encoder to generate corresponding input feature vectors; By using a pre-trained neural network model with a known structure to process the input feature vector, the waiting time of the current page can be estimated.

[0043] The neural network model here can be implemented using the random forest algorithm or other existing neural network models, which will not be detailed here.

[0044] Step S104: Based on the estimated waiting time of the current page, repeatedly check the status of the target element of the page. If the target element of the page is not obtained after the estimated waiting time of the current page has expired, enter the retry process until the preset maximum waiting time is reached and the retry process ends.

[0045] In the specific implementation process, within the estimated waiting time range of the current page, the target element of the page is attempted to be obtained at preset intervals. If the target element of the page is obtained, the availability of the target element is determined based on its status. If the target element of the page is not obtained or the target element is unavailable, the process continues to wait.

[0046] The maximum waiting time is set as: adaptive adjustment coefficient. The calculation consists of: base waiting time + network latency compensation time + safety margin time; where base waiting time, network latency compensation time, and safety margin time are all known data; the adaptive adjustment coefficient is a positive number greater than or equal to 1, which is positively correlated with server response time and system load.

[0047] By setting a maximum wait time, we can prevent the wait time from increasing indefinitely and falling into an infinite waiting state. If the element is still not obtained after a retry, an exception is thrown. This ensures both the smooth execution of the test script and the effective recording of test model data, thereby improving the accuracy of the prediction model.

[0048] Step S105: When the target element of the page is obtained, the page test is performed and the execution status of the current page test is fed back to the preset sample database, so as to continuously optimize the inference engine component using the data samples in the preset sample database.

[0049] For example, the actual execution status is recorded, including whether it was successful and the actual waiting time. This feature data is recorded in a .json file, providing more data support for model learning within the inference engine component. This allows the model within the inference engine component to be continuously optimized, making subsequent waiting time estimates more accurate. The model file within the inference engine component is the training model file generated by executing the training script. The process is as follows: A .json file containing a large amount of test data is generated through continuous testing; the training script is executed to train and generate model data based on the .json file; subsequently, each test execution loads the trained model for prediction, thus forming a complete closed loop.

[0050] This embodiment implements efficient and low-latency machine learning capabilities in Java test scripts. It intelligently assesses waiting times based on device performance and historical latency, significantly reducing unnecessary waiting time and improving overall testing efficiency. Real-time performance data such as CPU utilization and memory usage are obtained through performance monitoring tools, allowing for flexible control of waiting times and effectively preventing component retrieval failures due to memory constraints. A traditional waiting mechanism is used as a backup, with data recorded each time to optimize the model and continuously improve test execution reliability. This flexible intelligent waiting mechanism eliminates the need for continuous code modifications, optimizes environment adaptation, and reduces test script debugging time.

[0051] This embodiment provides an automated testing method for mobile software systems based on an intelligent waiting strategy. It pre-introduces an inference engine component into the automated testing project file of the mobile software system. The inference engine component processes the current page feature data, mobile device feature data, and the historical average waiting time of the current page scenario to estimate the waiting time of the current page. Simultaneously, based on the estimated waiting time, it iteratively judges the state of the target elements on the page. When the target element is obtained, page testing is performed, and the execution status of the current page test is fed back to a preset sample database. This allows for continuous optimization of the inference engine component using data samples from the preset sample database. This solves the problem of test interruptions or failures caused by test script failures, achieving intelligent test waiting optimization and improving the efficiency of automated testing of mobile software systems.

[0052] like Figure 2 As shown, the automatic testing device for mobile software systems based on intelligent waiting strategies provided in this embodiment of the invention can be implemented in software. The automatic testing device for mobile software systems based on intelligent waiting strategies includes the following software modules: inference engine component configuration module 201, input feature vector construction module 202, waiting time estimation module 203, target element acquisition module 204, and inference engine component optimization module 205.

[0053] The functions of each software module in the automatic testing device for mobile software systems based on intelligent waiting strategies are described below: The inference engine component configuration module 201 is used to import the inference engine component and configure its parameters in the automatic test project file of the mobile software system. The input feature vector construction module 202 is used to obtain the current page feature data, mobile device feature data and the historical average waiting time of the current page scene to form the input feature vector. The waiting time estimation module 203 is used to call the inference engine component and process the input feature vector to estimate the waiting time of the current page. The target element acquisition module 204 is used to cyclically determine the status of the target element on the page based on the estimated waiting time of the current page. If the target element on the page is not acquired after the estimated waiting time of the current page is exceeded, the retry process is entered until the preset maximum waiting time is reached and the retry process ends. The inference engine component optimization module 205 is used to perform page tests when the target element of the page is obtained and to feed back the execution status of the current page test to the preset sample database, so as to continuously optimize the inference engine component using the data samples in the preset sample database.

[0054] It should be noted that each module in the automatic testing device for mobile software systems based on intelligent waiting strategy in this embodiment corresponds one-to-one with each step in the automatic testing method for mobile software systems based on intelligent waiting strategy in the above embodiment, and their specific implementation processes are the same, so they will not be repeated here.

[0055] This embodiment provides an automated testing method for mobile software systems based on an intelligent waiting strategy. It pre-introduces an inference engine component into the automated testing project file of the mobile software system. The inference engine component processes the current page feature data, mobile device feature data, and the historical average waiting time of the current page scenario to estimate the waiting time of the current page. Simultaneously, based on the estimated waiting time, it iteratively judges the state of the target elements on the page. When the target element is obtained, page testing is performed, and the execution status of the current page test is fed back to a preset sample database. This allows for continuous optimization of the inference engine component using data samples from the preset sample database. This solves the problem of test interruptions or failures caused by test script failures, achieving intelligent test waiting optimization and improving the efficiency of automated testing of mobile software systems.

[0056] The structure of the electronic device according to an embodiment of the present invention will be described in detail below. Figure 3 This is a schematic diagram of the composition structure of an electronic device provided in an embodiment of the present invention. It can be understood that... Figure 3 The diagram shows only an exemplary structure of the electronic device, not the entire structure. Some or all of the structures shown may be implemented as needed.

[0057] The electronic device provided in this embodiment of the invention includes: at least one processor 301, a memory 302, a user interface 303, and at least one network interface 304. The various components in the automatic testing device for a mobile terminal software system based on an intelligent waiting strategy are coupled together via a bus system 305. It can be understood that the bus system 305 is used to realize the connection and communication between these components. In addition to a data bus, the bus system 305 also includes a power bus, a control bus, and a status signal bus. However, for clarity, in... Figure 3 The general designated all buses as Bus System 305.

[0058] The user interface 303 may include a monitor, keyboard, mouse, trackball, click wheel, buttons, touchpad, or touch screen.

[0059] It is understood that memory 302 can be volatile memory or non-volatile memory, or both. In this embodiment of the invention, memory 302 is capable of storing data to support the operation of the terminal. Examples of this data include any computer programs used to operate on the terminal, such as operating systems and applications. The operating system includes various system programs, such as framework layers, core library layers, driver layers, etc., used to implement various basic services and handle hardware-based tasks. Applications can include various applications.

[0060] In some embodiments, the automatic testing device for mobile software systems based on intelligent waiting strategies provided in this invention can be implemented using a combination of hardware and software. As an example, the automatic testing device for mobile software systems based on intelligent waiting strategies provided in this invention can be a processor in the form of a hardware decoding processor, programmed to execute the automatic testing method for mobile software systems based on intelligent waiting strategies provided in this invention. For example, the processor in the form of a hardware decoding processor can employ one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), or other electronic components.

[0061] As an example, processor 301 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., wherein the general-purpose processor can be a microprocessor or any conventional processor, etc.

[0062] As an example of the hardware implementation of the automatic testing device for mobile software systems based on intelligent waiting strategy provided in this embodiment of the invention, the device provided in this embodiment of the invention can be directly executed by a processor 301 in the form of a hardware decoding processor. For example, it can be executed by one or more application specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), or other electronic components to implement the automatic testing method for mobile software systems based on intelligent waiting strategy provided in this embodiment of the invention.

[0063] The memory 302 in this embodiment of the invention is used to store various types of data to support the operation of the automatic testing device for mobile software systems based on intelligent waiting strategies, or to store data for execution. Figure 1 The program code for the method shown. Examples of this data include: any executable instructions for operation on an automated testing device for mobile software systems based on an intelligent waiting strategy, such as executable instructions that can be included in the executable instructions, implementing the automated testing method for mobile software systems based on an intelligent waiting strategy according to embodiments of the present invention.

[0064] Specifically, according to embodiments of this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program including functions for executing... Figure 1 The program code for the method shown. In such an embodiment, the computer program can be downloaded and installed from a network via a communication component, and / or installed from a removable medium. When the computer program is executed by the central processing unit, it performs the various functions defined in the apparatus of this application.

[0065] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, as well as combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart. Figure 1One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0066] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. An automated testing method for mobile software systems based on an intelligent waiting strategy, characterized in that, include: Introduce the inference engine component and configure its parameters within the automated testing project file for the mobile software system. Obtain current page feature data, mobile device feature data, and historical average waiting time for the current page scenario to form an input feature vector; The inference engine component is invoked and the input feature vector is processed to estimate the waiting time of the current page. Based on the estimated waiting time of the current page, the status of the target element on the page is checked repeatedly. If the target element on the page is not obtained after the estimated waiting time of the current page, the retry process is initiated until the preset maximum waiting time is reached and the retry process ends. When the target element of the page is obtained, page tests are performed and the execution status of the current page test is fed back to the preset sample database, so as to continuously optimize the inference engine component using the data samples in the preset sample database.

2. The automatic testing method for mobile software systems based on intelligent waiting strategies as described in claim 1, characterized in that, Within the estimated waiting time range of the current page, the system attempts to retrieve the target element of the page at preset intervals. If the target element is retrieved, its availability is determined based on its state. If the target element is not retrieved or is unavailable, the system continues to wait.

3. The automatic testing method for mobile software systems based on intelligent waiting strategies as described in claim 1, characterized in that, Build a data model to pre-store page feature data, mobile device feature data, and historical average waiting time for page scenarios.

4. The automatic testing method for mobile software systems based on intelligent waiting strategies as described in claim 2 or 3, characterized in that, The page feature data includes page context, page package name, page source code data, whether the target element of the page is clickable, and whether the target element is available.

5. The automatic testing method for mobile software systems based on intelligent waiting strategies as described in claim 2 or 3, characterized in that, The mobile device characteristic data includes the current mobile device CPU utilization rate and the current mobile device memory usage rate.

6. The automatic testing method for mobile software systems based on intelligent waiting strategies as described in claim 1, characterized in that, Maximum waiting time is set to: adaptive adjustment coefficient The calculation consists of: base waiting time + network latency compensation time + safety margin time; where base waiting time, network latency compensation time, and safety margin time are all known data; the adaptive adjustment coefficient is a positive number greater than or equal to 1, which is positively correlated with server response time and system load.

7. The automatic testing method for mobile software systems based on intelligent waiting strategies as described in claim 1, characterized in that, The inference engine component is pre-embedded with the following: the regression coefficients of the regression model are determined by fitting a sample dataset consisting of page feature data, mobile device feature data, historical average waiting time of page scene and its corresponding actual waiting time; wherein, the page feature data and mobile device feature data are both normalized to the range of [0,1].

8. The automatic testing method for mobile software systems based on intelligent waiting strategies as described in claim 1, characterized in that, The inference engine component pre-embeds a pre-trained neural network model, which is used to represent the relationship between the current page feature data, mobile device feature data, and the historical average waiting time of the current page scene, and the estimated waiting time of the current page; wherein, the parameters of the pre-trained neural network model are obtained by training according to a preset loss function and in combination with a sample dataset consisting of page feature data, mobile device feature data, historical average waiting time of the page scene and its corresponding actual waiting time.

9. An automatic testing device for mobile software systems based on an intelligent waiting strategy, characterized in that, The automatic testing method for mobile software systems based on intelligent waiting strategies as described in any one of claims 1-8 includes: The inference engine component configuration module is used to import the inference engine component and configure its parameters in the automatic test project file of the mobile software system. The input feature vector construction module is used to obtain the current page feature data, mobile device feature data, and the historical average waiting time of the current page scene to form the input feature vector. The waiting time estimation module is used to call the inference engine component and process the input feature vector to estimate the waiting time of the current page. The target element acquisition module is used to repeatedly determine the status of the target element on the page based on the estimated waiting time of the current page. If the target element is not acquired after the estimated waiting time of the current page is exceeded, the retry process is initiated until the preset maximum waiting time is reached and the retry process ends. The inference engine component optimization module is used to perform page tests when the target element of the page is obtained and to feed back the execution status of the current page test to the preset sample database, so as to continuously optimize the inference engine component using the data samples in the preset sample database.

10. An electronic 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 program, it implements the steps in the automatic testing method for mobile software systems based on intelligent waiting strategies as described in any one of claims 1-8.

Citation Information

Patent Citations

  • Automatic intelligent testing system and method for software application

    CN119127719A