Mobile application function property testing method based on multiple exploration strategies

Through the mobile application functional properties testing method based on multi-exploration strategy, PDL is used to define functional properties and design exploration strategies, the problem that existing automation testing tools are difficult to detect non-crash function errors is solved, and a comprehensive test of mobile applications is achieved. Improves the reliability and efficiency of the application.

CN119226169APending Publication Date: 2024-12-31EAST CHINA NORMAL UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411379315.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2024-12-31

AI Technical Summary

Technical Problem

Existing mobile application automation testing tools are difficult to effectively detect non-crash function errors, resulting in the failure to fully cover the functional errors of mobile applications, which are costly and inefficient.

Method used

The functional properties testing method of mobile application based on multi-exploration strategies is adopted, functional properties are defined through the software functional properties description language (PDL), and a random exploration and main path guidance strategy is designed to generate event sequences to detect functional errors.

Benefits of technology

It realizes effective detection of functional errors of mobile applications, improves the robustness and reliability of applications, reduces testing costs, and has a wider coverage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119226169A_ABST
    Figure CN119226169A_ABST
Patent Text Reader

Abstract

The invention discloses a mobile application function property testing method based on multiple exploration strategies, which comprises the following steps: firstly, defining one or more function properties of a tested mobile application through a mobile application software function property description language, and then testing whether the properties of the tested mobile application are violated or not through two exploration strategies. The random exploration strategy generates a random event to explore in a wider graphical user interface state space; a main path guiding exploration strategy needs to define a main path which reaches a target mobile application property precondition along a mobile application program entry and is used for guiding a subsequent mobile application exploration process. In the whole exploration and test process, a property test result and an interface screenshot recorded in the process are recorded. Finally, the system automatically generates a defect report of the mobile application properties. The method is used for verifying the function correctness of the mobile application program, functional errors of the mobile application can be effectively and widely tested, and the robustness and reliability of the mobile application are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of mobile software automated testing, and relates to an automated testing method for mobile application software, and specifically to a mobile application functional property testing method based on a multi-exploration strategy. Background Art

[0002] Mobile applications are an event-driven program based on a graphical user interface. They have penetrated into every aspect of people's lives and provided convenient help for daily life. Due to the dependence of users on mobile applications in their lives, their practicality has also been widely valued by the industry. Major companies in the industry have taken measures to ensure the quality and reliability of applications. However, due to the limitations of test prediction and other issues, applications are often not fully tested. Recent studies have shown that non-crash functional errors account for as much as 65.4% of errors in mobile applications. Therefore, how to effectively ensure the functional correctness of mobile applications has become a key issue.

[0003] The most common way in the industry is to verify functional correctness through manual testing, which usually includes writing UI test scripts or interacting directly with mobile apps. Testers compare expected behavior with actual behavior to identify potential inconsistencies or functional errors. Obviously, manual testing is costly and has limited coverage, usually covering only the main functional paths of mobile apps, and may miss critical functional errors. In contrast, automated testing can automatically explore mobile applications with high efficiency and low cost, but due to the lack of clear test predictions, most existing automated testing tools can only detect crash errors through exceptions thrown by mobile apps, so it is very difficult to find non-crash functional errors. Although some automated testing tools generate test predictions through heuristic methods to detect some non-crash errors, these predictions often have difficulty in discovering more complex functional problems. Summary of the invention

[0004] In order to overcome the above-mentioned defects in the existing field of mobile application automated testing technology, the present invention proposes a mobile application functional property testing method based on a multi-exploration strategy. The method uses the software functional property description language (PDL) to define the software functional properties, and designs two strategies to guide the generation of interactive operation sequences during the test process, so as to more effectively detect functional errors in mobile applications.

[0005] In order to achieve more effective detection of functional errors in mobile applications.

[0006] The specific technical solution for achieving the purpose of the present invention is:

[0007] A method for testing the functional properties of a mobile application based on a multi-exploration strategy comprises the following steps:

[0008] Step 1: Analyze the functional characteristics and test objectives of the mobile application under test, and use the software functional property description language to define the functional property set of the mobile application under test. Each functional property includes precondition P, interaction scenario I and postcondition Q;

[0009] Step 2: Calculate the precondition union ∪P of the functional property set, set the maximum test execution time and the maximum number of execution events, and select the exploration strategy. If the random exploration strategy is selected, proceed to step 3; if the main path guidance strategy is selected, define a user event sequence as the main path according to the precondition P, and continue to step 4;

[0010] Step 3: Use the random exploration strategy to generate event sequences, perform property detection, and record the corresponding test results and user interface screenshots until the maximum test execution time is reached, and then proceed to step 5;

[0011] Step 4: Use the main path guidance strategy to generate an event sequence, perform property detection, and record the corresponding test results and user interface screenshots until the maximum test execution time is reached, and then execute step 5;

[0012] Step 5: Automatically generate a defect report for the tested mobile application based on the test results and user interface screenshots.

[0013] Further, the step 3 specifically includes the following steps:

[0014] Step A1: determine whether the maximum test execution time has been reached. If so, terminate the test. Otherwise, determine whether the maximum number of events has been reached. If not, obtain the current state of the tested mobile application and proceed to step A2. If the maximum number of events has been reached, restart the mobile application.

[0015] Step A2: Determine whether the current state of the mobile application under test satisfies one or more preconditions P; if no preconditions are met or no property detection is performed, continue to step A3; otherwise, execute the event sequence defined in the interaction scenario I, determine whether the postcondition Q is met, and return to step A1;

[0016] Step A3: Use an external user interface interaction tool to analyze the current interface state to obtain an executable event list, randomly select an event from the executable event list, and send it to the tested mobile application for execution, and return to step A1.

[0017] Further, the step 4 specifically comprises the following steps:

[0018] Step B1: Each event e in the main path i Sent to the mobile application under test, the state sequence of the main path is obtained as S = [s0, s1, s2, ..., s n], so that the mobile application under test reaches the state s that satisfies the precondition P n ;

[0019] Step B2: Determine whether the maximum test execution time has been reached. If so, terminate the test. Otherwise, follow S = [s0, s1, s2, ..., s n ]Explore the mobile application in reverse order; if all states in S are explored, initialize the tested mobile application; otherwise, take out an unexplored state s in reverse order i , send the corresponding preceding event sequence [e1,e2,…,e i ], so that the mobile application under test reaches the main path state s i , proceed to step B3;

[0020] Step B3: With state s i As the starting state of exploring the tested mobile application, determine whether the current number of executed events reaches the maximum number of executed events. If not, obtain the current state of the tested mobile application and continue to step B4. If reached, execute B6.

[0021] Step B4: Determine whether the current state of the tested mobile application satisfies one or more preconditions P; if no preconditions are met or no property detection is performed, continue to step B5; otherwise, execute the event sequence defined in the interaction scenario I, determine whether the postcondition Q is met, and return to step B3;

[0022] Step B5: Use an external user interface interaction tool to analyze the current interface state to obtain an executable event list, randomly select an event from the executable event list, and send it to the tested mobile application for execution, and return to step B3;

[0023] Step B6: Determine whether the current state can be converted to state s n , if yes, then send the corresponding event to the mobile application under test so that the state of the mobile application under test meets the precondition;

[0024] Step B7: Check whether the current state meets the preconditions, and if so, perform property test;

[0025] Step B8: Restart the mobile application and return to step B2.

[0026] The testing method of the present invention has the following beneficial effects:

[0027] The present invention introduces a testing technology for the functional properties of mobile applications based on a multi-exploration strategy, which is used to verify the functional correctness of mobile application programs. The present invention can effectively and extensively test the functional errors of mobile applications and improve the robustness and reliability of mobile applications.

[0028] In order to explore and test the functional properties of mobile applications more efficiently, the present invention designs two UI exploration strategies, random exploration and main path guided exploration strategy. Specifically, the random exploration strategy randomly explores the application in a wide exploration space. The main path guided exploration strategy is inspired by the typical process of manual testing (tester usually follows the main path from the application entry to the target application function for functional testing). If this exploration strategy is used, the user can complete the definition of the main path corresponding to the property while specifying the functional properties of the mobile application under test, thereby effectively guiding the exploration process of the application and exploring other adjacent paths along the main path to more effectively verify the correctness of the mobile application function. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Figure 1 is a flow chart of the random exploration strategy of the present invention;

[0030] Figure 2 is a flow chart of the main path guided exploration strategy of the present invention;

[0031] Figure 3 is a schematic diagram of an embodiment of the main path guidance exploration strategy of the present invention;

[0032] Figure 4 is a schematic diagram of an embodiment of the testing process of the present invention;

[0033] Figure 5 It is a schematic diagram of an embodiment of the main path definition of the main path guided exploration strategy of the present invention. DETAILED DESCRIPTION

[0034] The present invention is further described in detail with reference to the following specific examples and drawings. The process, conditions, experimental methods, etc. for implementing the present invention, except for the contents specifically mentioned below, are all common knowledge and common common sense in the art and are not particularly limited by the present invention.

[0035] The present invention provides a mobile application functional property testing method based on multiple exploration strategies. PDL is used as the main method for defining software functional properties, and two application exploration strategies, random exploration strategy and main path guided exploration strategy, are designed to guide the generation of interactive operation sequences during the test process, so as to more effectively complete the detection of mobile application functional errors, specifically including:

[0036] Step 1: Analyze the functional characteristics and test objectives of the mobile application under test, and use the software functional property description language to define the set of functional properties of the mobile application under test. Each functional property includes a precondition P, an interaction scenario I, and a postcondition Q.

[0037] Step 2: Calculate the precondition union ∪P of the functional property set, set the maximum test execution time and the maximum number of execution events, and select the exploration strategy. If the random exploration strategy is selected, proceed to step 3; if the main path guidance strategy is selected, define a user event sequence as the main path according to the precondition P, and continue to step 4;

[0038] Step 3: Use the random exploration strategy to generate event sequences, perform property detection, and record the corresponding test results and user interface screenshots until the maximum test execution time is reached, and then execute step 5;

[0039] Step 4: Generate an event sequence using the main path guidance strategy, perform property detection, and record the corresponding test results and user interface screenshots until the maximum test execution time is reached, and then execute step 5;

[0040] Step 5: Automatically generate a defect report for the tested mobile application based on the test results and user interface screenshots.

[0041] In step 1, the use of PDL to define the functional properties of the mobile application can first be based on the needs to choose whether to set the initialization operation before the test at this stage, and use the PDL decorator to complete the definition of the initialization function. In addition, after deciding the mobile application to be tested and the functional properties of the software, use PDL to complete the property φ =<P,I,Q> The definition of a mobile application can also be used to define one or more functional properties according to the needs. The functional properties of mobile applications mainly consist of three parts: preconditions, interaction scenarios, and postconditions. The details are:

[0042] Precondition P: Defines the prerequisites under which the automation testing tool can start executing interaction scenarios to perform application functional testing.

[0043] Interaction Scenarios I: Define the interaction scenarios that need to be performed to verify the functional properties of the application.

[0044] Postcondition Q: defines the expected state that the mobile application needs to reach after all the interaction scenarios that need to be executed. In step 2, the union of all defined preconditions ∪P is first calculated, which is used to simultaneously determine the satisfaction of all defined properties in the subsequent process. In addition, the present invention mainly involves two exploration strategies to choose from, a random exploration strategy and a main path guided exploration strategy. The user selects an exploration strategy according to needs and then starts subsequent operations. If the random exploration strategy is selected, execute step 3. If the main path guided strategy is selected, a user event sequence is defined as the main path according to the precondition P, and continue to execute step 4.

[0045] The main path must be defined in JSON format. It must also be ensured that the end state of the main path meets the preconditions of the mobile application properties defined in step 1.

[0046] Step 3 mainly uses a random exploration strategy to generate event sequences for mobile applications based on the software functional properties defined in step 1, performs property detection, and records the corresponding test results and user interface screenshots until the maximum test execution time is reached. The process of this exploration strategy is as follows Figure 1 , the detailed steps are as follows:

[0047] Step A1: determine whether the maximum test execution time has been reached. If so, terminate the test. Otherwise, determine whether the maximum number of events has been reached. If not, obtain the current state of the tested mobile application and proceed to step A2. If the maximum number of events has been reached, restart the mobile application.

[0048] Step A2: Determine whether the current mobile application state satisfies one or more preconditions P. If no preconditions are met or no property detection is performed, continue to step A3; otherwise, execute the event sequence defined in the interaction scenario I, determine whether the postcondition Q is met, and return to step A1;

[0049] Step A3: Use an external user interface interaction tool to analyze the current interface state to obtain an executable event list, randomly select an event from the executable event list, and send it to the tested mobile application for execution, and return to step A1; Table 1 shows some event types;

[0050] Table 1 Common event types

[0051] Event Type Event Usage click() Click Actions long_click() Long press operation set_text() Enter text clear_text() Clear Text swipe() Slide Operation drag() Drag Operation press() Key Operation rotate() Rotation Operation screenshot() Screen capture operation

[0052] Step 4 mainly uses the main path guided exploration strategy to generate event sequences for the tested mobile application based on the software functional properties defined in step 1, performs property detection, and records the corresponding test results and user interface screenshots until the maximum test execution time is reached. In addition to receiving the property φ of step 1 as input, the exploration strategy also needs to input a main path user event sequence E = [e1, e2, ..., e n ]. This strategy guides the exploration process to traverse backward along the main path and explore the mobile application states close to the main path. The process of this exploration strategy is as follows Figure 2 , the detailed steps are as follows:

[0053] Step B1: Each event e in the main path i Sent to the mobile application under test, the state sequence of the main path is obtained as S = [s0, s1, s2, ..., s n ], so that the mobile application under test reaches the state s that satisfies the precondition P n ;

[0054] Step B2: Determine whether the maximum test execution time has been reached. If so, terminate the test. Otherwise, follow S = [s0, s1, s2, ..., s n ]Explore the application in reverse order. If all states in S are explored, initialize the mobile application under test; otherwise, take out an unexplored state s in reverse order. i , send the corresponding preceding event sequence [e1,e2,……,e i ], so that the mobile application under test reaches the main path state s i , proceed to step B3;

[0055] Step B3: With state s i As the starting state of exploring the tested mobile application, determine whether the current number of executed events reaches the maximum number of executed events. If not, obtain the current state of the tested mobile application and continue to step B4. If reached, execute B6.

[0056] Step B4: Determine whether the current state of the tested mobile application satisfies one or more preconditions P. If no preconditions are met or no property detection is performed, continue to step B5; otherwise, execute the event sequence defined in the interaction scenario I, determine whether the postcondition Q is met, and return to step B3;

[0057] Step B5: Use an external user interface interaction tool to analyze the current interface state to obtain an executable event list, randomly select an event from the executable event list, and send it to the tested mobile application for execution, and return to step B3;

[0058] Step B6: Determine whether the current state can be converted to state s n ,If it is possible, the corresponding event is sent to the tested mobile application so that the state of the mobile application satisfies the precondition;

[0059] In order to more clearly demonstrate the above process of the strategy, Figure 3 Let’s analyze this process in detail.

[0060] Let s0 be the initial exploration state of the mobile application under test, the main path is E = [e1, e2, e3, e4], and the property is φ =<P,I,Q> . In the first iteration, the strategy will send all events of E and arrive at s4 with s4|=P. The states that satisfy P are marked in gray. The strategy then guides random exploration starting from s4. Assume that it generates e5 on s4 and arrives at s5. Assuming s5|=Q, the strategy may decide to execute I to obtain the end state s6 and check the postcondition Q on this state. Assuming s6|=Q, it means that no property errors are found. At this time, assuming that the number of execution events of e5 and I exceeds the pre-defined maximum number of events, the strategy will stop random exploration and try to navigate to the main path that satisfies P. Assuming that the events in E cannot be sent on s6, the strategy will abandon the navigation process and start the second iteration. In the second and third iterations, it will start from s3 and s2 respectively, and perform a similar process to the first iteration. In the fourth iteration, start from s1. Assume that the process explores s1 by generating two random events e6 and e7, e6→s7 e7→s8, but neither s7 nor s8 satisfies the precondition P, then this policy attempts to navigate back to follow the main path that satisfies P. Assume that the process finds that e3 can be sent on s8. It will send e3 and e4 in turn to try to follow the main path. Assuming that s4 is finally reached, which satisfies P, this policy will execute I and check the postcondition Q on the end state s9. If the postcondition is not true, it indicates that a functional property error has been found.

[0061] Step B7: Check whether the current state meets the preconditions, and if so, perform property test;

[0062] Step B8: Restart the mobile application and return to step B2.

[0063] In step 5, a defect report is generated. According to the functional property test results obtained in the previous step and the record of the interface screenshot, the present invention automatically generates a property defect report of the mobile application. The report shows the complete test process interface screenshot in detail. It also contains an error list. Clicking the relevant error link will jump the user to the corresponding screenshot location.

[0064] Example 1

[0065] This example uses OmniNotes, a popular note-taking mobile application open sourced on GitHub, as an object. OmniNotes is an application for recording and managing notes. Here, a random exploration strategy of a mobile application functional property testing method based on multiple exploration strategies is specifically described by an example:

[0066] Step 1: Define the properties of the mobile application using PDL: After deciding the properties to be tested and the mobile application, use PDL to fully define the properties of the software.

[0067] One of the main functions of the OmniNotes application is that users can create notes, add note tags, and delete tags. For the basic function of deleting note tags, PDL is used to define the functional property that "after deleting a tag, the tag should be successfully deleted, and the annotation content of other tags should remain unchanged." The precondition P is when the application state is in a state where the tag can be deleted, that is, there is a "#" in the text box and there is a button with the id "tag_button" in the interface. The interactive scenario I is the detailed execution operation of how to delete a tag, such as deleting the tag "Tag1". The postcondition Q is the expected result after deleting the tag, that is, the tag to be deleted is deleted in the text box, and other contents remain unchanged. Since using PDL to define the functional properties of the software is a basic operation of PDL, a detailed introduction to the use of PDL is not given here.

[0068] Step 2: Calculate the precondition union ∪P of the functional property set, set the maximum test execution time and the maximum number of execution events, and select the exploration strategy. If the random exploration strategy is selected, execute step 3; if the main path guidance strategy is selected, define a user event sequence as the main path according to the precondition P, and continue to execute step 4; this embodiment uses the random exploration strategy, so only execute step 3 and do not execute step 4;

[0069] Step 3: Use the random exploration strategy to generate event sequences, perform property detection, and record the corresponding test results and user interface screenshots until the maximum test execution time is reached, and then execute step 5;

[0070] Step 4: Generate an event sequence using the main path guidance strategy, perform property detection, and record the corresponding test results and user interface screenshots until the maximum test execution time is reached, and then execute step 5; this embodiment uses a random exploration strategy, so this step is skipped;

[0071] In step 5, a defect report is generated. According to the functional property test results obtained in the previous step and the record of the interface screenshot, the present invention automatically generates a property defect report of the mobile application. The report shows the complete test process interface screenshot in detail. It also contains an error list. Clicking the relevant error link will jump the user to the corresponding screenshot location.

[0072] Example 2

[0073] This example uses OmniNotes, a popular note-taking mobile application open sourced on GitHub, as an object. OmniNotes is an application for recording and managing notes. Here, an example is used to specifically illustrate the main path guided exploration strategy of a mobile application functional property testing method based on multiple exploration strategies:

[0074] Step 1: Define the properties of the mobile application using PDL: After deciding the properties to be tested and the mobile application, use PDL to fully define the properties of the software.

[0075] One of the main functions of the OmniNotes application is that users can create notes, add note tags, and delete tags. For the basic function of deleting note tags, PDL is used to define the functional property that "after deleting a tag, the tag should be successfully deleted, and the annotation content of other tags should remain unchanged." The precondition P is when the application state is in a state where the tag can be deleted, that is, there is a "#" in the text box and there is a button with the id "tag_button" in the interface. The interactive scenario I is the detailed execution operation of how to delete a tag, such as deleting the tag "Tag1". The postcondition Q is the expected result after deleting the tag, that is, the tag to be deleted is deleted in the text box, and other contents remain unchanged. Since using PDL to define the functional properties of the software is a basic operation of PDL, a detailed introduction to the use of PDL is not given here.

[0076] Step 2: Calculate the precondition union ∪P of the functional property set, set the maximum test execution time and the maximum number of execution events, and select the exploration strategy. If the random exploration strategy is selected, execute step 3; if the main path guidance strategy is selected, define a user event sequence as the main path according to the precondition P, and continue to execute step 4; this embodiment uses the main path guidance exploration strategy, so skip step 3 and only execute step 4;

[0077] according to Figure 4 As shown in (a), the main path content is: Users can create notes by clicking the floating action button on page (1) and then jump to page (2). Page (3) adds some text with a note tag ("read a book#Tag1"). Return to the note list and reopen the current note to reach page OmniNotes explicitly stores the tags in the note content. To delete a note tag, the user can click the note tag button in the upper right corner of page (3) to open the tag list, that is, page (4), uncheck the tag "Tag1" in the tag list, and then click "OK" on page (5). On page (6), you can see that the function of deleting the note tag has worked, and the text "#Tag1" has been correctly deleted from the body of the note. The content of the JSON file of the main path is as follows Figure 5 shown.

[0078] Step 3: Generate an event sequence using a random exploration strategy, perform property detection, and record the corresponding test results and user interface screenshots until the maximum test execution time is reached, and then execute step 5; this embodiment uses the main path guided exploration strategy, so this step is skipped;

[0079] Step 4: Generate an event sequence using the main path guidance strategy, perform property detection, and record the corresponding test results and user interface screenshots until the maximum test execution time is reached, and then execute step 5;

[0080] In this exploration process, different execution user events will be generated iteratively to reach a state where the properties of the application can be detected. After the exploration is completed, it is necessary to determine whether to perform property detection based on probability. Here, one of the generated valid execution user event sequences is taken as an example.

[0081] Figure 4 (b) shows one of the error triggering event traces. Create a note along the main path of the application (page (1) to page (2)), add some text ("read a book") with a tag ("Tag1"), explore the state of page (3), return to the note list and reopen the current note to reach page (4), then continue to add a second tag ("Tag2") to the note content (page (4) to page (5), click the second tag ("Tag2") on page (5). Page (5) satisfies the precondition P and can perform property testing. This instance defaults to the need for property testing after probability judgment. Pages (6) to (8) execute the interactive scenario to delete the tag "Tag1". Finally, perform the postcondition verification, and you can see that the tag "Tag1" is successfully deleted, but the tag "Tag2" is incorrectly changed to "Ta g2" (page (9), violating the postcondition and finding a functional property error. In this case, when the tag list of page (9)' is opened, the original tag "Tag2" in the tag list is changed to "Ta".

[0082] In step 5, a defect report is generated. According to the functional property test results obtained in the previous step and the record of the interface screenshot, the present invention automatically generates a property defect report of the mobile application. The report shows the complete test process interface screenshot in detail. It also contains an error list. Clicking the relevant error link will jump the user to the corresponding screenshot location.

[0083] In this embodiment, the present invention is used to complete the test of the property of the OmniNotes mobile application using the main path guided exploration strategy, "after deleting a tag, the tag should be successfully deleted, and the annotation content of other tags should remain unchanged." Finally, the error that exists is also found. This embodiment only shows the test of one software property of the application, but one or more properties can be defined at the same time during the use of the present invention.

[0084] The protection content of the present invention is not limited to the above examples. Without departing from the spirit and scope of the present invention, all changes and advantages that can be imagined in the art are included in the present invention and are protected by the attached claims.

Claims

1. A mobile application functional property testing method based on a multi-exploration strategy, characterized in that: The following steps are involved: Step 1: Analyze the functional characteristics and test objectives of the mobile application under test, and use the software functional property description language to define the functional property set of the mobile application under test. Each functional property includes precondition P, interaction scenario I and postcondition Q; Step 2: Calculate the precondition union ∪P of the functional property set, set the maximum test execution time and the maximum number of execution events, and select the exploration strategy. If the random exploration strategy is selected, proceed to step 3; if the main path guidance strategy is selected, define a user event sequence as the main path according to the precondition P, and continue to step 4; Step 3: Use the random exploration strategy to generate event sequences, perform property detection, and record the corresponding test results and user interface screenshots until the maximum test execution time is reached, and then proceed to step 5; Step 4: Use the main path guidance strategy to generate an event sequence, perform property detection, and record the corresponding test results and user interface screenshots until the maximum test execution time is reached, and then execute step 5; Step 5: Automatically generate a defect report for the tested mobile application based on the test results and the user interface screenshots; wherein: The step 3 specifically includes the following steps: Step A1: determine whether the maximum test execution time has been reached. If so, terminate the test. Otherwise, determine whether the maximum number of events has been reached. If not, obtain the current state of the tested mobile application and proceed to step A2. If the maximum number of events has been reached, restart the mobile application. Step A2: Determine whether the current state of the mobile application under test satisfies one or more preconditions P; if no preconditions are met or no property detection is performed, continue to step A3; otherwise, execute the event sequence defined in the interaction scenario I, determine whether the postcondition Q is met, and return to step A1; Step A3: Use an external user interface interaction tool to analyze the current interface state to obtain an executable event list, randomly select an event from the executable event list, and send it to the tested mobile application for execution, and return to step A1; The step 4 specifically comprises the following steps: Step B1: Each event e in the main path i Sent to the mobile application under test, the state sequence of the main path is obtained as S = [s0, s1, s2, ..., s n ], so that the mobile application under test reaches the state s that satisfies the precondition P n ; Step B2: Determine whether the maximum test execution time has been reached. If so, terminate the test. Otherwise, follow S = [s0, s1, s2, ..., s n ]Explore the mobile application in reverse order; if all states in S are explored, initialize the tested mobile application; otherwise, take out an unexplored state s in reverse order i , send the corresponding preceding event sequence [e1,e2,…,e i ], so that the mobile application under test reaches the main path state s i , proceed to step B3; Step B3: With state s i As the starting state of exploring the tested mobile application, determine whether the current number of executed events reaches the maximum number of executed events. If not, obtain the current state of the tested mobile application and continue to step B4. If reached, execute B6. Step B4: Determine whether the current state of the tested mobile application satisfies one or more preconditions P; if no preconditions are met or no property detection is performed, continue to step B5; otherwise, execute the event sequence defined in the interaction scenario I, determine whether the postcondition Q is met, and return to step B3; Step B5: Use an external user interface interaction tool to analyze the current interface state to obtain an executable event list, randomly select an event from the executable event list, and send it to the tested mobile application for execution, and return to step B3; Step B6: Determine whether the current state can be converted to state s n , if yes, then send the corresponding event to the mobile application under test so that the state of the mobile application under test meets the precondition; Step B7: Check whether the current state meets the preconditions, and if so, perform property test; Step B8: Restart the mobile application and return to step B2.