Application Testing Method, Device, Equipment, and Storage Medium

By obtaining the screen size information and APP control information of the smart TV side, determining the grid and controls, configuring test operations, and realizing automated testing, the problem of low testing efficiency of the smart TV side APP is solved and the testing efficiency is improved.

CN118283353BActive Publication Date: 2025-05-27北京视游互动科技有限公司
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202410330803.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-21
Publication Date
2025-05-27
Estimated Expiration
2044-03-21

AI Technical Summary

Technical Problem

In the prior art, the testing efficiency of smart TV APP is low, mainly due to the need for manual repetitive tests, which leads to long time and high labor costs.

Method used

By obtaining the screen size information of the test terminal and the control information of the APP to be tested, determining the corresponding grid and controls, configuring the test operations of the target grid, realizing functional testing of the controls, thereby generating test results.

Benefits of technology

Programming the application test process, realizing automated repetitive testing on test terminals of the same screen size, significantly improving the APP testing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118283353B_ABST
    Figure CN118283353B_ABST
Patent Text Reader

Abstract

An embodiment of the present invention provides a method, device, equipment and storage medium for application testing, including: obtaining first screen size information of a first test terminal and control information corresponding to an application to be tested; determining a first grid corresponding to the application to be tested on the screen of the first test terminal according to the first screen size information and the control information; determining a control corresponding to the application to be tested on the screen of the first test terminal according to the control information; determining a first target grid in the first grid that matches the display position corresponding to the control on the screen of the first test terminal; configuring a test operation corresponding to the first target grid, where the test operation is used to perform a function test on the control; and executing the test operation corresponding to the first target grid through the first test terminal to generate a test result of the application to be tested on the first test terminal. This solution realizes automated application testing that matches the test terminal and improves the efficiency of application testing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technologies, and in particular, to an application testing method, apparatus, device, and storage medium. Background Art

[0002] An intelligent TV refers to a TV device integrated with Internet functions and intelligent applications, such as a TV device equipped with the Android operating system and capable of connecting to the Internet. With the development of smartphone applications (APPs), more and more mobile APPs are transplanted to the intelligent TV side for use to achieve various functions such as web browsing, video playing, chatting, and office work. Since an intelligent TV cannot directly perform touch screen operations like a smartphone and usually performs human-computer interaction through a remote control, when transplanting a mobile APP to the intelligent TV side, it is necessary to first modify the mobile APP according to the intelligent TV interface and the operation method of the intelligent TV to generate a TV version APP adapted to the intelligent TV, and then install the TV version APP on the intelligent TV.

[0003] In order to ensure that the TV version APP can run normally, before releasing the TV version APP, it is necessary to test the TV version APP on the intelligent TV, such as testing different functions in the APP and the running situation of the APP on intelligent TV devices of different models, etc. In the related art, manual testing is mostly used, with a long testing time and high labor costs. Summary of the Invention

[0004] Embodiments of the present invention provide an application testing method, apparatus, device, and storage medium to improve the testing efficiency of APPs on the intelligent TV side.

[0005] In a first aspect, embodiments of the present invention provide an application testing method, the method including:

[0006] Obtain the first screen size information of a first test terminal and the control information corresponding to the application to be tested;

[0007] Determine a first grid corresponding to the application to be tested on the screen of the first test terminal according to the first screen size information and the control information;

[0008] Determine the controls corresponding to the application to be tested on the screen of the first test terminal according to the control information;

[0009] Determine a first target grid in the first grid that matches the display position corresponding to the control on the screen of the first test terminal;

[0010] Configure a test operation corresponding to the first target grid, where the test operation is used to perform a functional test on the control;

[0011] Execute the test operation corresponding to the first target grid through the first test terminal to generate a test result of the application under test on the first test terminal.

[0012] In a second aspect, an embodiment of the present invention provides an application testing apparatus, where the apparatus includes:

[0013] An acquisition module, configured to acquire first screen size information of a first test terminal and control information corresponding to an application under test;

[0014] A processing module, configured to determine a first grid corresponding to the application under test on the screen of the first test terminal according to the first screen size information and the control information; determine a control corresponding to the application under test on the screen of the first test terminal according to the control information; determine a first target grid in the first grid that matches the display position corresponding to the control on the screen of the first test terminal; configure a test operation corresponding to the first target grid, where the test operation is used to perform a functional test on the control;

[0015] A test module, configured to execute the test operation corresponding to the first target grid through the first test terminal to generate a test result of the application under test on the first test terminal.

[0016] In a third aspect, an embodiment of the present invention provides an electronic device, including: a memory, a processor, and a communication interface; where an executable code is stored on the memory, and when the executable code is executed by the processor, the processor can at least implement the application testing method as described in the first aspect.

[0017] In a fourth aspect, an embodiment of the present invention provides a non-transitory machine-readable storage medium, on which an executable code is stored, and when the executable code is executed by a processor of an electronic device, the processor can at least implement the application testing method as described in the first aspect.

[0018] In the solution provided by the embodiments of the present invention, when it is necessary to test the running situation of an application on a certain terminal device (such as a smart TV of a certain model), first, obtain the screen size information of the test terminal and the control information corresponding to the application to be tested. Then, according to the screen size information and the control information, determine the grid corresponding to the application to be tested on the screen of the test terminal, and the grid matches the screen size of the test terminal; and according to the control information, determine the control corresponding to the application to be tested on the screen of the test terminal. After that, determine the target grid in the grid that matches the display position of the control on the screen of the first test terminal, and configure the test operation corresponding to the target grid. Among them, since the position of the target grid in the grid displayed on the screen of the test terminal matches the position of the control displayed on the screen, the function test of the control can be realized by configuring the test operation on the grid. Finally, execute the test operation corresponding to the target grid through the test terminal to generate the test result of the application to be tested on the test terminal. In this solution, by configuring the test operation on the grid, the test process of the application is programmed, so that automated repetitive tests can be performed on test terminals with the same screen size, improving the test efficiency of the application. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained according to these drawings.

[0020] Figure 1 It is a flowchart of a method for testing an application provided by an embodiment of the present invention;

[0021] Figure 2 It is a schematic diagram of a first grid provided by an embodiment of the present invention;

[0022] Figure 3 It is a flowchart of another method for testing an application provided by an embodiment of the present invention;

[0023] Figure 4 It is a schematic diagram of the structure of an application testing device provided by an embodiment of the present invention;

[0024] Figure 5 For Figure 4 It is a schematic diagram of the structure of an electronic device corresponding to the application testing device provided by the shown embodiment. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0025] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Apparently, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0026] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the embodiments of the present invention are all information and data authorized by the user or fully authorized by all parties. Moreover, the collection, use, and processing of relevant data need to comply with the relevant laws, regulations, and standards of relevant countries and regions, and corresponding operation entrances are provided for users to choose to authorize or refuse.

[0027] The following will describe in detail some embodiments of the present invention with reference to the accompanying drawings. Without conflict between the embodiments, the following embodiments and the features in the embodiments can be combined with each other. In addition, the step timings in the following method embodiments are only examples and are not strictly limited.

[0028] When an application program (abbreviated as APP) adapted to a smart TV is being tested, on the one hand, a large number of repetitive tests need to be carried out on different smart TVs of the same model to determine the running situation of the APP on the smart TVs of this model; on the other hand, a large number of repetitive tests also need to be carried out on smart TVs of different models produced by different manufacturers to determine the adaptation situation of the APP to smart TVs of different models.

[0029] In practical applications, since the control operations of the APP on the smart TV side are usually realized through a remote control, and there are differences in the screen sizes of smart TVs of different models, the operable controls in the APP have different display effects on smart TVs of different models. For example, they are displayed at different positions on the screen of the smart TV. Therefore, the manual test method is mostly adopted to test the APP on each smart TV, which takes a long test time and has a high labor cost.

[0030] To solve the above at least one technical problem, the embodiments of the present invention provide an automated application program test method to improve the test efficiency of the APP on the smart TV side. It should be noted that the application program test method provided in this embodiment is also applicable to the test of application programs such as mobile phone side APPs, and is not limited to the APP on the smart TV side.

[0031] The application testing method provided by the embodiments of the present invention can be executed by an electronic device, which can be a terminal device such as a smart TV, a PC, a laptop, a smart phone, etc., or a server. The server can be a physical server including an independent host, or can also be a virtual server, or can also be a cloud server or a server cluster.

[0032] Figure 1 is a flowchart of an application testing method provided by the embodiments of the present invention. As Figure 1 shown, it may include the following steps:

[0033] 101. Obtain the first screen size information of the first test terminal and the control information corresponding to the application to be tested.

[0034] 102. Determine the first grid corresponding to the application to be tested on the screen of the first test terminal according to the first screen size information and the control information.

[0035] 103. Determine the controls corresponding to the application to be tested on the screen of the first test terminal according to the control information.

[0036] 104. Determine the first target grid in the first grid that matches the display position corresponding to the control on the screen of the first test terminal.

[0037] 105. Configure the test operations corresponding to the first target grid, and the test operations are used to perform functional tests on the controls.

[0038] 106. Execute the test operations corresponding to the first target grid through the first test terminal to generate the test results of the application to be tested on the first test terminal.

[0039] In this embodiment, taking the first test terminal as a smart TV as an example, the testing process of the APP to be tested on a smart TV of a certain model is illustrated. Generally speaking, first, for the smart TV of this model, the testing process of the APP to be tested is configured, and then, based on the configuration result, the APP to be tested is tested.

[0040] Specifically, when it is necessary to test the running situation of the APP to be tested on a smart TV of a certain model, first, obtain the screen size information of the smart TV, such as: the diagonal length, length, height, etc. of the smart TV screen; and the control information corresponding to the APP to be tested, such as: the number of controls included in the APP to be tested, the control size, etc.

[0041] Then, based on the screen size information of the smart TV and the control information of the APP to be tested, determine the first grid corresponding to the APP to be tested on the screen of the smart TV. The number and size of the grids included in the first grid match the screen size of the smart TV and the number and size of the controls of the APP to be tested. Generally speaking, it is to divide the screen area of the smart TV into grids according to the screen size of the smart TV and the number and size of the controls of the APP to be tested, and the result of the grid division is the first grid. If the screen size of the smart TV is large, the number of controls of the APP to be tested is small, and the control size is large, then the number of grids included in the first grid is small, and the size of each grid is large; if the screen size of the smart TV is small, the number of controls of the APP to be tested is large, and the control size is small, then the number of grids included in the first grid is large, and the size of each grid is small.

[0042] It can be understood that each APP contains multiple program interfaces. For example: login interface, application main interface (i.e., the interface that provides application software functions, such as the game interface in a game APP), logout interface, etc. The control information corresponding to each program interface is different. For example: the login interface only contains one login control, while the application main interface contains multiple controls that provide different functions.

[0043] As an optional way to determine the first grid, the number and / or size of the controls corresponding to each program interface in the APP to be tested can be determined according to the control information of the APP to be tested; then, based on the screen size information of the smart TV and the number and / or size of the controls corresponding to each program interface, determine the first grid corresponding to each program interface on the screen of the smart TV.

[0044] In the specific implementation process, for any one of the program interfaces corresponding to the APP to be tested (referred to as the target program interface), when determining the first grid corresponding to the target program interface on the screen of the smart TV, first, determine the first threshold range to which the number of controls corresponding to the target program interface belongs, and / or the second threshold range to which the control size belongs; then, according to the first threshold range and / or the second threshold range, and the pre-configured correspondence between the threshold range and the grid size, determine the target grid size; finally, based on the screen size of the smart TV and the target grid size, determine the first grid corresponding to the target program interface on the screen of the smart TV. Among them, in the first grid, the grid size corresponding to each grid matches the target grid size. For example: the grid size corresponding to each grid is the target grid size, and each grid can be uniquely identified by a number or the like. Optionally, the grid size can be represented by the ratio of the length of a single grid to the length of the smart TV screen, and the ratio of the height of a single grid to the height of the smart TV screen.

[0045] Optionally, the correspondence between different numbers and / or sizes of controls and the grid size, that is, the correspondence between the above-mentioned threshold range and the grid size, can be pre-configured by means of customization or the like. For example, when the number of controls is within the first numerical range, it corresponds to the grid size 1; when the number of controls is within the second numerical range, it corresponds to the grid size 2; when the control size is within the first size range, it corresponds to the grid size 3; when the control size is within the second size range, it corresponds to the grid size 4, etc.

[0046] For ease of understanding, take the APP to be tested as a certain game APP as an example for illustration. Figure 2 This is a schematic diagram of a first grid provided by an embodiment of the present invention, where Figure 2 the left figure in is a schematic diagram of the first grid corresponding to the login interface, Figure 2 and the right figure in is a schematic diagram of the first grid corresponding to the game interface. Among them, the login interface only contains one login control, and the game interface contains controls such as sign-in, mailbox, activity, character, skill, friend, backpack, etc.

[0047] Assume that the pre-configured correspondence between the threshold range and the grid size is: when the number of controls is equal to 1, it corresponds to the grid size a (for example, the ratio of the length of a single grid to the length of the smart TV screen is 1:1, and the ratio of the height of a single grid to the height of the smart TV screen is 1:1); when the number of controls is greater than 1 and less than or equal to 4, it corresponds to the grid size b (for example, the ratio of the length of a single grid to the length of the smart TV screen is 1:2, and the ratio of the height of a single grid to the height of the smart TV screen is 1:2); when the number of controls is greater than 4 and less than or equal to 10, it corresponds to the grid size c (the ratio of the length of a single grid to the length of the smart TV screen is 1:5, and the ratio of the height of a single grid to the height of the smart TV screen is 1:3).

[0048] Based on the above assumption, when the target program interface is the login interface, the number of controls is 1. Based on the pre-configured correspondence between the threshold range and the grid size, the target grid size is determined to be the grid size a; according to the screen size of the smart TV and the grid size a, it is determined that the first grid corresponding to the login interface on the smart TV screen is the entire area of the login interface. In other words, the first grid corresponding to the login interface only contains one grid, and this grid covers the entire area of the login interface, as shown in the left figure in Figure 2 as shown in the left figure in.

[0049] When the target program interface is a game interface, the number of controls is 7, corresponding to the threshold range "the number of controls is greater than 4 and less than or equal to 10". Based on the pre-configured correspondence between the threshold range and the grid size, the target grid size is determined to be grid size c; according to the screen size of the smart TV and grid size c, the first grid corresponding to the game interface on the screen of the smart TV is determined. As Figure 2 shown in the right figure of

[0050] The above process of determining the first grid corresponding to the target program interface according to the number of controls is described. The process of determining the first grid corresponding to the target program interface according to the control size is similar to the above process. For example, assume that it is pre-configured that "when the length of the control is greater than m and less than or equal to M, and the height is greater than n and less than or equal to N, it corresponds to grid size c", and the control size of each control in the game program interface is L*H (length * height), where L is greater than m and less than or equal to M, and H is greater than n and less than or equal to N. Based on this assumption, when the target program interface is a game interface, the control size L*H corresponds to the threshold range "the length of the control is greater than m and less than or equal to M, and the height is greater than n and less than or equal to N". Based on the pre-configured correspondence between the threshold range and the grid size, the target grid size corresponding to the game interface can be determined to be grid size c. According to the screen size of the smart TV and grid size c, the first grid corresponding to the game interface on the screen of the smart TV is determined. As Figure 2 shown in the right figure of

[0051] Optionally, when determining the first grid corresponding to the target program interface according to both the number of controls and the control size, if the first target grid size determined based on the pre-configured correspondence between the number of controls and the grid size is different from the second target grid size determined based on the pre-configured correspondence between the control size and the grid size, then the target grid size is determined from the first target grid size and the second target grid size. For example: select the larger of the two as the target grid size, or select the smaller of the two as the target grid size.

[0052] As Figure 2 shown in the right figure of

[0053] In the specific implementation process, the controls corresponding to the APP to be tested on the screen of the smart TV can be determined according to the control information of the APP to be tested. Then, the target grid in the first grid that matches the display position corresponding to the control on the screen of the first test terminal is determined.

[0054] In an alternative embodiment, the first coordinate range corresponding to each grid in the first grid in the screen coordinate system of the smart TV and the second coordinate range corresponding to the control of the APP to be tested in the screen coordinate system of the smart TV can be determined first; then, according to the first coordinate range and the second coordinate range, the grid in the first grid that matches the display position corresponding to the control on the screen of the first test terminal is determined as the target grid. Wherein, the second coordinate range corresponding to the control is within the first coordinate range corresponding to the target grid, that is, the first coordinate range corresponding to the target grid covers the second coordinate range corresponding to the control.

[0055] In another alternative embodiment, a visualization interface is provided. The first grid and the control are displayed in the visualization interface, and both the first grid and the control correspond to the screen coordinate system of the smart TV, so that the target grid can be determined from the first grid based on operations such as clicking on the control by the user. Specifically, in response to a trigger operation on the control of the APP to be tested by the user, the target coordinate value corresponding to the operation position of the trigger operation in the screen coordinate system is obtained; then, according to the target coordinate value and the first coordinate range corresponding to each grid in the first grid, the target grid in the first grid that matches the display position corresponding to the control on the screen of the first test terminal is determined. Wherein, the target coordinate value is within the first coordinate range corresponding to the target grid.

[0056] It can be understood that when determining the target grid in the first grid that matches the display position corresponding to the control on the screen of the first test terminal, the target grid can be determined for each program interface of the APP to be tested respectively. Specifically, for the target program interface, the target grid in the first grid corresponding to the target program interface that matches the display position corresponding to the control in the target program interface on the screen of the first test terminal is determined.

[0057] Still taking Figure 2 the game interface shown in the right figure in as an example, for example, based on the coordinate range corresponding to the "sign-in" control, the grid in the first row and the first column of the first grid corresponding to the game interface can be determined as the target grid; or, in response to a trigger operation such as clicking on the "sign-in" control by the user, the grid in the first row and the first column of the first grid corresponding to the game interface is determined as the target grid.

[0058] After determining the target grids corresponding to the program to be tested, configure the test operations for each target grid. Among them, since the display positions of the target grids on the screen of the smart TV match the display positions of the controls on the screen of the smart TV, therefore, by triggering test operations on the areas corresponding to the target grids, such as simulating touch screen operations, the triggering of the controls can be achieved, that is, configuring test operations for the target grids can achieve the functional testing of the controls.

[0059] It can be understood that when there is a functional association between controls, there will be a sequence of triggering between different controls. Simply put, there may be a cascading relationship between different controls. There may be multiple secondary controls associated with a primary control, and there may be tertiary controls associated with the secondary controls. The triggering of a secondary control requires the prior triggering of the primary control, and the triggering of a tertiary control requires the prior triggering of the secondary control. In addition, for controls without functional association in the same program interface, it is also necessary to determine their corresponding order of testing, such as: testing in the order from left to right and from top to bottom according to the positions of the controls. Therefore, when configuring test operations for the target grids, if there is more than one target grid, it is necessary to configure the priority of the test operations corresponding to each target grid based on the triggering order of the controls or the testing order of the controls.

[0060] In addition, different controls of the APP to be tested correspond to different functions, and the corresponding operations also have differences. For example: clicking on the login control in the game APP once can trigger the login, while the skill control may need to be clicked 100 times continuously to trigger the release of a certain skill. Therefore, when configuring test operations for the target grids, it is also necessary to configure the number of test operations based on the functions of the controls.

[0061] In addition, after different controls are triggered, the time to obtain the corresponding APP content is different. For example: when the content corresponding to a certain control is pre-cached locally, in response to the triggering operation of the control, the content can be quickly loaded and the corresponding content can be displayed; while when the content corresponding to a certain control needs to be obtained through data calculation or needs to be obtained from the cloud, in response to the triggering operation of the control, it takes a certain period of time to obtain the corresponding content. It can be understood that if other controls are triggered before the content corresponding to a certain control is loaded completely, it will affect the test effect of the functions corresponding to the controls. Therefore, when configuring test operations for the target grids, it is also necessary to configure the time interval between adjacent two test operations based on the response time corresponding to the controls.

[0062] Optionally, a corresponding visualization interface may be provided to configure, through the visualization interface, the test operation priorities, the number of test operations, and the time intervals between two adjacent test operations respectively corresponding to each target grid among the multiple target grids according to the control functions of the controls corresponding to the multiple target grids. Among them, the test operations include simulated touch screen operations.

[0063] Finally, according to the test operation configuration results for the target grids, a test configuration file corresponding to the APP to be tested on the smart TV is generated; by executing the test operations corresponding to each target grid in the test configuration file on the smart TV, the test results of the APP to be tested on the smart TV are generated.

[0064] Specifically, the smart TV triggers test operations on the target screen area according to the test priorities corresponding to each target grid described in the test configuration file, where the target screen area is the area corresponding to the current target grid to be tested in the screen coordinate system of the smart TV.

[0065] If the test operations corresponding to multiple target grids in the test configuration file are all completed, it is determined that the test of the APP to be tested on the smart TV is completed, that is, the APP to be tested passes the test; if the test operations corresponding to multiple target grids in the test configuration file are not completed, the corresponding test log is obtained to determine the reason why the APP to be tested fails the test.

[0066] It can be understood that the screen sizes corresponding to smart TVs of the same model are the same. Therefore, after completing the test operation configuration corresponding to a certain model of smart TV for the APP to be tested, that is, after obtaining the test configuration file corresponding to the test operation configured for the target grid, the test operation configuration file can be executed on different smart TVs of this model to implement the test operations of the APP to be tested on different smart TVs of this model and improve the test efficiency.

[0067] In summary, when it is necessary to test the running status of an application on a certain terminal device (such as a smart TV of a certain model), first, obtain the screen size information of the test terminal and the control information corresponding to the application to be tested. Then, according to the screen size information and the control information, determine the grid corresponding to the application to be tested on the screen of the test terminal, and the grid matches the screen size of the test terminal; and according to the control information, determine the control corresponding to the application to be tested on the screen of the test terminal. After that, determine the target grid in the grid that matches the display position of the control on the screen of the first test terminal, and configure the test operation corresponding to the target grid. Among them, since the display position of the target grid in the grid on the screen of the test terminal matches the display position of the control on the screen, functional testing of the control can be achieved by configuring the test operation for the grid. Finally, execute the test operation corresponding to the target grid through the test terminal to generate the test result of the application to be tested on the test terminal. In this solution, by configuring the test operation for the grid, the test process of the application is programmed, so that automated repetitive testing can be performed on different test terminals with the same screen size, improving the test efficiency of the application.

[0068] In practical applications, it is also necessary to perform functional testing on the APP to be tested on test terminals of different models. In this implementation, by configuring the test operation based on the target grid, the test efficiency of the APP to be tested on test terminals of different models can be effectively improved. The following is an elaboration.

[0069] Figure 3 It is a flowchart of another application testing method provided by an embodiment of the present invention. As Figure 3 shown, it may include the following steps:

[0070] 301. Obtain the first screen size information of the first test terminal and the control information corresponding to the application to be tested.

[0071] 302. According to the first screen size information and the control information, determine the first grid corresponding to the application to be tested on the screen of the first test terminal; according to the control information, determine the control corresponding to the application to be tested on the screen of the first test terminal.

[0072] 303. Determine the first target grid in the first grid that matches the display position of the control on the screen of the first test terminal; configure the test operation corresponding to the first target grid, and the test operation is used to perform functional testing on the control.

[0073] 304. Obtain the second screen size information of the second test terminal.

[0074] 305. If the second screen size information is different from the first screen size information, determine the second grid corresponding to the screen of the application under test on the second test terminal and the correspondence between the first grid and the second grid according to the first screen size information, the second screen size information, and the first grid.

[0075] 306. Determine the second target grid corresponding to the first target grid in the second grid and the test operation corresponding to the second target grid according to the correspondence and the test operation corresponding to the first target grid.

[0076] 307. Execute the test operation corresponding to the second target grid through the second test terminal to generate the test result of the application under test on the second test terminal.

[0077] Among them, the specific implementation processes of steps 301 to 304 can refer to the foregoing embodiments and will not be elaborated in this embodiment. It should be noted that "first" and "second" in this embodiment are used to distinguish different test terminals, as well as the screen size information corresponding to the test terminals, the grids corresponding to the screen of the APP under test on the test terminals, the target grids, etc.

[0078] In this embodiment, for the same APP under test, after the test operation configuration corresponding to the first target grid is completed based on the first test terminal, if it is desired to test the APP under test on the second test terminal, steps 305 to 307 can be implemented. Among them, still taking the first test terminal and the second test terminal as smart TVs, the second test terminal and the first test terminal are smart TVs of different models.

[0079] It can be understood that smart TVs of different models may have the same or different screen sizes. Therefore, when testing the APP under test on the second test terminal, first, obtain the second screen size information of the second test terminal.

[0080] After that, if the second screen size information is the same as the first screen size information, the test operation configured for the first target grid can be directly executed on the second test terminal to generate the test result of the APP under test on the second test terminal.

[0081] If the second screen size information is different from the first screen size information, determine the second grid corresponding to the screen of the APP under test on the second test terminal and the correspondence between the first grid and the second grid according to the first screen size information, the second screen size information, and the first grid.

[0082] Among them, the first screen size information includes the first screen length and the first screen height, and the second screen size information includes the second screen length and the second screen height. Optionally, according to the ratio of the first screen length to the second screen length and the ratio of the first screen height to the second screen height, the lengths and heights of the grids in the first grid can be enlarged or reduced in corresponding proportions. For example, when the ratio is greater than 1, the lengths and heights of the grids in the first grid are reduced; when the ratio is less than 1, the lengths and heights of the grids in the first grid are enlarged. Optionally, the above-mentioned enlargement or reduction ratio is equal to this ratio. Thus, the grid obtained after enlarging or reducing the first grid is determined as the second grid corresponding to the screen of the APP to be tested on the second test terminal.

[0083] Since the second grid is determined by enlarging or reducing the first grid, each grid in the second grid corresponds one-to-one with each grid in the first grid. Therefore, according to the correspondence between the first grid and the second grid, the second target grid corresponding to the first target grid in the second grid can be determined; and the test operation corresponding to the first target grid is determined as the test operation corresponding to the second target grid.

[0084] Finally, by executing the test operation corresponding to the second target grid on the second test terminal, the test result of the APP to be tested on the second test terminal can be generated.

[0085] In this embodiment, by configuring the test operations for the target grids corresponding to the controls of the APP to be tested, the test operations configured under one model of test terminal (i.e., the first test terminal) can be conveniently and quickly migrated and applied to another model of test terminal (i.e., the second test terminal) for testing the APP to be tested, without the need for secondary test operation configuration, thereby effectively improving the test efficiency when the APP to be tested is tested on different models of test terminals.

[0086] The application program test devices of one or more embodiments of the present invention will be described in detail below. Those skilled in the art can understand that these devices can all be configured by using commercially available hardware components through the steps taught by this solution.

[0087] Figure 4 For the structural schematic diagram of an application program test device provided by an embodiment of the present invention, as Figure 4 shown, the device includes: an acquisition module 11, a processing module 12, and a test module 13.

[0088] The acquisition module 11 is used to acquire the first screen size information of the first test terminal and the control information corresponding to the application program to be tested;

[0089] A processing module 12, configured to determine a first grid corresponding to the application under test on the screen of the first test terminal according to the first screen size information and the control information; determine a control corresponding to the application under test on the screen of the first test terminal according to the control information; determine a first target grid in the first grid that matches the display position corresponding to the control on the screen of the first test terminal; configure a test operation corresponding to the first target grid, where the test operation is used to perform a function test on the control.

[0090] A testing module 13, configured to execute the test operation corresponding to the first target grid through the first test terminal to generate a test result of the application under test on the first test terminal.

[0091] Optionally, the control information includes: the number of controls and / or the size of controls respectively corresponding to each program interface in the application under test. The processing module 12 is specifically configured to determine a first grid respectively corresponding to each program interface on the screen of the first test terminal according to the first screen size information and the number of controls and / or the size of controls respectively corresponding to each program interface.

[0092] Optionally, the processing module 12 is further specifically configured to determine a first threshold range to which the number of controls corresponding to the target program interface belongs, and / or a second threshold range to which the control size belongs, where the target program interface is any one of the program interfaces in the application under test; determine a target grid size according to the first threshold range and / or the second threshold range, and the corresponding relationship between the pre-configured threshold range and the grid size; determine a first grid corresponding to the target program interface on the screen of the first test terminal according to the first screen size and the target grid size.

[0093] Optionally, the processing module 12 is further specifically configured to determine the first coordinate ranges corresponding to the grids in the first grid in the screen coordinate system of the first test terminal, and the second coordinate range corresponding to the control of the application under test in the screen coordinate system; determine the first target grid in the first grid that matches the display position corresponding to the control on the screen of the first test terminal according to the first coordinate range and the second coordinate range; wherein, the second coordinate range is within the first coordinate range corresponding to the first target grid; or, in response to a trigger operation on the control of the application under test by the user, obtain the target coordinate value corresponding to the operation position of the trigger operation in the screen coordinate system; determine the first target grid in the first grid that matches the display position corresponding to the control on the screen of the first test terminal according to the target coordinate value and the first coordinate range; wherein, the target coordinate value is within the first coordinate range corresponding to the first target grid.

[0094] Optionally, the number of the first target grids is multiple, and the processing module 12 is further specifically configured to configure the test operation priorities, the test operation times, and the time intervals between two adjacent test operations corresponding to each of the first target grids in the multiple first target grids according to the control functions of the controls corresponding to the multiple first target grids, and the test operations include simulated touch screen operations.

[0095] Optionally, the test module 13 is specifically configured to trigger the test operation on the target screen area through the first test terminal according to the test priority, where the target screen area is the area corresponding to the current first target grid to be tested in the screen coordinate system of the first test terminal; if the test operations corresponding to the multiple first target grids are all executed, it is determined that the application under test is tested and completed on the first test terminal.

[0096] Optionally, the acquisition module 11 is further configured to acquire the second screen size information of the second test terminal.

[0097] The processing module 12 is further configured to, if the second screen size information is different from the first screen size information, determine the second grid corresponding to the screen of the application under test on the second test terminal and the corresponding relationship between the first grid and the second grid according to the first screen size information, the second screen size information, and the first grid; determine the second target grid corresponding to the first target grid in the second grid and the test operation corresponding to the second target grid according to the corresponding relationship and the test operation corresponding to the first target grid.

[0098] The test module 13 is further configured to execute a test operation corresponding to the second target grid through the second test terminal, so as to generate a test result of the application to be tested on the second test terminal.

[0099] Figure 4 The device shown can execute the steps introduced in the foregoing embodiments. For the detailed execution process and technical effects, refer to the descriptions in the foregoing embodiments, which will not be elaborated here.

[0100] In a possible design, the above Figure 4 The structure of the application test device shown can be implemented as an electronic device, such as Figure 5 shown, the electronic device may include: a memory 21, a processor 22, and a communication interface 23. Among them, executable code is stored on the memory 21. When the executable code is executed by the processor 22, the processor 22 can at least implement the application test method provided in the foregoing embodiments.

[0101] In addition, an embodiment of the present invention provides a non-transitory machine-readable storage medium, on which executable code is stored. When the executable code is executed by a processor of an electronic device, the processor can at least implement the application test method provided in the foregoing embodiments.

[0102] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art can understand and implement it without creative efforts.

[0103] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of adding a necessary general hardware platform, and of course, can also be implemented by a combination of hardware and software. Based on such an understanding, the essence of the above technical solution, or the part that contributes to the prior art, can be embodied in the form of a computer product. The present invention can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memories, CD-ROMs, optical memories, etc.) containing computer-usable program codes.

[0104] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. An application testing method, characterized in that: include: Acquire first screen size information of the first test terminal and control information corresponding to the application to be tested; The control information includes: the number of controls and / or control sizes corresponding to each program interface in the application to be tested; Determining first grids corresponding to each of the program interfaces on the screen of the first test terminal according to the first screen size information and the number of controls and / or control sizes corresponding to each of the program interfaces; Determining, according to the control information, a control corresponding to the application to be tested on the screen of the first test terminal; Determine a first target grid in the first grid that matches a display position corresponding to the control on the screen of the first test terminal; Configuring a test operation corresponding to the first target grid, wherein the test operation is used to perform a functional test on the control; Executing a test operation corresponding to the first target grid through the first test terminal to generate a test result of the application to be tested in the first test terminal; The determining, according to the first screen size information and the number of controls and / or control sizes respectively corresponding to the respective program interfaces, first grids respectively corresponding to the respective program interfaces on the screen of the first test terminal includes: Determine a first threshold range to which the number of controls corresponding to a target program interface belongs, and / or a second threshold range to which the control size belongs, wherein the target program interface is any one of the program interfaces in the application to be tested; Determine a target grid size according to the first threshold range and / or the second threshold range, and a correspondence between a pre-configured threshold range and a grid size; A first grid corresponding to the target program interface on the screen of the first test terminal is determined according to the first screen size and the target grid size.

2. The method according to claim 1, characterized in that The determining a first target grid in the first grid that matches a display position corresponding to the control on the screen of the first test terminal includes: Determine a first coordinate range corresponding to each grid in the first grid in the screen coordinate system of the first test terminal, and a second coordinate range corresponding to the control of the application to be tested in the screen coordinate system; Determine, according to the first coordinate range and the second coordinate range, a first target grid in the first grid that matches the display position corresponding to the control on the screen of the first test terminal; wherein the second coordinate range is within the first coordinate range corresponding to the first target grid; or In response to a trigger operation of a control of the application to be tested by a user, obtaining a target coordinate value corresponding to an operation position corresponding to the trigger operation in the screen coordinate system; According to the target coordinate value and the first coordinate range, a first target grid in the first grid that matches the display position corresponding to the control on the screen of the first test terminal is determined; wherein the target coordinate value is within the first coordinate range corresponding to the first target grid.

3. The method according to claim 1, characterized in that The number of the first target grids is multiple, and the configuring the test operation corresponding to the first target grid includes: According to the control functions of the controls corresponding to the multiple first target grids, the test operation priority, the number of test operations and the time interval between two adjacent test operations corresponding to each first target grid in the multiple first target grids are configured, and the test operation includes a simulated touch screen operation.

4. The method according to claim 3, characterized in that The test operation corresponding to the first target grid is performed by the first test terminal to generate a test result of the application to be tested in the first test terminal. triggering the test operation on a target screen area according to the test priority through the first test terminal, where the target screen area is an area corresponding to a first target grid currently to be tested in a screen coordinate system of the first test terminal; If the test operations corresponding to the plurality of first target grids are all executed, it is determined that the test of the application to be tested is completed in the first test terminal.

5. The method according to claim 1, characterized in that The method further comprises: Acquire second screen size information of a second test terminal; If the second screen size information is different from the first screen size information, determining a second grid corresponding to the screen of the second test terminal for the application to be tested, and a correspondence between the first grid and the second grid according to the first screen size information, the second screen size information and the first grid; Determine, according to the corresponding relationship and the test operation corresponding to the first target grid, a second target grid in the second grid corresponding to the first target grid and a test operation corresponding to the second target grid; The test operation corresponding to the second target grid is performed through the second test terminal to generate a test result of the application to be tested in the second test terminal.

6. An application testing device, characterized in that: include: An acquisition module, used to acquire first screen size information of a first test terminal and control information corresponding to an application to be tested; The control information includes: the number of controls and / or control sizes corresponding to each program interface in the application to be tested; A processing module, used to determine the first grids corresponding to the respective program interfaces on the screen of the first test terminal according to the first screen size information and the number of controls and / or control sizes corresponding to the respective program interfaces; determine the controls corresponding to the application to be tested on the screen of the first test terminal according to the control information; determine a first target grid in the first grid that matches the display position corresponding to the control on the screen of the first test terminal; configure a test operation corresponding to the first target grid, the test operation being used to perform a functional test on the control; A testing module, configured to execute a test operation corresponding to the first target grid through the first test terminal to generate a test result of the application to be tested in the first test terminal; The processing module is specifically used to: determine a first threshold range to which the number of controls corresponding to a target program interface belongs, and / or a second threshold range to which the control size belongs, wherein the target program interface is any one of the program interfaces in the application to be tested; determine a target grid size based on the first threshold range and / or the second threshold range, and a correspondence between a pre-configured threshold range and a grid size; and determine a first grid corresponding to the target program interface on the screen of the first test terminal based on the first screen size and the target grid size.

7. An electronic device, characterized in that: include: A memory, a processor, and a communication interface; wherein the memory stores executable code, and when the executable code is executed by the processor, the processor executes the application testing method as described in any one of claims 1 to 5.

8. A non-transitory machine-readable storage medium, characterized in that: The non-transitory machine-readable storage medium stores executable code, and when the executable code is executed by a processor of an electronic device, the processor is caused to execute the application testing method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Test method and test terminal

    CN105930261A

  • Application program testing method and device, electronic equipment and storage medium

    CN111324531A

  • Terminal test method and device, storage medium and terminal

    CN113282488A