An application testing method, an electronic device, and a computer-readable storage medium
Automated script generation for NewMonkey using predefined functions addresses inefficiencies and coding barriers, enabling efficient and accessible script creation for terminal application testing.
Patent Information
- Application Number
- CN202210391217.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-14
- Publication Date
- 2025-07-15
- Estimated Expiration
- 2042-04-14
AI Technical Summary
The existing NewMonkey script generation method is inefficient and has high threshold, making it difficult for non-professional personnel to intervene, especially when there are many controls, positioning is time-consuming and manual code is required.
The PC side automatically recognizes the operation of the test application on the terminal, and uses predefined functions to generate a NewMonkey script, including operation actions and control properties, and automatically generates the script and sends it to the terminal for testing.
Improve script generation efficiency, lower programming thresholds, and enable non-professionals to participate in application testing, reducing control positioning time and manual coding requirements.
Smart Images

Figure CN114840419B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of testing, and in particular to an application testing method, an electronic device, and a computer-readable storage medium. Background Art
[0002] NewMonkey is an efficient and easy-to-use automated stability testing tool for mobile terminal applications, such as performing stability testing on a series of operations on a mobile terminal application. The NewMonkey script provides the operation implementation code for a series of operations on the mobile terminal application.
[0003] Currently, the process of generating the NewMonkey script is as follows: 1) Connect the mobile terminal to the PC (Personal Computer); 2) Click on the application under test on the mobile terminal, and use the UIAutomatorViewer tool on the PC (a tool for scanning and analyzing the UI (User Interface) controls of the terminal application) to capture the controls on the current interface of the mobile terminal, so as to display all the controls on the current interface of the mobile terminal on the PC; 3) Click on the first control to be selected among the currently displayed controls on the PC, and the attributes of the first control (information that can uniquely locate the first control) will be displayed on the PC; 4) Continue to click on the first control on the current interface of the mobile terminal, and use the UIAutomatorViewer tool on the PC to capture the controls on the current interface of the mobile terminal, so as to display all the controls on the current interface of the mobile terminal on the PC; 5) Click on the second control to be selected among the currently displayed controls on the PC, and the attributes of the second control will be displayed on the PC; and so on in a loop until the attributes of different controls under a series of operations to be tested on the application under test are obtained (for example, if the application under test is WeChat, the series of operations to be tested are: click on "Me" → click on "Services" → click on "Wallet"); 6) Based on the attributes of different controls, manually write the implementation code for the operations to be tested on the application under test according to the NewMonkey script rules to obtain the finally written NewMonkey script.
[0004] However, the existing method for generating the NewMonkey script has the following problems: 1) If there are a large number of controls in the application under test, it is very time-consuming for the user to locate the required controls from the PC, resulting in a low efficiency of generating the NewMonkey script; 2) Each operation step requires manual writing of code segments, resulting in a high threshold for code development, and it is difficult for non-professional personnel to intervene.
[0005] Therefore, how to provide a solution to the above technical problems is an issue that those skilled in the art need to solve currently. Summary of the Invention
[0006] The objective of the present application is to provide a method for testing an application program, an electronic device, and a computer-readable storage medium, which can automatically identify the operations of the application program to be tested on a terminal and automatically generate a NewMonkey script for testing the application program to be tested. The script generation efficiency is relatively high, and there is no programming threshold, so non-professionals can also intervene.
[0007] To solve the above technical problems, the present application provides a method for testing an application program, which is applied to a PC side and includes:
[0008] Identifying the operations of the application program to be tested on the terminal; wherein, the operations include operation actions and operation control attributes;
[0009] Based on predefined functions for characterizing operation actions and operation control attributes, determining the target NewMonkey function corresponding to each of the operations;
[0010] Creating a NewMonkey script and generating an operation code segment of the NewMonkey script based on the target NewMonkey function to obtain the finally generated target NewMonkey script;
[0011] Sending the target NewMonkey script to the terminal so that the terminal tests the application program to be tested based on the target NewMonkey script.
[0012] Optionally, identifying the operations of the application program to be tested on the terminal includes:
[0013] Using the UIRecord platform to identify the operations of the application program to be tested on the terminal.
[0014] Optionally, based on predefined functions for characterizing operation actions and operation control attributes, determining the target NewMonkey function corresponding to each of the operations includes:
[0015] Based on predefined UIRecord functions for characterizing operation actions and operation control attributes, determining the target UIRecord function corresponding to each of the operations;
[0016] According to the preset mapping relationship between the UIRecord function and the NewMonkey function, determining the target NewMonkey function that has a mapping relationship with the target UIRecord function.
[0017] Optionally, creating a NewMonkey script includes:
[0018] Obtaining the script name of the pre-created NewMonkey script;
[0019] Create a NewMonkey script according to the script name.
[0020] Write the fixed component code segments of the NewMonkey script into the created NewMonkey script.
[0021] Optionally, the fixed component code segments of the NewMonkey script include: a code segment for importing the dependency packages and dependency modules of the NewMonkey script, a code segment for generating a class declaration and class comments according to the script name and script description of the NewMonkey script, and a code segment for declaring the running functions and parameters of the NewMonkey script.
[0022] Optionally, generating the operation code segments of the NewMonkey script based on the target NewMonkey function includes:
[0023] Based on the target NewMonkey function corresponding to each operation of the application under test, correspondingly generate the target operation code segments corresponding to each operation;
[0024] Combine the target operation code segments according to the operation sequence of each operation to obtain the operation code segments of the NewMonkey script.
[0025] Optionally, after sending the target NewMonkey script to the terminal, the application testing method further includes:
[0026] Determine whether the target NewMonkey script meets the preset script startup conditions;
[0027] If so, send a script startup instruction to the terminal so that the terminal tests the application under test based on the target NewMonkey script only after receiving the script startup instruction.
[0028] To solve the above technical problems, the present application also provides an application testing method, which is applied to a terminal and includes:
[0029] Receive the target NewMonkey script corresponding to the application under test; wherein, the target NewMonkey script is the script generated by any of the above application testing methods;
[0030] Call the release package of the application under test based on the target NewMonkey script to test the application under test; wherein, the release package is a release package with non-obfuscated resources.
[0031] To solve the above technical problems, the present application also provides an electronic device, including:
[0032] A memory for storing a computer program;
[0033] A processor for implementing the steps of any of the above application program testing methods when executing the computer program.
[0034] To solve the above technical problems, the present application also provides a computer-readable storage medium, on which a computer program is stored, and the steps of any of the above application program testing methods are implemented when the computer program is executed by a processor.
[0035] The present application provides an application program testing method, which is applied to the PC side, to identify the operations of the application program to be tested on the terminal; the operations include operation actions and operation control properties; based on predefined functions for characterizing operation actions and operation control properties, determine the target NewMonkey function corresponding to each operation; create a NewMonkey script, and generate the operation code segment of the NewMonkey script based on the target NewMonkey function to obtain the finally generated target NewMonkey script; send the target NewMonkey script to the terminal so that the terminal tests the application program to be tested based on the target NewMonkey script. It can be seen that the present application can automatically identify the operations of the application program to be tested on the terminal and automatically generate a NewMonkey script for testing the application program to be tested. The script generation efficiency is relatively high, and there is no programming threshold, and non-professionals can also intervene.
[0036] The present application also provides an application program testing method, an electronic device and a computer-readable storage medium applied to the terminal, which have the same beneficial effects as the above testing method. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] To more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for the prior art and the embodiments. Obviously, the following drawings are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0038] Figure 1 It is a flowchart of an application program testing method applied to the PC side provided by an embodiment of the present application;
[0039] Figure 2 It is a schematic diagram of a display interface for generating a NewMonkey script provided by an embodiment of the present application;
[0040] Figure 3Flowchart of an application testing method for a terminal provided by an embodiment of the present application. Detailed implementation manners
[0041] The core of the present application is to provide an application testing method, an electronic device, and a computer-readable storage medium, which can automatically identify the operations of the application under test on the terminal and automatically generate a NewMonkey script for testing the application under test. The script generation efficiency is relatively high, and there is no programming threshold, so non-professionals can also intervene.
[0042] To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are some, but not all, of the embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts shall fall within the protection scope of the present application.
[0043] Please refer to Figure 1 , Figure 1 Flowchart of an application testing method for a PC provided by an embodiment of the present application.
[0044] This application testing method is applied to a PC and includes:
[0045] Step S11: Identify the operations of the application under test on the terminal; where the operations include operation actions and operation control properties.
[0046] Specifically, the terminal (such as a mobile phone) is connected to the PC, and the user can perform a series of operations on the application under test on the terminal. The PC can automatically identify the operations of the application under test on the terminal, specifically, identify the operation actions and operation control properties of each operation of the application under test on the terminal.
[0047] For example, if the application under test is WeChat, and the series of operations performed by the user on WeChat are: click on "Me" → click on "Services" → click on "Wallet", then the PC can automatically identify the series of operations performed by the user on WeChat:
[0048] Operation 1: Click on "Me" (operation action: click; operation control property: property of the uniquely positioned control "Me"); Operation 2: Click on "Services" (operation action: click; operation control property: property of the uniquely positioned control "Services"); Operation 3: Click on "Wallet" (operation action: click; operation control property: property of the uniquely positioned control "Wallet").
[0049] More specifically, the operation control property can be one or more of the control id (Identity document, unique code), control text, and control description, or other properties, which are not specifically limited in this application. For example, the control description of the "WeChat avatar" is: avatar, which can be used as the property to uniquely locate the "WeChat avatar".
[0050] Step S12: Based on a predefined function for characterizing operation actions and operation control properties, determine the target NewMonkey function corresponding to each operation.
[0051] Specifically, this application has predefined multiple functions, each of which characterizes operation actions and operation control properties, that is, through a specific function, it can be known what operation is performed on which control. After the PC automatically identifies the operations (operation actions + operation control properties) of the application under test on the terminal, it can determine the target NewMonkey function corresponding to each operation of the application under test on the terminal based on the predefined function for characterizing operation actions and operation control properties.
[0052] Step S13: Create a NewMonkey script, and generate the operation code segment of the NewMonkey script based on the target NewMonkey function to obtain the finally generated target NewMonkey script.
[0053] Specifically, the PC creates a NewMonkey script for testing the application under test on the terminal, and automatically generates the operation code segment of the NewMonkey script based on the target NewMonkey function corresponding to each operation of the application under test on the terminal, and then writes the operation code segment of the NewMonkey script into the created NewMonkey script to obtain the finally generated NewMonkey script (referred to as the target NewMonkey script).
[0054] Step S14: Send the target NewMonkey script to the terminal so that the terminal tests the application under test based on the target NewMonkey script.
[0055] Specifically, the PC sends the finally generated target NewMonkey script to the terminal. The terminal can then implement the test of the application under test based on the target NewMonkey script.
[0056] It can be seen that this application can automatically identify the operations of the application under test on the terminal and automatically generate a NewMonkey script for testing the application under test, with high script generation efficiency and no programming threshold, and non-professionals can also intervene.
[0057] Based on the above embodiments:
[0058] As an alternative embodiment, identifying operations of the application under test on the terminal includes:
[0059] Using the UIRecord platform to identify operations of the application under test on the terminal.
[0060] Specifically, the UIRecord platform is a UI-based automated recording and playback platform. The PC side can use the UIRecord platform to automatically identify the operation actions and operation control properties of each operation of the application under test on the terminal, and display the operation actions and operation control properties of each operation in real time on the web side (the web version of the PC side) for the user to confirm the operation sequence and operation control property information and then click to save.
[0061] In addition, the PC side can also use the UIRecord platform to automatically identify automated operations (such as sleep operations) of the application under test on the terminal, specifically, to identify the operation actions of each automated operation of the application under test on the terminal.
[0062] As an alternative embodiment, determining the target NewMonkey function corresponding to each operation based on a predefined function for characterizing operation actions and operation control properties includes:
[0063] Determining the target UIRecord function corresponding to each operation based on a predefined UIRecord function for characterizing operation actions and operation control properties;
[0064] Determining the target NewMonkey function in a mapping relationship with the target UIRecord function according to the preset mapping relationship between the UIRecord function and the NewMonkey function.
[0065] Specifically, this application has defined multiple UIRecord functions in the UIRecord platform in advance, and each UIRecord function represents an operation action and operation control properties. For example, multiple UIRecord functions can include the following: clickByIdDesc (operation action: click; operation control properties: control properties composed of control Id and control Desc), clickByDesc (operation action: click; operation control properties: control properties composed of control Desc), clickByIdText (operation action: click; operation control properties: control properties composed of control Id and control Text), clickByText (operation action: click; operation control properties: control properties composed of control Text), clickById (operation action: click; operation control properties: control properties composed of control Id), inputById (operation action: input; operation control properties: control properties composed of control Id), swipeByPercent (operation action: swipe; operation control properties: Percent). In addition, this application can also define UIRecord functions in the UIRecord platform to represent operation actions for automated operations. For example, the UIRecord function "sleep" (operation action: sleep).
[0066] This application has also defined multiple NewMonkey functions in NewMonkey in advance, and the NewMonkey functions defined in NewMonkey have a certain mapping relationship with the UIRecord functions defined in the UIRecord platform. The purpose is to map the UIRecord functions into NewMonkey functions that can be used in NewMonkey scripts. For example, as shown in Table 1 below, the UIRecord function "clickByIdDesc" has a mapping relationship with the NewMonkey function "findByDescEquals".
[0067] Table 1
[0068]
[0069] Based on this, after the PC side automatically recognizes the operations of the application under test on the terminal, it can determine the target UIRecord function corresponding to each operation of the application under test on the terminal based on the predefined UIRecord functions, and determine the target NewMonkey function that has a mapping relationship with the target UIRecord function according to the preset mapping relationship between the UIRecord function and the NewMonkey function, that is, determine the target NewMonkey function corresponding to each operation of the application under test on the terminal.
[0070] As an alternative embodiment, creating the NewMonkey script includes:
[0071] Obtaining the script name of the pre-created NewMonkey script;
[0072] Creating the NewMonkey script according to the script name;
[0073] Writing the fixed component code segment of the NewMonkey script into the created NewMonkey script.
[0074] Specifically, the process of creating the NewMonkey script on the PC side includes: 1) Obtaining the script name of the pre-created NewMonkey script. Specifically, after the PC side uses the UIRecord platform to identify the operations of the application under test on the terminal, an input entry for "script name" can be displayed on the UI interface to collect the script name of the pre-created NewMonkey script; 2) Automatically creating the NewMonkey script according to the obtained script name of the pre-created NewMonkey script, which can specifically be a java (an object-oriented programming language) file; 3) Writing the fixed component code segment of the NewMonkey script into the created NewMonkey script.
[0075] As an alternative embodiment, the fixed component code segment of the NewMonkey script includes: a code segment for importing the dependency packages and dependency modules of the NewMonkey script, a code segment for generating class declarations and class comments according to the script name and script description of the NewMonkey script, and a code segment for declaring the running functions and parameters of the NewMonkey script.
[0076] Specifically, the fixed component code segment of the NewMonkey script includes:
[0077] 1) A code segment for importing the dependency packages and dependency modules of the NewMonkey script:
[0078] package*.*.*;
[0079] import com.tencent.newmonkey.core.script.agent.Node;
[0080] import com.tencent.newmonkey.core.script.agent.Script;
[0081] import com.tencent.newmonkey.core.script.agent.exception.ValidException;
[0082] import com.tencent.newmonkey.core.script.agent.exception.NodeNotFoundException;
[0083] import com.tencent.newmonkey.core.script.agent.exception.CommandCanNotException;
[0084] Note: *.*.* represents the project directory path where the NewMonkey script is located, for example: com.tme.NewMonkeyScript.
[0085] 2) Code segment for generating class declarations and class comments based on the script name and script description of the NewMonkey script:
[0086] public class ScriptName extends Script{
[0087] / / ScriptDesc
[0088] }
[0089] 3) Code segment for declaring the running function of the NewMonkey script:
[0090] @Override
[0091] public void run() throws CommandCanNotException, ValidException, NodeNotFoundException{
[0092] }
[0093] 4) Code segment for declaring the parameters of the NewMonkey script:
[0094] Node node.
[0095] More specifically, the specific implementation of the PC side obtaining the script description of the NewMonkey script is as follows: After the PC side uses the UIRecord platform to identify the operations of the application under test on the terminal, an input entry for "script description" can be displayed on the UI interface to collect the script description (usage description of the script file) of the pre-created NewMonkey script.
[0096] For example, after the PC side uses the UIRecord platform to identify the operations of the application under test on the terminal, add an input entry such as Figure 2 shown as "Generate NewMonkey Script" to collect the script name and script description of the pre-created NewMonkey script.
[0097] As an optional embodiment, the operation code segment for generating the NewMonkey script based on the target NewMonkey function includes:
[0098] Based on the target NewMonkey function corresponding to each operation of the application under test, correspondingly generate the target operation code segment for each operation;
[0099] According to the operation sequence of each operation, combine the target operation code segments to obtain the operation code segment of the NewMonkey script.
[0100] Specifically, the PC side generates the target operation code segment for each operation of the application under test on the terminal based on the target NewMonkey function corresponding to each operation.
[0101] For example, 1) The operation code segment corresponding to the NewMonkey function of the click class:
[0102]
[0103] 2) The operation code segment corresponding to the input NewMonkey function:
[0104]
[0105]
[0106] 3) The operation code segment corresponding to the swipe NewMonkey function:
[0107]
[0108] 4) The operation code segment corresponding to the sleep NewMonkey function:
[0109] node = monkey.sleep(time);
[0110] Note: A in 1), 2), and 3) is the click function of the NewMonkey column in Table 1 above.
[0111] Based on this, the PC side can combine the target operation code segments corresponding to each operation of the application under test on the terminal according to the operation sequence of each operation, to obtain the operation code segment of the NewMonkey script. It can be understood that the target operation code segment corresponding to the operation with a prior operation sequence is arranged before the target operation code segment corresponding to the operation with a subsequent operation sequence.
[0112] As an optional embodiment, after sending the target NewMonkey script to the terminal, the application testing method further includes:
[0113] Determine whether the target NewMonkey script meets the preset script start condition;
[0114] If so, send a script start instruction to the terminal, so that the terminal tests the application under test based on the target NewMonkey script only after receiving the script start instruction.
[0115] Further, after the PC side sends the target NewMonkey script to the terminal, it first determines whether the target NewMonkey script meets the preset script start condition (for example, when it detects that the terminal is displayed on the preset page, it is considered that the target NewMonkey script meets the preset script start condition). Only when the preset script start condition is met, a script start instruction is sent to the terminal, so that the terminal tests the application under test based on the target NewMonkey script only after receiving the script start instruction. Otherwise, the terminal does not execute the step of testing the application under test based on the target NewMonkey script.
[0116] More specifically, the operations of the PC side from identifying the operations of the application under test on the terminal to obtaining the finally generated target NewMonkey script are all implemented on the web side, and then the finally generated target NewMonkey script is submitted to Git (Git is an open-source distributed version control system on the PC side, used to handle any project, large or small, efficiently and agilely), so that Git triggers the Blue Shield platform on the PC side to package the target NewMonkey script, and the Blue Shield platform uploads the script package to the Monkey task platform of the PC side. Then, the start condition of the target NewMonkey script is configured on the Monkey task platform to wait for the terminal to download the script package from the Monkey task platform when starting to run Newmonkey.
[0117] Please refer to Figure 3 , Figure 3The flowchart of an application testing method for a terminal provided by an embodiment of the present application.
[0118] This application testing method is applied to a terminal and includes:
[0119] Step S21: Receive the target NewMonkey script corresponding to the application under test.
[0120] It should be noted that the target NewMonkey script here is the script generated in any of the above application testing methods applied to the PC side. For the specific script generation process, reference can be made to the embodiments of the above testing methods, and the present application will not elaborate here.
[0121] Step S22: Based on the target NewMonkey script, call the release package of the application under test to test the application under test.
[0122] It should be noted that the release (release version) package of the application under test here is a release package with non-obfuscated resources.
[0123] In the existing solution, when running NewMonkey, a release package with obfuscated resources of the application under test is commonly used (a release package with obfuscated resources refers to a package that shortens the long resource path, for example: changing res / drawable / activity_advanced_setting_for_test to r / d / a, aiming to save the package size). Most of the information such as control IDs in such packages is garbled and not easy to read, and the control ID of the same control is not necessarily the same each time the package is built, resulting in a high maintenance cost for the NewMonkey script.
[0124] In this application, when running NewMonkey, a release package with non-obfuscated resources of the application under test is used (a release package with non-obfuscated resources refers to a package using the original resource path without further modifying the resource path), which is easy to read and can ensure that the control IDs in the application under test are in plain text and do not change with the packaging of the application, making the NewMonkey script not require post-maintenance.
[0125] It should also be noted that the method of generating the NewMonkey script and ensuring the invariance of the control IDs of the application under test in this application is applicable to Android application programs and has strong versatility.
[0126] The present application also provides an electronic device, including:
[0127] A memory for storing a computer program;
[0128] A processor for implementing the steps of any one of the above application program testing methods when executing a computer program.
[0129] For the introduction of the electronic device provided in this application, please refer to the embodiments of the above testing method, which will not be elaborated herein.
[0130] This application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of any one of the above application program testing methods are implemented.
[0131] For the introduction of the storage medium provided in this application, please refer to the embodiments of the above testing method, which will not be elaborated herein.
[0132] It should also be noted that in this specification, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprising", "including" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or device comprising the element.
[0133] The above description of the disclosed embodiments enables those skilled in the art to implement or use this application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application will not be limited to the embodiments shown herein, but will be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for testing an application program, characterized in that, Applied to the PC side, including: Using the UIRecord platform to automatically identify the operation actions and operation control properties of each operation of the application under test by the user on the terminal, as well as the operation actions of the automated operation of the application under test on the terminal; Based on a predefined function for characterizing operation actions and operation control properties, determining the target NewMonkey function corresponding to each of the operations; wherein, multiple NewMonkey functions are defined in NewMonkey; based on a predefined UIRecord function for characterizing operation actions and operation control properties and a UIRecord function for characterizing the operation actions of the automated operation, determining the target UIRecord function corresponding to each of the operations; according to a preset mapping relationship between the UIRecord function and the NewMonkey function, determining the target NewMonkey function that has a mapping relationship with the target UIRecord function; Creating a NewMonkey script, and generating an operation code segment of the NewMonkey script based on the target NewMonkey function to obtain the finally generated target NewMonkey script; Sending the target NewMonkey script to the terminal so that the terminal tests the application under test based on the target NewMonkey script.
2. The application program testing method according to claim 1, wherein Creating a NewMonkey script, including: Obtaining the script name of a pre-created NewMonkey script; Creating a NewMonkey script according to the script name; Writing the fixed composition code segment of the NewMonkey script into the created NewMonkey script.
3. The application program testing method according to claim 2, characterized in that, The fixed composition code segment of the NewMonkey script includes: a code segment for importing the dependency packages and dependency modules of the NewMonkey script, a code segment for generating a class declaration and class comment according to the script name and script description of the NewMonkey script, and a code segment for declaring the running function and parameters of the NewMonkey script.
4. The application program testing method according to claim 1, characterized in that, Generating the operation code segment of the NewMonkey script based on the target NewMonkey function, including: Based on the target NewMonkey function corresponding to each of the operations of the application under test, correspondingly generating a target operation code segment corresponding to each of the operations; Combining the target operation code segments in the operation order of each of the operations to obtain the operation code segment of the NewMonkey script.
5. The application program testing method according to any one of claims 1-4, characterized in that After sending the target NewMonkey script to the terminal, the application testing method further includes: Judging whether the target NewMonkey script meets a preset script start condition; If so, sending a script start instruction to the terminal so that the terminal tests the application under test based on the target NewMonkey script only after receiving the script start instruction.
6. A method for testing an application program, characterized in that, Applied to the terminal, including: Receive the target NewMonkey script corresponding to the application under test; wherein, the target NewMonkey script is the script generated in the application testing method described in any one of claims 1-5. Based on the target NewMonkey script, call the release package of the application under test to test the application under test; wherein, the release package is a release package with non-obfuscated resources.
7. An electronic device, characterized in that, Comprising: A memory for storing computer programs. A processor for implementing the steps of the application testing method described in any one of claims 1-6 when executing the computer program.
8. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, and when the computer program is executed by the processor, the steps of the application testing method described in any one of claims 1-6 are implemented.
Citation Information
Patent Citations
Traversal test method, device, equipment and medium
CN117271300A