Application testing methods and equipment

By identifying the 2D or 3D game scenes on the terminal device and retrieving the corresponding test scripts, the problem of game automation testing on the terminal device is solved, and automated testing is realized without the need for game development code, which is suitable for diverse terminal devices and games.

CN114691470BActive Publication Date: 2025-05-06HUAWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011588101.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-29
Publication Date
2025-05-06
Estimated Expiration
2040-12-29

AI Technical Summary

Technical Problem

The prior art is difficult to perform game automation testing on terminal devices, especially the inability to recognize 2D or 3D scenes, and requires game development code, which limits the testing capabilities of terminal manufacturers.

Method used

By obtaining the rendering information sent by the application, identifying the scene of the target object in the screen, and recalling the corresponding test scripts, simulating real user operations, and completing automated tests without the need for game development code.

Benefits of technology

It realizes automated testing of 2D or 3D games on terminal devices, which is suitable for diverse terminal devices and games, improving testing efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114691470B_ABST
    Figure CN114691470B_ABST
Patent Text Reader

Abstract

An embodiment of the present application provides an application testing method and device, wherein the testing device establishes a communication connection with a terminal, wherein the terminal includes an application, and the application includes first information, wherein the first information is used to generate a screen on the terminal, and the method includes: obtaining first information sent by the application; based on the first information and preset target object features, obtaining second information corresponding to the target object in the screen; based on the second information, identifying the scene in which the target object in the screen is located, and calling a preset test script corresponding to the scene, wherein the test script includes a mapping relationship between the scene and a preset operation model, and the operation model includes operation instructions for performing operations on the target object in the screen; based on the test script, outputting the operation instructions to the terminal to control the target object in the screen to perform the operation and complete the test.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of intelligent terminal technology, and in particular to an application testing method and device. Background Art

[0002] Moore's Law states that every 18-24 months, the number of integrated circuit components will double, and the performance will also double. The terminal devices used by consumers also follow this law. As the hardware capabilities of terminal devices gradually improve, consumers' requirements for gaming experience gradually increase. When playing games on terminal devices, whether the performance is fast and stable enough, whether the power consumption is less, and whether the touch response is timely and responsive, these factors will test the position of the terminal device in the user's mind.

[0003] Therefore, game testing is of great significance and value to the entire terminal manufacturer. How to effectively measure the KPI data that users care about, such as mobile phone performance, power consumption, network, and tracking, is extremely important. In addition, how to measure the data efficiently on an effective basis is even more important. After all, the number of mobile phones faced by terminals every year is huge, and the number of games is also diverse, so the testing volume increases exponentially.

[0004] Game automated testing is the key to solving this problem. Automation can greatly improve game testing efficiency and save testing manpower. However, most of the game automated testing methods in the industry are not suitable for terminals, because most of the current game automated testing is based on white box testing, that is, adding logic to the game development code, including scene determination, typical user operation execution, etc. The problem faced by the terminal is that it cannot obtain the game development code and logic, so it is impossible to use the above methods for game automated testing.

[0005] The technical solution of the prior art is to find the state machine corresponding to each test unit of the game, and then generate a test script based on the state machine. The test script corresponding to each test unit controls the operation between the state machine corresponding to the unit and each state, obtains the operation results and analyzes them. For example, in an RPG game, the protagonist needs to obtain treasure A first, then communicate with character B and hand treasure A to B, obtain task C and then execute it. This process is actually a state machine conversion. The game company can inject control logic into the code based on the above logic to operate the state machine conversion process. At the same time, in this process, log and monitoring modules will be added to realize automated game testing.

[0006] The technical solution of the prior art 1 deals with the problem of game automation testing from the perspective of the game company, and mainly focuses on functional acceptance. It needs to ensure that the game's automated testing process traverses the functional status of each test unit and exhaustively completes the functional test. However, it is unrealistic from the perspective of terminal manufacturers. First, terminal manufacturers do not have the game development code, so they cannot inject control logic into the code; second, terminal game automation testing pays more attention to the game experience on the terminal device, especially performance, power consumption, touch, network, etc. This method of code injection has an impact on the performance and power consumption of the game to a certain extent, so it is not suitable; third, the terminal devices are diverse and there are many versions. It is impossible to operate by modifying the game code every time; especially the game is constantly updated, it is even more impossible to perform game automation testing based on this method.

[0007] The technical solution of the second prior art is to use an image recognition tool (such as an image recognition tool of a game company) to realize game automation testing. The image recognition tool is essentially a game testing tool based on image recognition and image matching. Its game testing process is that the user takes screenshots of relevant content in the game (such as the "OK" option, the "Start Game" option, and the "Settings" option) and saves them on the PC in advance, and writes a control logic script in the integrated development environment (IDE), such as starting the game first, waiting for the game to enter, then clicking the "Settings" option, and finally clicking the "OK" option; after the control logic is completed, in the process of executing the game automation test, the operation is performed according to the above control logic. If it is necessary to click the "OK" button, the picture (such as the "OK" picture) saved in advance on the PC side is matched with the "OK" button in the game screen on the current terminal device. If the match is successful, click the "OK" option and perform the next step.

[0008] The technical solution of the second prior art has the following defects:

[0009] (a) It can achieve good execution results on 2D games. In 3D games, due to operations such as perspective switching and character turning, the related objects displayed on the screen will be deformed, resulting in the preset images not being able to match the current scene successfully, and the game test cannot continue to be executed;

[0010] (b) For games such as MOBA and multiplayer shooting games, the game scenes are very random and have no fixed rules. Testers cannot predict the scenes during the game execution and therefore cannot write control logic scripts. Summary of the invention

[0011] The present application provides an application testing method and device, which can effectively identify 2D or 3D scenes, simulate real user operations, and complete application testing without the need for game development code, and has a wider range of applications.

[0012] In a first aspect, the present application provides an application testing method, which is applied to a testing device, wherein the testing device establishes a communication connection with a terminal, wherein the terminal includes an application, wherein the application includes first information, and wherein the first information is used to generate a screen on the terminal. The method includes:

[0013] Obtaining first information sent by the application;

[0014] Based on the first information and preset target object features, obtaining second information corresponding to the target object in the picture;

[0015] Based on the second information, identifying the scene in which the target object in the picture is located, and calling a preset test script corresponding to the scene, wherein the test script includes a mapping relationship between the scene and a preset operation model, and the operation model includes an operation instruction for performing an operation on the target object in the picture;

[0016] Based on the test script, the operation instruction is output to the terminal to control the target object in the screen to perform the operation and complete the test.

[0017] In one possible implementation, the first information includes rendering information, the target object feature includes a first rendering value, and obtaining second information corresponding to the target object based on the first information and the preset target object feature includes:

[0018] Converting the rendering information of the first information into a second rendering value;

[0019] Matching the first rendering value with the second rendering value to obtain a matching result;

[0020] If the matching result is within a preset range, determining that the target object exists and obtaining its corresponding target object information, rendering structure information, and world space information from the rendering information;

[0021] Based on the target object information, the rendering structure information, and the world space information, second information is determined.

[0022] In one possible implementation, the target object is composed of multiple sub-target objects, the target object information includes sub-target object information and spatial information, the second information includes target object attributes, target object spatial information, relative spatial information between multiple target objects, and global information, the target object feature includes spatial distribution of the target object, and determining the second information based on the target object information, the rendering structure information, and the world space information includes:

[0023] Performing spatial structure analysis on the sub-target object spatial information based on the spatial distribution to determine the spatial information of multiple sub-target objects constituting the target object;

[0024] Integrate and extract the spatial information of the multiple sub-target objects to obtain the spatial information of the target object and the relative spatial information;

[0025] Determining the target object attribute based on the plurality of sub-target object information and the rendering structure information;

[0026] The world space information is processed based on a preset transformation matrix to obtain the global information.

[0027] In one possible implementation, before identifying the scene where the target object in the picture is located based on the second information and calling a preset test script corresponding to the scene, the method further includes:

[0028] Acquire operation information, where the operation information is used to represent information generated by a user operating a target object in the screen on the terminal;

[0029] Based on the second information and the operation information, establish an operation model corresponding to the scenario, wherein the scenario is determined based on the second information, and the operation instructions of the operation model are determined based on the number of the same operation information in the same scenario;

[0030] Based on the operation model, a test script corresponding to the scenario is generated.

[0031] In one possible implementation method, the operation includes one or more of single-finger click, single-finger slide, multi-finger click, multi-finger slide, single-finger click + single-finger slide, single-finger click + multi-finger slide, multi-finger click + single-finger slide, multi-finger click + multi-finger slide, click position and slide direction.

[0032] In one possible implementation, the method further includes:

[0033] Forwarding the first information to the terminal.

[0034] In a second aspect, the present application provides an application testing device, wherein the testing device establishes a communication connection with a terminal, wherein the terminal includes an application, wherein the application includes first information, and wherein the first information is used to generate a screen on the terminal, wherein the device includes:

[0035] An information acquisition module, used to acquire first information sent by the application;

[0036] An information processing module, configured to obtain second information corresponding to the target object in the picture based on the first information and preset target object features;

[0037] A scene recognition module, used to identify the scene in which the target object in the picture is located based on the second information, and call a preset test script corresponding to the scene, wherein the test script includes a mapping relationship between the scene and a preset operation model, and the operation model includes an operation instruction for performing an operation on the target object in the picture;

[0038] The control module is used to output the operation instruction to the terminal based on the test script to control the target object in the screen to perform the operation and complete the test.

[0039] In one possible implementation, the first information includes rendering information, the target object feature includes a first rendering value, and the information processing module includes:

[0040] A conversion module, used to convert the rendering information of the first information into a second rendering value;

[0041] A matching module, used for matching the first rendering value with the second rendering value to obtain a matching result;

[0042] A judgment module, configured to determine that the target object exists and obtain its corresponding target object information, rendering structure information and world space information from the rendering information if the matching result is within a preset range;

[0043] An information determination module is used to determine second information based on the target object information, the rendering structure information and the world space information.

[0044] In one possible implementation, the target object is composed of multiple sub-target objects, the target object information includes sub-target object information and spatial information, the second information includes target object attributes, target object spatial information, relative spatial information between multiple target objects, and global information, the target object feature includes the spatial distribution of the target object, and the information determination module includes:

[0045] A spatial analysis module, configured to perform spatial structure analysis on the sub-target object spatial information based on the spatial distribution, and determine the spatial information of multiple sub-target objects constituting the target object;

[0046] An information integration module, used to integrate and extract the spatial information of the plurality of sub-target objects to obtain the spatial information of the target object and the relative spatial information;

[0047] An attribute determination module, configured to determine an attribute of the target object based on the information of the plurality of sub-target objects and the rendering structure information;

[0048] The global information acquisition module is used to process the world space information based on a preset transformation matrix to obtain the global information.

[0049] In one possible implementation, the device further includes:

[0050] An operation information acquisition module, used to acquire operation information, wherein the operation information is used to represent information generated by a user operating a target object in the screen on the terminal;

[0051] An establishing module, configured to establish an operation model corresponding to a scenario based on the second information and the operation information, wherein the scenario is determined based on the second information, and the operation instructions of the operation model are determined based on the number of identical operation information in the same scenario;

[0052] A generation module is used to generate a test script corresponding to the scenario based on the operation model.

[0053] In one possible implementation method, the operation includes one or more of single-finger click, single-finger slide, multi-finger click, multi-finger slide, single-finger click + single-finger slide, single-finger click + multi-finger slide, multi-finger click + single-finger slide, multi-finger click + multi-finger slide, click position and slide direction.

[0054] In one possible implementation, the device further includes:

[0055] A forwarding module is used to forward the first information to the terminal.

[0056] In a third aspect, the present application provides an application testing device, the testing device establishing a communication connection with a terminal, the terminal including an application, the application including first information, the first information being used to generate a screen on the terminal, the testing device including:

[0057] One or more processors; a memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory, and the one or more computer programs include instructions that, when executed by the apparatus, cause the test device to perform the following steps:

[0058] Obtaining first information sent by the application;

[0059] Based on the first information and preset target object features, obtaining second information corresponding to the target object in the picture;

[0060] Based on the second information, identifying the scene in which the target object in the picture is located, and calling a preset test script corresponding to the scene, wherein the test script includes a mapping relationship between the scene and a preset operation model, and the operation model includes an operation instruction for performing an operation on the target object in the picture;

[0061] Based on the test script, the operation instruction is output to the terminal to control the target object in the screen to perform the operation and complete the test.

[0062] In one possible implementation, the first information includes rendering information, and the target object feature includes a first rendering value. When the instruction is executed by the device, the test device executes the step of obtaining second information corresponding to the target object based on the first information and the preset target object feature, including:

[0063] Converting the rendering information of the first information into a second rendering value;

[0064] Matching the first rendering value with the second rendering value to obtain a matching result;

[0065] If the matching result is within a preset range, determining that the target object exists and obtaining its corresponding target object information, rendering structure information, and world space information from the rendering information;

[0066] Based on the target object information, the rendering structure information, and the world space information, second information is determined.

[0067] In one possible implementation, the target object is composed of multiple sub-target objects, the target object information includes sub-target object information and spatial information, the second information includes target object attributes, target object spatial information, relative spatial information between multiple target objects, and global information, the target object feature includes the spatial distribution of the target object, and when the instruction is executed by the device, the test device performs the step of determining the second information based on the target object information, the rendering structure information, and the world space information, including:

[0068] Performing spatial structure analysis on the sub-target object spatial information based on the spatial distribution to determine the spatial information of multiple sub-target objects constituting the target object;

[0069] Integrate and extract the spatial information of the multiple sub-target objects to obtain the spatial information of the target object and the relative spatial information;

[0070] Determining the target object attribute based on the plurality of sub-target object information and the rendering structure information;

[0071] The world space information is processed based on a preset transformation matrix to obtain the global information.

[0072] In one possible implementation, when the instruction is executed by the device, the test device further executes the steps of:

[0073] Acquire operation information, where the operation information is used to represent information generated by a user operating a target object in the screen on the terminal;

[0074] Based on the second information and the operation information, establish an operation model corresponding to the scenario, wherein the scenario is determined based on the second information, and the operation instructions of the operation model are determined based on the number of the same operation information in the same scenario;

[0075] Based on the operation model, a test script corresponding to the scenario is generated.

[0076] In one possible implementation method, the operation includes one or more of single-finger click, single-finger slide, multi-finger click, multi-finger slide, single-finger click + single-finger slide, single-finger click + multi-finger slide, multi-finger click + single-finger slide, multi-finger click + multi-finger slide, click position and slide direction.

[0077] In one possible implementation manner, when the instruction is executed by the apparatus, the test device further performs the steps of:

[0078] Forwarding the first information to the terminal.

[0079] In a fourth aspect, the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer-readable storage medium is run on a computer, the computer executes the method described in the first aspect.

[0080] In a fifth aspect, the present application provides a computer program, which, when executed by a computer, is used to execute the method described in the first aspect.

[0081] In one possible design, the program in the fifth aspect may be stored in whole or in part on a storage medium packaged together with the processor, or may be stored in whole or in part on a memory not packaged together with the processor. BRIEF DESCRIPTION OF THE DRAWINGS

[0082] Figure 1 A method diagram of an embodiment of the application program testing method of the present application;

[0083] Figure 2A This is a schematic diagram of a frame of a shooting game;

[0084] Figure 2B This is a schematic diagram of the DrawCall instruction flow in the application program test method of this application;

[0085] Figure 2C A schematic diagram of a three-dimensional object model data in the application program testing method of this application;

[0086] Figure 2D A flowchart of an embodiment of obtaining first information in the application program testing method of the present application;

[0087] Figure 2E A flowchart of an embodiment of the application testing method of the present application;

[0088] Figure 3 A flowchart of outputting a test report in the application program testing method of this application;

[0089] Figure 4 A schematic diagram of a method for generating a test script in an embodiment of the application program testing method of the present application;

[0090] Figure 5 A schematic diagram of the structure of an embodiment of an application program testing device of the present application;

[0091] Figure 6 This is a structural diagram of an embodiment of an information processing module in the application program testing device of the present application;

[0092] Figure 7 A schematic diagram of the structure of an embodiment of an information determination module in an application program testing device of the present application;

[0093] Figure 8 This is a schematic diagram of the structure of an embodiment of the application testing device of the present application. DETAILED DESCRIPTION

[0094] The terms used in the implementation section of this application are only used to explain the specific embodiments of this application and are not intended to limit this application.

[0095] The technical solution of the prior art one is to find the state machine corresponding to each test unit of the game, and then generate a test script based on the state machine. The technical solution of the prior art one deals with the problem of game automation testing from the perspective of the game company, mainly focusing on functional acceptance. It needs to ensure that the game's automated testing process traverses the functional status of each test unit and exhaustively completes the functional test. However, it is unrealistic from the perspective of terminal manufacturers. First, the terminal manufacturer does not have the game development code, so it is impossible to inject control logic into the code; second, the terminal game automation test pays more attention to the game experience on the terminal device, especially performance, power consumption, touch, network, etc. This code injection method has an impact on the performance and power consumption of the game to a certain extent, so it is not suitable; third, the terminal devices are diverse and there are many versions. It is impossible to operate by modifying the game code every time; especially the game is constantly updated, it is even more impossible to perform game automation testing based on this method.

[0096] The technical solution of the second prior art is to use image recognition tools (such as the image recognition tool of a certain game company) to achieve game automated testing. The image recognition tool is essentially a game testing tool based on image recognition and image matching. The technical solution of the second prior art has the following defects:

[0097] (a) It can achieve good execution results on 2D games. In 3D games, due to operations such as perspective switching and character turning, the related objects displayed on the screen will be deformed, resulting in the preset images not being able to match the current scene successfully, and the game test cannot continue to be executed;

[0098] (b) For games such as MOBA and multiplayer shooting games, the game scenes are very random and have no fixed rules. Testers cannot predict the scenes during the game execution and therefore cannot write control logic scripts.

[0099] To this end, the present application proposes an application testing method, device and equipment that can effectively identify 2D or 3D scenes, simulate real user operations, and complete application testing without the need for game development code. It is more suitable for implementation by terminal manufacturers and has a wider range of applications.

[0100] Figure 1 A method diagram of an embodiment of the application program testing method of the present application is shown as follows: Figures 1 to 3 As shown, the above application testing method may include:

[0101] S101. Obtain first information sent by an application.

[0102] In this embodiment, the application testing method is applied to a testing device, which may include a computer, a mobile phone, or other device or apparatus with processing functions. To implement the application method, the testing device may generally have electronic devices such as a processor and a memory, or other physical circuits.

[0103] In the above-mentioned application testing method, a preset application can be selected as the object to be tested, and the setting options, map or application scene information of the application can be pre-set. The application can include a game program or an education-related program, etc. It can be a 2D or 3D application, and can be run on a terminal, such as a mobile phone, tablet, notebook or large-screen electronic device. For example, the application is a shooting game, which can be started on the terminal, and the parameters in the game setting options, the game map or the covered game scene can be pre-set. The application testing method completes the automated test by identifying the current scene of the game and simulating the real player to operate the target object (such as the game character) in the current scene of the game.

[0104] Furthermore, the application may include first information, so that the terminal generates a picture based on the first information, and the picture may correspond to the current scene of the game (i.e., the scene where the target object in the current picture is located), and the picture may be displayed on the terminal screen, etc. The first information in the application may include DrawCall instruction information and resource data or instruction streams such as textures and three-dimensional models. For example, when the terminal draws a frame of the picture, the game engine will send the game DrawCall instruction information and resource data or instruction streams such as textures and three-dimensional models to the system layer of the terminal (such as the GPU driver, etc.), and the terminal's image processor (GPU) will perform the actual rendering and write it into the frame buffer (FrameBuffer). The display subsystem in the terminal system will transmit the drawn frame of data to the terminal's display, and the corresponding picture will be displayed on the display. Figure 2A The figure shows a frame diagram of a shooting game. Figure 2B The following is a schematic diagram of the DrawCall instruction flow in the application program test method of this application. Figure 2C The figure shows a schematic diagram of the three-dimensional object model data in the application test method of the present application. The screen can be a 2D or 3D screen. For example, taking a 3D shooting game as an example, the screen can include a game startup screen, a game lobby screen, a game setting screen, a game process screen such as a parachuting screen, a driving screen, a shooting screen, a material picking screen, etc.

[0105] In one possible implementation, Figure 2DAs shown, the first information may include instructions and data. Step S101 includes: intercepting the instructions and data before the application is sent to the driver of the terminal to obtain the first information.

[0106] Specifically, the test device is communicatively connected to the terminal, and the application runs on the terminal. When the terminal needs to display a frame of the picture, the application will send the data and instructions (i.e., the first information) corresponding to drawing the picture to the GPU driver of the terminal. Before sending it, the test device intercepts the data and instructions to obtain the first information.

[0107] The first information obtained by the test device may include part or all of the data and instructions issued by the application, such as GPU rendering information, spatial position information of the camera in three-dimensional world coordinates (such as coordinate position or viewing angle, etc.), DrawCall instruction information, viewport matrix, vertices (mesh), texture or rendering pipeline, etc.

[0108] S102: Based on the first information and preset target object features, obtain second information corresponding to the target object in the picture.

[0109] In this embodiment, the second information can be used to determine the scene in which the target object in the screen is currently located. Preferably, the second information may include the attributes and spatial information of the target object, the relative spatial information between multiple target objects, the global game information, etc. For example, the target object in the game screen may include characters, materials, vehicles, airplanes, houses, water, ships, bridges, trees, grass, stones, etc. in the game. The attributes and spatial information of the target object can be used to mark the target object in the screen and its position (such as coordinates or directions, etc.). The relative spatial information between multiple target objects may include the relative positions or directions between multiple target objects, such as the position of a character in a house, the relative position between a character (such as a local player) and a character (such as other players), etc. The global game information may include the world coordinates of the target object in the screen, etc.

[0110] In one possible implementation, the first information may include rendering information of the screen (such as DrawCall instruction information, viewport matrix, vertex (mesh), texture or rendering pipeline, etc.), and the target object feature includes a first rendering value. Step S102 includes:

[0111] S201, converting rendering information of the first information into a second rendering value;

[0112] S202, matching the first rendering value with the second rendering value to obtain a matching result;

[0113] S203: If the matching result is within a preset range, determine that the target object exists and obtain its corresponding target object information, rendering structure information, and world space information from the rendering information;

[0114] S204: Determine second information based on the target object information, the rendering structure information, and the world space information.

[0115] That is to say, the matching result is used to determine whether there is a corresponding target object in the picture. If the target object exists in the picture, the information corresponding to the target object is extracted from the rendering information, such as vertices, textures, viewport matrix, rendering pipeline and other resource information, for determining the second information.

[0116] Specifically, the method for obtaining the first rendering value may include:

[0117] S301 : determining a target object in a picture and its corresponding preset rendering information (such as vertices, textures, etc.) by manual analysis.

[0118] S302: Convert the preset rendering information into a first rendering value that can be quickly calculated in real time, such as a hash value of a texture and a vertex.

[0119] Accordingly, all rendering information in the first information (such as vertices or textures, etc.) can be converted into a second rendering value that can be quickly calculated in real time. By performing similarity matching calculation on the first rendering value and the second rendering value, it can be identified whether there is a corresponding target object in the picture.

[0120] For example, in step S202, the difference between the first rendering value and the second rendering value may be compared to see whether it is within a certain range (such as a preset range interval). If the difference is within the preset range, it is determined that the target object exists in the picture, otherwise, the target object does not exist. For example, some pictures may contain people, vehicles, and houses, and some pictures may contain people, water, and boats, etc.

[0121] Therefore, in step S203, when it is determined that the target object exists in the picture, target object information, rendering structure information and world space information corresponding to the target object can be extracted from the rendering information of the picture. Specifically, the target object information may include vertices, textures, viewport matrices, rendering pipelines, etc.

[0122] The rendering structure information may include information such as DrawCall rendering order, texture rendering mode, etc. The rendering structure information may be obtained by analyzing and calculating the DrawCall instruction order, input and output texture resource association, etc. in the rendering information.

[0123] The world space information may include world space information of all objects in the current viewing angle of the picture, such as spatial position (such as world coordinates) or direction, etc. Specifically, the world space information can be obtained by analyzing the transformation logic from local coordinates to world coordinates in the rendering pipeline of the rendering information, extracting the transformation matrix, and further decomposing it into vectors such as translation and rotation.

[0124] In one possible implementation manner, the target object is composed of multiple sub-target objects, the target object information includes sub-target object information and spatial information, the second information includes target object attributes, target object spatial information, relative spatial information between multiple target objects, and global information, and the target object feature includes spatial distribution of the target object. Step S203 includes:

[0125] S401: Perform spatial structure analysis on the sub-target object spatial information based on the spatial distribution to determine the spatial information of multiple sub-target objects constituting the target object.

[0126] S402, integrating and extracting the spatial information of the plurality of sub-target objects to obtain the spatial information of the target object and the relative spatial information;

[0127] S403, determining the target object attribute based on the multiple sub-target object information and the rendering structure information;

[0128] S404: Process the world space information based on a preset transformation matrix to obtain the global information.

[0129] During the production of an application (such as a game), a complete target object can be split into multiple sub-targets. For example, a character can be composed of a head, a body, and limbs.

[0130] In this embodiment, multiple sub-targets can form a complete target object according to the spatial distribution. All sub-targets involved in a complete target object can be obtained, and the sub-targets that conform to the spatial distribution can be combined into a complete target object, so that the spatial information of the multiple sub-target objects that constitute the target object can be determined.

[0131] like Figure 2EAs shown, in step S402, the spatial information of the multiple sub-targets constituting the target object is integrated and extracted to obtain the spatial information of the target object. The spatial information of the sub-targets can be determined based on the viewport matrix and the rendering pipeline in the target object information. For example, the transformation matrix is ​​extracted from the transformation logic from local coordinates to world coordinates in the rendering pipeline, and further decomposed into vectors such as translation and rotation, so as to obtain spatial information (such as spatial coordinates or directions, etc.). For example, the spatial information of the target object is such as the characters and the spatial positions of the characters in the picture under the current scene (such as spatial coordinates or directions), or the houses and the spatial positions of the houses, or the vehicles and the spatial positions of the vehicles, etc.

[0132] Furthermore, the relative spatial information is determined based on multiple target object spatial information, and the relative spatial information may include the relative positions or directions between multiple target objects in the picture, such as the relative positions or directions between characters in the current scene, the relative positions or directions between characters and vehicles, etc. Specifically, the transformation matrix from the local coordinates of the target object to other target objects can be calculated through the world coordinate transformation matrix in the target object spatial information, and then the transformation matrix can be decomposed into vectors such as translation and rotation to obtain the relative spatial information.

[0133] In step S403, the target object information also includes preset attributes of the target object, and the preset attributes may include a preset rendering order, a preset texture rendering method, etc. According to the DrawCall rendering order, texture rendering method, etc. in the rendering structure information, the vertices, rendering order, or texture rendering method, etc. of the sub-target object are determined, and the vertices, rendering order, or texture rendering method, etc. of the multiple sub-target objects constituting the target object are compared with the preset attributes to identify the target object attribute composed of the multiple sub-target objects. For example, if the difference between the vertices, rendering order, or texture rendering method of the multiple sub-target objects (such as the head, body, or limbs of a person) and the preset attributes is within a certain range, then the target object attribute composed of the multiple sub-target objects is determined to be a person.

[0134] The global information (such as game global information) may include the world coordinates of the target object in the screen, such as the world coordinates corresponding to the camera perspective, etc. Specifically, the game global information may be extracted from a transformation matrix from world coordinates to observation coordinates (ie, the preset transformation matrix).

[0135] It can be seen that the target object attributes, target object spatial information, relative spatial information between multiple target objects, and global information in the second information can be used to determine the scene where the target object is located in the current picture. For example, the target object attributes can be used to determine the attributes of all objects in the picture to identify the target object in the picture (such as identifying a person, etc.), the target object spatial information can indicate that the spatial position of the person in the current picture is in the air and the person is facing the ground, the relative spatial information can indicate the relative position between the person in the current picture and other objects and the global position (such as the world coordinate position), such as the relative distance between the person and the ground, the position of the person in the world coordinates, etc., so that the current scene can be determined to be parachuting. For example, the second information can be used to determine which is a movable object (such as a target object) in the current scene, which of the movable objects is a teammate, which is an enemy, whether there are obstacles ahead, etc.

[0136] S103. Based on the second information, identify the scene in which the target object in the screen is located, and call a preset test script corresponding to the scene, wherein the test script includes a mapping relationship between the scene and a preset operation model, and the operation model includes operation instructions for performing operations on the target object in the screen.

[0137] The test script may be stored on the test device, or the test script may be stored in a cloud server, from which the test device obtains the test script via a wireless network, or the test script may be stored in a readable storage medium, from which the test device reads the test script.

[0138] Preferably, each screen may correspond to a scene one-to-one, and each scene may correspond to a test script one-to-one. The scene may be determined by the target object information of the second information and the second spatial information. For example, taking a shooting game as an example, the scene may include skydiving (corresponding to the skydiving screen), driving (corresponding to the driving screen), shooting (corresponding to the shooting screen), and other scenes.

[0139] In step S103, the input of the operation model may be the second information, and the output is a series of operation instructions. The operation model may be obtained through a large amount of training, and it may output operation instructions with a high confidence level (such as a high probability) according to probability, so as to simulate a real user (such as a player) operating the target object in the screen. That is, with the second information as input, the operation model may output operation instructions simulating a real user operating the target object in the screen in the current scenario.

[0140] S104: Based on the test script, output the operation instruction to the terminal to control the target object in the screen to perform the operation and complete the test.

[0141] It can be seen that the test device can identify the scene where the target object is located in different screens, call the corresponding test scripts in different scenes, and output corresponding operation instructions to the terminal based on the test scripts. The operation instructions can be executed by the terminal to control the target object in the screen to perform corresponding operations in different scenes, thereby simulating real users to operate the target object in the screen in different scenes to complete the automated test.

[0142] For example, taking a shooting game on a mobile phone as an example, if the current scene is skydiving, the corresponding test script is called and the corresponding operation instructions (such as operation instructions for executing skydiving) are output to the terminal to control the target object (such as the player character) on the screen on the terminal to perform the skydiving action.

[0143] The application testing method in the present application can simulate real users to perform automated testing on the terminal, so that the load generated by the terminal during the test can be close to the load generated by the terminal when the real user operates the terminal, which is conducive to ensuring that the performance and power consumption of the terminal during the test are consistent with the performance and power consumption of the terminal during the real-person test, thereby improving the reliability of automated testing.

[0144] In one possible implementation, Figure 4 As shown, the method further comprises:

[0145] S501, obtaining operation information, where the operation information is used to represent information generated by a user operating a target object in the screen on the terminal;

[0146] S502: establishing an operation model corresponding to a scenario based on the second information and the operation information, wherein the scenario is determined based on the second information, and the operation instructions of the operation model are determined based on the quantity of the same operation information in the same scenario;

[0147] S503: Based on the operation model, generate a test script corresponding to the scenario.

[0148] In this embodiment, the operations include but are not limited to single-finger click, single-finger slide, multi-finger click, multi-finger slide, single-finger click + single-finger slide, single-finger click + multi-finger slide, multi-finger click + single-finger slide, multi-finger click + multi-finger slide, click position or slide direction, etc.

[0149] For example, in step S501, when a player plays a game on a terminal, operation information of the player performing operations on the target object in the screen in each game scene during the game process can be collected. Taking a shooting game as an example, the game scene may include shooting, parachuting, running along the way, house searching, driving or swimming, etc. The collected operation information may include the position (such as height), horizontal orientation, pitch angle, etc. of the target object in the screen, and the screen touch operation (i.e., the touch operation performed by the player on the terminal screen) during the game process is recorded.

[0150] In step S502, second information corresponding to each picture can be obtained, and based on the second information, the scene in which the target object in the picture is currently located is determined. The specific steps and / or principles can refer to the above steps S101 and S102, which will not be repeated here.

[0151] In general, one scene corresponds to one operation model, that is, in the same scene, the player performs the same operation on the target object in the screen on the terminal screen. When the second information corresponding to the same scene is used as the input of the operation model, the operation model can output the same operation instruction. Of course, in the same scene, there may be a player performing a variety of different operations on the target object in the screen on the terminal screen. At this time, the operation model can be trained by collecting a large number of operation information as samples to obtain the probability of the operation model outputting a variety of operation instructions in the same scene (the more the number of the same operation information, the higher the probability of outputting the corresponding operation instruction), and the operation model outputs the operation instruction with a higher probability.

[0152] In step S503, each test script may be implanted into the test device, so that during testing, the test device can call the corresponding test script.

[0153] In one possible implementation, the method further includes:

[0154] The first information is forwarded to a driver of the terminal.

[0155] That is to say, after the test device intercepts the first information sent by the application to the terminal, it can also forward the first information to the terminal, so that the terminal generates a screen based on the first information, and the test device sends corresponding operation instructions to the terminal to control the target object in the screen to perform corresponding operations.

[0156] In one possible implementation manner, the method may further include:

[0157] S601, collecting test status information;

[0158] S602: Output a test result based on the test status information.

[0159] like Figure 3 The flowchart of outputting the test report in the application test method of the present application is shown. In this embodiment, the test status information may include the terminal status and the application status, the terminal status includes but is not limited to the terminal power consumption, performance, network and other indicator data, and the application status includes but is not limited to the application operation status, performance, power consumption, network and other indicator data. The test status information can be collected by a monitoring or collection tool (such as a plug-in) loaded on the terminal.

[0160] The test status information may be transmitted to the cloud via a network, or stored in a terminal, a test device, or a readable storage medium.

[0161] In step S602, the test status information can be analyzed and compared according to preset evaluation indicators (such as game evaluation indicators) to obtain the test results and output them in the form of a test report. Furthermore, the cloud server can integrate relevant indicator data of different times, different batches, different devices, different games, etc., and output a test report based on the comparison with historical data to push or display it to relevant personnel. The test report can be used to reflect the test results of the application.

[0162] In summary, the application testing method provided in the embodiment of the present application can identify game scenes without the need for game codes. Moreover, by collecting player touch information of terminal devices to establish a player operation model, the player operation can be simulated to perform automated testing on the game, thereby ensuring consistency between the test and the real player.

[0163] The benefits and effects of the application program testing method provided in the embodiment of the present application in actual application are shown in the following table:

[0164]

[0165] It can be seen that the automated game testing method provided in the embodiment of the present application can greatly improve laboratory testing efficiency, save testing manpower and costs, and at the same time, early discover possible performance, power consumption, network, tracking and other gaps of the game on the terminal device, and output test reports to provide a basis for relevant personnel, facilitate maintenance, reduce operational risks, etc.

[0166] It is to be understood that some or all of the steps or operations in the above embodiments are merely examples, and the present application embodiments may also perform other operations or variations of various operations. In addition, the various steps may be performed in different orders presented in the above embodiments, and it is possible that not all of the operations in the above embodiments need to be performed.

[0167] like Figure 5 As shown, the present application provides an application testing device 100, the testing device 100 establishes a communication connection with a terminal, the terminal includes an application, the application includes first information, the first information is used to generate a screen on the terminal, and the device 100 includes:

[0168] An information acquisition module 10, used to acquire first information sent by the application;

[0169] An information processing module 20, configured to obtain second information corresponding to the target object in the picture based on the first information and preset target object features;

[0170] A scene recognition module 30, configured to recognize the scene in which the target object in the picture is located based on the second information, and retrieve a preset test script corresponding to the scene, wherein the test script includes a mapping relationship between the scene and a preset operation model, and the operation model includes an operation instruction for performing an operation on the target object in the picture;

[0171] The control module 40 is used to output the operation instruction to the terminal based on the test script to control the target object in the screen to perform the operation and complete the test.

[0172] In one possible implementation, Figure 6 As shown, the first information includes rendering information, the target object feature includes a first rendering value, and the information processing module 20 includes:

[0173] A conversion module 21, configured to convert the rendering information of the first information into a second rendering value;

[0174] A matching module 22, configured to match the first rendering value with the second rendering value to obtain a matching result;

[0175] A judgment module 23 is used to determine that the target object exists and obtain its corresponding target object information, rendering structure information and world space information from the rendering information if the matching result is within a preset range;

[0176] The information determination module 24 is configured to determine second information based on the target object information, the rendering structure information and the world space information.

[0177] In one possible implementation, Figure 7As shown, the target object is composed of multiple sub-target objects, the target object information includes sub-target object information and spatial information, the second information includes target object attributes, target object spatial information, relative spatial information between multiple target objects and global information, the target object feature includes the spatial distribution of the target object, and the information determination module 24 includes:

[0178] A spatial analysis module 241 is used to perform spatial structure analysis on the sub-target object spatial information based on the spatial distribution to determine the spatial information of multiple sub-target objects constituting the target object;

[0179] An information integration module 242, configured to integrate and extract the spatial information of the plurality of sub-target objects to obtain the spatial information of the target object and the relative spatial information;

[0180] An attribute determination module 243, configured to determine an attribute of the target object based on the plurality of sub-target object information and the rendering structure information;

[0181] The global information obtaining module 244 is used to process the world space information based on a preset transformation matrix to obtain the global information.

[0182] In one possible implementation, the device 100 further includes:

[0183] An operation information acquisition module 50, used to acquire operation information, wherein the operation information is used to represent information generated by a user operating a target object in the screen on the terminal;

[0184] An establishing module 60 is used to establish an operation model corresponding to a scenario based on the second information and the operation information, wherein the scenario is determined based on the second information, and the operation instructions of the operation model are determined based on the number of the same operation information in the same scenario;

[0185] The generating module 70 is used to generate a test script corresponding to the scenario based on the operation model.

[0186] In one possible implementation method, the operation includes one or more of single-finger click, single-finger slide, multi-finger click, multi-finger slide, single-finger click + single-finger slide, single-finger click + multi-finger slide, multi-finger click + single-finger slide, multi-finger click + multi-finger slide, click position and slide direction.

[0187] In one possible implementation, the device further includes:

[0188] The forwarding module 80 is configured to forward the first information to the terminal.

[0189] Figure 5 The application program testing device 100 provided in the embodiment shown can be used to execute the application program Figure 1 The technical solution of the method embodiment shown, its implementation principle and technical effects can be further referred to the relevant description in the method embodiment.

[0190] It should be understood that the above Figure 5 to Figure 7 The division of the various modules of the application testing device shown is only a division of logical functions. In actual implementation, they can be fully or partially integrated into one physical entity, or they can be physically separated. And these modules can all be implemented in the form of software calling through processing elements; they can also be all implemented in the form of hardware; some modules can also be implemented in the form of software calling through processing elements, and some modules can be implemented in the form of hardware. For example, the detection module can be a separately established processing element, or it can be integrated in a chip of an electronic device. The implementation of other modules is similar. In addition, these modules can be fully or partially integrated together, or they can be implemented independently. In the implementation process, each step of the above method or each of the above modules can be completed by an integrated logic circuit of hardware in the processor element or instructions in software form.

[0191] For example, the above modules may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASIC), or one or more digital singnal processors (DSP), or one or more field programmable gate arrays (FPGA). For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).

[0192] Figure 8 This is a schematic diagram of the structure of an embodiment of the application testing device of the present application, such as Figure 8 As shown, the test device establishes a communication connection with a terminal, the terminal includes an application, the application includes first information, and the first information is used to generate a screen on the terminal. The above-mentioned application test device may include:

[0193] one or more processors; memory; and one or more computer programs;

[0194] The one or more computer programs are stored in the memory, and the one or more computer programs include instructions. When the instructions are executed by the device, the device performs the following steps:

[0195] Obtaining first information sent by the application;

[0196] Based on the first information and preset target object features, obtaining second information corresponding to the target object in the picture;

[0197] Based on the second information, identifying the scene in which the target object in the picture is located, and calling a preset test script corresponding to the scene, wherein the test script includes a mapping relationship between the scene and a preset operation model, and the operation model includes an operation instruction for performing an operation on the target object in the picture;

[0198] Based on the test script, the operation instruction is output to the terminal to control the target object in the screen to perform the operation and complete the test.

[0199] In one possible implementation, the first information includes rendering information, and the target object feature includes a first rendering value. When the instruction is executed by the device, the test device executes the step of obtaining second information corresponding to the target object based on the first information and the preset target object feature, including:

[0200] Converting the rendering information of the first information into a second rendering value;

[0201] Matching the first rendering value with the second rendering value to obtain a matching result;

[0202] If the matching result is within a preset range, determining that the target object exists and obtaining its corresponding target object information, rendering structure information, and world space information from the rendering information;

[0203] Based on the target object information, the rendering structure information, and the world space information, second information is determined.

[0204] In one possible implementation, the target object is composed of multiple sub-target objects, the target object information includes sub-target object information and spatial information, the second information includes target object attributes, target object spatial information, relative spatial information between multiple target objects, and global information, the target object feature includes the spatial distribution of the target object, and when the instruction is executed by the device, the test device performs the step of determining the second information based on the target object information, the rendering structure information, and the world space information, including:

[0205] Performing spatial structure analysis on the sub-target object spatial information based on the spatial distribution to determine the spatial information of multiple sub-target objects constituting the target object;

[0206] Integrate and extract the spatial information of the multiple sub-target objects to obtain the spatial information of the target object and the relative spatial information;

[0207] Determining the target object attribute based on the plurality of sub-target object information and the rendering structure information;

[0208] The world space information is processed based on a preset transformation matrix to obtain the global information.

[0209] In one possible implementation, when the instruction is executed by the device, the test device further executes the steps of:

[0210] Acquire operation information, where the operation information is used to represent information generated by a user operating a target object in the screen on the terminal;

[0211] Based on the second information and the operation information, establish an operation model corresponding to the scenario, wherein the scenario is determined based on the second information, and the operation instructions of the operation model are determined based on the number of the same operation information in the same scenario;

[0212] Based on the operation model, a test script corresponding to the scenario is generated.

[0213] In one possible implementation method, the operation includes one or more of single-finger click, single-finger slide, multi-finger click, multi-finger slide, single-finger click + single-finger slide, single-finger click + multi-finger slide, multi-finger click + single-finger slide, multi-finger click + multi-finger slide, click position and slide direction.

[0214] In one possible implementation manner, when the instruction is executed by the apparatus, the test device further performs the steps of:

[0215] Forwarding the first information to the terminal.

[0216] Figure 8 The test device shown can be an electronic device or a circuit device built into the above electronic device. The device can be used to perform the present application Figure 1 The illustrated embodiments provide functions / steps in the method.

[0217] like Figure 8As shown, the test device 900 includes a processor 910 and a memory 920. The processor 910 and the memory 920 can communicate with each other through an internal connection path to transmit control and / or data signals. The memory 920 is used to store computer programs, and the processor 910 is used to call and run the computer program from the memory 920.

[0218] The above-mentioned memory 920 can be a read-only memory (ROM), other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or it can be an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), magnetic disk storage medium or other magnetic storage device, or it can also be any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer.

[0219] The processor 910 and the memory 920 may be combined into a processing device, or more commonly, they are independent components, and the processor 910 is used to execute the program code stored in the memory 920 to implement the above functions. In specific implementation, the memory 920 may also be integrated into the processor 910, or may be independent of the processor 910.

[0220] It should be understood that Figure 8 The test device 900 shown can implement the present application Figure 1 The various processes of the method provided in the illustrated embodiment. The operations and / or functions of the various modules in the test device 900 are respectively to implement the corresponding processes in the above method embodiments. For details, please refer to the present application Figure 1 To avoid repetition, the detailed description of the method embodiment is appropriately omitted here.

[0221] It should be understood that Figure 8 The processor 910 in the test device 900 shown may be a system on chip SOC, which may include a central processing unit (CPU) and may further include other types of processors, such as a graphics processing unit (GPU).

[0222] In summary, the various processors or processing units inside the processor 910 can work together to implement the previous method flow, and the corresponding software programs of the various processors or processing units can be stored in the memory 920.

[0223] The terminal may include: a display screen; one or more processors; a memory; multiple applications; and one or more computer programs. The display screen may include a display screen of an onboard computer (Mobile Data Center); the terminal may be a mobile terminal (mobile phone), a smart screen, a drone, an intelligent connected vehicle (Intelligent Connected Vehicle; hereinafter referred to as ICV), a smart / intelligent car, or an onboard device.

[0224] The present application also provides an electronic device, the device comprising a storage medium and a central processing unit, the storage medium may be a non-volatile storage medium, the storage medium stores a computer executable program, the central processing unit is connected to the non-volatile storage medium, and executes the computer executable program to implement the present application Figure 1 The method provided by the illustrated embodiment.

[0225] In the above embodiments, the processor involved may include, for example, a CPU, a DSP, a microcontroller or a digital signal processor, and may also include a GPU, an embedded neural network processor (Neural-network Process Units; hereinafter referred to as: NPU) and an image signal processor (Image Signal Processing; hereinafter referred to as: ISP). The processor may also include necessary hardware accelerators or logic processing hardware circuits, such as ASIC, or one or more integrated circuits for controlling the execution of the program of the technical solution of the present application. In addition, the processor may have the function of operating one or more software programs, and the software programs may be stored in a storage medium.

[0226] The present application also provides a computer-readable storage medium, in which a computer program is stored. When the computer-readable storage medium is run on a computer, the computer executes the present application. Figure 1 The method provided by the illustrated embodiment.

[0227] The present application also provides a computer program product, which includes a computer program, which, when executed on a computer, enables the computer to execute the present application. Figure 1 The method provided by the illustrated embodiment.

[0228] In the embodiments of the present application, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent the existence of A alone, the existence of A and B at the same time, and the existence of B alone. Among them, A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b and c can be represented by: a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, c can be single or multiple.

[0229] Those of ordinary skill in the art will appreciate that the various units and algorithm steps described in the embodiments disclosed herein can be implemented in a combination of electronic hardware, computer software, and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0230] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0231] In several embodiments provided in the present application, if any function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory; hereinafter referred to as: ROM), random access memory (Random Access Memory; hereinafter referred to as: RAM), disk or optical disk, and other media that can store program codes.

[0232] The above is only a specific implementation of the present application. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. The protection scope of the present application should be based on the protection scope of the claims.

Claims

1. An application testing method, applied to a testing device, wherein the testing device establishes a communication connection with a terminal, wherein the terminal includes an application, wherein the application includes first information, and wherein the first information is used to generate a screen on the terminal, wherein: The method comprises: Obtaining first information sent by the application; Based on the first information and preset target object features, second information corresponding to the target object in the picture is obtained, the first information includes rendering information, the target object features include a first rendering value, and the obtaining of the second information corresponding to the target object in the picture based on the first information and the preset target object features includes: converting the rendering information of the first information into a second rendering value; matching the first rendering value with the second rendering value to obtain a matching result; if the matching result is within a preset range, determining that the target object exists, and obtaining its corresponding target object information, rendering structure information, and world space information from the rendering information; and determining the second information based on the target object information, the rendering structure information, and the world space information; Based on the second information, identifying the scene in which the target object in the picture is located, and calling a preset test script corresponding to the scene, wherein the test script includes a mapping relationship between the scene and a preset operation model, and the operation model includes an operation instruction for performing an operation on the target object in the picture; Based on the test script, the operation instruction is output to the terminal to control the target object in the screen to perform the operation and complete the test.

2. The method according to claim 1, characterized in that The target object is composed of a plurality of sub-target objects, the target object information includes sub-target object information and spatial information, the second information includes target object attributes, target object spatial information, relative spatial information between a plurality of target objects, and global information, the target object feature includes spatial distribution of the target object, and determining the second information based on the target object information, the rendering structure information, and the world spatial information includes: Performing spatial structure analysis on the sub-target object spatial information based on the spatial distribution to determine the spatial information of multiple sub-target objects constituting the target object; Integrate and extract the spatial information of the multiple sub-target objects to obtain the spatial information of the target object and the relative spatial information; Determining the target object attribute based on the plurality of sub-target object information and the rendering structure information; The world space information is processed based on a preset transformation matrix to obtain the global information.

3. The method according to any one of claims 1 to 2, characterized in that: Before identifying the scene where the target object in the picture is located based on the second information and calling a preset test script corresponding to the scene, the method further includes: Acquire operation information, where the operation information is used to represent information generated by a user operating a target object in the screen on the terminal; Based on the second information and the operation information, establish an operation model corresponding to the scenario, wherein the scenario is determined based on the second information, and the operation instructions of the operation model are determined based on the number of the same operation information in the same scenario; Based on the operation model, a test script corresponding to the scenario is generated.

4. The method according to claim 3, characterized in that The operation includes one or more of single-finger click, single-finger slide, multi-finger click, multi-finger slide, single-finger click + single-finger slide, single-finger click + multi-finger slide, multi-finger click + single-finger slide, multi-finger click + multi-finger slide, click position and slide direction.

5. The method according to claim 1, characterized in that The method further comprises: Forwarding the first information to the terminal.

6. An application testing device, wherein the testing device establishes a communication connection with a terminal, wherein the terminal includes an application, and the application includes first information, wherein the first information is used to generate a screen on the terminal, wherein: The test equipment includes: One or more processors; a memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory, and the one or more computer programs include instructions that, when executed by the test device, cause the test device to perform the following steps: Obtaining first information sent by the application; Based on the first information and preset target object features, second information corresponding to the target object in the picture is obtained, the first information includes rendering information, and the target object features include a first rendering value, and the second information corresponding to the target object in the picture is obtained based on the first information and the preset target object features, including: converting the rendering information of the first information into a second rendering value; matching the first rendering value with the second rendering value to obtain a matching result; if the matching result is within a preset range, determining that the target object exists and obtaining its corresponding target object information, rendering structure information, and world space information from the rendering information; Based on the second information, identifying the scene in which the target object in the picture is located, and calling a preset test script corresponding to the scene, wherein the test script includes a mapping relationship between the scene and a preset operation model, and the operation model includes an operation instruction for performing an operation on the target object in the picture; Based on the test script, the operation instruction is output to the terminal to control the target object in the screen to perform the operation and complete the test.

7. The testing device according to claim 6, characterized in that The target object is composed of a plurality of sub-target objects, the target object information includes sub-target object information and spatial information, the second information includes target object attributes, target object spatial information, relative spatial information between a plurality of target objects, and global information, the target object feature includes the spatial distribution of the target object, and when the instruction is executed by the test device, the test device executes the step of determining the second information based on the target object information, the rendering structure information, and the world spatial information, including: Performing spatial structure analysis on the sub-target object spatial information based on the spatial distribution to determine the spatial information of multiple sub-target objects constituting the target object; Integrate and extract the spatial information of the multiple sub-target objects to obtain the spatial information of the target object and the relative spatial information; Determining the target object attribute based on the plurality of sub-target object information and the rendering structure information; The world space information is processed based on a preset transformation matrix to obtain the global information.

8. The testing device according to any one of claims 6 to 7, characterized in that: When the instruction is executed by the test device, before the test device executes the step of identifying the scene where the target object in the picture is located based on the second information and calling a preset test script corresponding to the scene, the test device further executes the step: Acquire operation information, where the operation information is used to represent information generated by a user operating a target object in the screen on the terminal; Based on the second information and the operation information, establish an operation model corresponding to the scenario, wherein the scenario is determined based on the second information, and the operation instructions of the operation model are determined based on the number of the same operation information in the same scenario; Based on the operation model, a test script corresponding to the scenario is generated.

9. The testing device according to claim 8, characterized in that The operation includes one or more of single-finger click, single-finger slide, multi-finger click, multi-finger slide, single-finger click + single-finger slide, single-finger click + multi-finger slide, multi-finger click + single-finger slide, multi-finger click + multi-finger slide, click position and slide direction.

10. The testing device according to claim 6, characterized in that When the instruction is executed by the test device, the test device further executes the steps of: Forwarding the first information to the terminal.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed on a computer, enables the computer to execute the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Automated testing method and apparatus and mobile terminal

    CN105550114A

  • Scene recognition method and device and computer readable storage medium

    CN110751013A