Automated testing device, method, medium and terminal

CN115840709BActive Publication Date: 2025-08-26SPREADTRUM COMMUNICATION (SHANGHAI) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211663225.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-23
Publication Date
2025-08-26
Estimated Expiration
2042-12-23

AI Technical Summary

Technical Problem

[0008]本发明提供了一种自动化测试装置、方法、介质及终端,以解决现有技术中的测试效率低下、测试成本高的技术问题

Benefits of technology

[0010] Its beneficial effect is that: the present invention provides a testing technology solution that is not restricted by the existing calling logic through the first execution subject including at least one of the first logic calling unit, the second logic calling unit, the third logic calling unit, and the fourth logic calling unit. It can simultaneously perform upper and lower layer test calling commands inside the terminal, or first perform lower layer test calling commands and then perform upper layer test calling commands; under the premise of ensuring the accuracy of terminal automation test results, the efficiency of terminal automation testing is improved and the testing cost is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115840709B_ABST
    Figure CN115840709B_ABST
Patent Text Reader

Abstract

The present invention provides an automated testing device, method, medium, and terminal. The automated testing device, applied to a terminal, comprises: a startup module for sending a first startup test instruction to a logic call module; an instruction parsing module for receiving and parsing the first startup test instruction to generate a first parsing result; an execution module for receiving and, based on the first parsing result, determining a first execution subject corresponding to the first startup test instruction, the first execution subject comprising at least one of the first logic call unit, the second logic call unit, the third logic call unit, and the fourth logic call unit; and a control module for controlling corresponding modules in the test modules to perform corresponding test tasks through the first execution subject. While ensuring the accuracy of terminal automated testing results, the present invention improves the efficiency of terminal automated testing and reduces testing costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] There are currently some automated testing methods on the Android platform, but these testing methods all have certain limitations. The specific analysis is as follows:

[0003] 1) Automated UI scenario testing solutions developed using Java-based UI automators and Android packages (APKs) provided by the Android platform often require compiler compilation and importing or installing the application on the system before testing. Configuration, debugging, and compilation are cumbersome.

[0004] 2) Automated UI scenario testing solutions developed based on Python UIAutomator. This type of testing solution cannot be executed without the computer (PC) used for testing.

[0005] 3) Remote testing of the terminal is achieved by connecting to the Android Debug Bridge (adb) via a wireless LAN (Wireless Fidelity, Wi-Fi) based on the IEEE 802.11b standard. Although this allows for remote testing without a PC, it relies heavily on a stable Wi-Fi environment. When the test volume is large, this can cause significant interference to the Wi-Fi environment, resulting in low reliability.

[0006] 4) For some low-level tests, shell scripts are written by calling low-level commands or nodes to complete them. However, for some tests that also require upper-level cooperation, it is not easy to integrate them into the control of the upper-level operations.

[0007] Therefore, there is an urgent need for a testing solution that does not rely on a PC and a stable Wi-Fi environment. Therefore, the present invention provides an automated testing device, method, medium, and terminal to improve testing efficiency and save testing costs while ensuring the accuracy of terminal automated testing results. Summary of the Invention

[0008] The present invention provides an automated testing device, method, medium and terminal to solve the technical problems of low testing efficiency and high testing cost in the prior art.

[0009] In the first aspect, the present invention provides an automated testing device, which is applied to a terminal, including: a startup module, a logic call module, and a test module; the test module includes: an upper-layer public interface test module, an abnormality monitoring module, a bottom-layer function test module, and an application function test module; the upper-layer public interface test module is used to perform a first test task, and the first test task includes: testing whether the function of the public interface of the terminal is abnormal; the abnormality monitoring module is used to perform a second test task, and the second test task includes: testing whether the communication function of the terminal or the function of the terminal's external device or application is abnormal; the bottom-layer function test module is used to perform a third test task, and the third test task includes: testing whether the bottom-layer function of the terminal is abnormal; the application function test module is used to perform a fourth test task, and the fourth test task includes: testing whether the functions of each application of the terminal are abnormal; the logic call module is provided with a first logic call unit, a second logic call unit, a third logic call unit, a fourth logic call unit, an instruction parsing module, an execution module, and a logic call module. row module and control module; the first logic call unit is used to control the upper-layer public interface test module to perform the first test task; the second logic call unit is used to control the abnormality monitoring module to perform the second test task; the third logic call unit is used to control the underlying functional test module to perform the third test task, and the fourth logic call unit is used to control the application functional test module to perform the fourth test task; the startup module is used to send a first startup test instruction to the logic call module; the instruction parsing module is used to receive and parse the first startup test instruction to generate a first parsing result; the execution module receives and determines the first execution subject corresponding to the first startup test instruction based on the first parsing result, the first execution subject includes at least one of the first logic call unit, the second logic call unit, the third logic call unit, and the fourth logic call unit; the control module is used to control the corresponding module in the test module to perform the corresponding test task through the first execution subject.

[0010] Its beneficial effect is that: the present invention provides a testing technology solution that is not restricted by the existing calling logic through the first execution subject including at least one of the first logic calling unit, the second logic calling unit, the third logic calling unit, and the fourth logic calling unit. It can simultaneously perform upper and lower layer test calling commands inside the terminal, or first perform lower layer test calling commands and then perform upper layer test calling commands; under the premise of ensuring the accuracy of terminal automation test results, the efficiency of terminal automation testing is improved and the testing cost is reduced.

[0011] Optionally, the underlying functional testing module includes: a fifth logic call unit and a sixth logic call unit; the application functional testing module includes: a seventh logic call unit and an eighth logic call unit; the fifth logic call unit is used to control the upper-layer public interface test module to perform the first test task; the sixth logic call unit is used to control the exception monitoring module to perform the second test task; the seventh logic call unit is used to control the upper-layer public interface test module to perform the first test task; the eighth logic call unit is used to control the exception monitoring module to perform the second test task; the startup module is also used to send a second startup test instruction to the logic call module; the instruction parsing module is used to receive and parse the second startup test instruction to generate a second parsing result; the execution module receives and determines the second execution subject corresponding to the second startup test instruction based on the second parsing result, and the second execution subject includes at least one of the fifth logic call unit, the sixth logic call unit, the seventh logic call unit and the eighth logic call unit. Its beneficial effect is that: the present invention also provides a method of calling the upper layer test call command through the bottom layer during the terminal bottom layer test, so as to realize that when the upper layer cooperation test is also required during the bottom layer test process, the bottom layer test call can be well integrated into the control of the upper layer operation.

[0012] Optionally, the common interface includes: at least one of: a touch screen sensing interface, a sliding screen sensing interface, a page turning sensing interface, and a volume adjustment sensing interface; the touch screen sensing interface is used to sense whether the user performs a touch screen operation; the sliding screen sensing interface is used to sense whether the user performs a sliding screen operation; the page turning sensing interface is used to sense whether the user performs a page turning operation; and the volume adjustment sensing interface is used to sense whether the user performs a volume adjustment operation.

[0013] Optionally, the communication function includes at least one of a multimedia subsystem function, an application subsystem function, an intelligent sensor hub function, a short-range communication function, and a cellular communication function.

[0014] Optionally, the underlying functions include: storing, calling or deleting files in a file library, and adjusting the frequency or voltage of hardware in the terminal.

[0015] Optionally, the functions of each application in the terminal include: at least one of opening, exiting, and background running of each application in the terminal.

[0016] The second invention provides an automated testing method, including: providing an automated testing device as described in any one of the first aspects; the startup module sends a first startup test instruction to the logic call module; the instruction parsing module receives and parses the first startup test instruction to generate a first parsing result; the execution module receives and determines the first execution subject corresponding to the first startup test instruction based on the first parsing result, the first execution subject including at least one of the first logic call unit, the second logic call unit, the third logic call unit, and the fourth logic call unit; the control module controls the corresponding module in the test module through the first execution subject to perform the corresponding test task.

[0017] Optionally, the automated testing method further includes: the startup module sends a second startup test instruction to the logic call module; the instruction parsing module receives and parses the second startup test instruction to generate a second parsing result; the execution module receives and determines the second execution subject corresponding to the second startup test instruction based on the second parsing result, and the second execution subject includes at least one of the fifth logic call unit, the sixth logic call unit, the seventh logic call unit and the eighth logic call unit.

[0018] Optionally, the startup module further includes sending a stop test instruction to the logic call module, the logic call module receives the stop test instruction, and controls the corresponding module in the test module to stop executing the corresponding test task through the first execution subject or the second execution subject.

[0019] In a third aspect, the present invention further provides a storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, executes the steps of the automated testing method as described in any one of the second aspects.

[0020] In a fourth aspect, the present invention further provides a terminal comprising a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the processor runs the computer program, the steps of the automated testing method as described in any one of the second aspects are executed.

[0021] For the beneficial effects of the second to fourth aspects, please refer to the description of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 A schematic structural diagram of an embodiment of an automated testing device provided by the present invention;

[0023] Figure 2 A schematic structural diagram of a test module embodiment provided by the present invention;

[0024] Figure 3 A flow chart of an embodiment of an automated testing method provided by the present invention;

[0025] Figure 4 This is a schematic diagram of the structure of a terminal embodiment provided by the present invention. DETAILED DESCRIPTION

[0026] Before introducing the embodiments of the present invention in detail, some terms used in the embodiments of the present application are explained below to facilitate understanding by those skilled in the art.

[0027] 1) The bottom and upper layers inside the terminal

[0028] The upper layer of the terminal refers to relatively shallow and public nodes in the network architecture of the terminal, and the bottom layer inside the terminal refers to relatively deep and personalized application nodes in the network architecture of the terminal.

[0029] 2) SIM card status

[0030] The SIM card status refers to whether the SIM card inserted into the terminal is in normal operation and whether it can transmit information with external devices or applications.

[0031] 3) Short-range communication function

[0032] The short-range communication function refers to whether the terminal can perform near-field communication, whether the device or application connected through near-field communication meets the user's needs, whether the time taken to complete near-field communication meets the standard, and whether the frequency of near-field communication meets the standard.

[0033] 4) Cellular communication function

[0034] The cellular communication function refers to whether the terminal is capable of cellular communication, whether the device or application connected through cellular communication meets the user's needs, whether the time taken to complete cellular communication meets the standard, and whether the frequency of cellular communication meets the standard.

[0035] 5) Document Library

[0036] The file library refers to a file library inside the terminal for storing various files.

[0037] 6) Applications in the terminal

[0038] The applications in the terminal refer to all applications in the terminal, including default applications and applications downloaded by the user.

[0039] 7) Shell

[0040] In computer science, a command interpreter (Shell), commonly known as a shell, refers to software that provides an operating interface for users. It receives user commands and then calls the corresponding application.

[0041] 8) Application subsystem

[0042] Smart terminal systems are typically composed of multiple subsystems, each distributed across different IP addresses. Subsystems frequently communicate with each other, each using different types of interfaces. The core of a smart terminal is the application subsystem, where the application processor resides. It connects the various subsystems and all peripherals, enabling coordinated operation and business interaction across the entire system.

[0043] 9) Multimedia subsystem

[0044] The multimedia subsystem in this application refers to the IP multimedia subsystem, which is composed of all functional entities that can provide multimedia services, including a collection of functional entities related to signaling and bearer. IP multimedia services are based on the session control capabilities defined by the IETF and are implemented using the packet switching domain and multimedia bearers. The IP multimedia subsystem enables operators to provide their users with multimedia services based on Internet applications, services, and protocols.

[0045] The technical solutions in the embodiments of the present application are described below in conjunction with the drawings in the embodiments of the present application. Among them, in the description of the embodiments of the present application, the terms used in the following embodiments are only for the purpose of describing specific embodiments, and are not intended to be used as limitations on the present application. As used in the specification and claims of the present application, the singular expressions "a", "the", "above", "the" and "this" are intended to also include expressions such as "one or more", unless there is a clear contrary indication in the context. It should also be understood that in the following embodiments of the present application, "at least one", "one or more" refer to one or more (including two). The term "and / or" is used to describe the association relationship of associated objects, indicating that three relationships can 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, where A and B can be singular or plural. The character " / " generally indicates that the associated objects before and after are in an "or" relationship.

[0046] References to "one embodiment" or "some embodiments" etc. described in this specification mean that the specific features, structures or characteristics described in conjunction with the embodiment are included in one or more embodiments of the present application. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. appearing in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in another way. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in another way. The term "connected" includes direct and indirect connections, unless otherwise stated. "First" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated.

[0047] In the embodiments of this application, words such as "exemplarily" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "exemplarily" or "for example" in the embodiments of this application should not be interpreted as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplarily" or "for example" is intended to present the relevant concepts in a concrete manner.

[0048] There are already some automated testing methods for the Android platform, but these methods all have limitations. Stability testing, in particular, requires a large number of test samples, making it impractical to connect all of them to a PC. Furthermore, using shell scripts makes it difficult to incorporate upper-level control operations.

[0049] In order to solve the above technical problems, the present invention provides an automated testing device, method, medium and terminal.

[0050] The present invention provides an automated testing device, which is applied to a terminal. Figure 1As shown, the automated testing device includes: a startup module 101, a logic call module 102, and a test module 103; the test module 103 includes: an upper-layer public interface test module 1031, an abnormality monitoring module 1032, a bottom-layer function test module 1033, and an application function test module 1034; the upper-layer public interface test module 1031 is used to perform a first test task, which includes: testing whether the function of the public interface of the terminal is abnormal; the abnormality monitoring module 1032 is used to perform a second test task, which includes: testing the communication function of the terminal Or whether the functions of the terminal's external devices and applications are abnormal; the underlying function test module 1033 is used to perform a third test task, and the third test task includes: testing whether the underlying functions of the terminal are abnormal; the application function test module 1034 is used to perform a fourth test task, and the fourth test task includes: testing whether the functions of each application of the terminal are abnormal; the logic call module 102 is provided with a first logic call unit 1021, a second logic call unit 1022, a third logic call unit 1023, a fourth logic call unit 1024, an instruction parsing module 1025, and an execution module 1026. 026 and control module 1027; the first logic call unit 1021 is used to control the upper-layer public interface test module to perform the first test task; the second logic call unit 1022 is used to control the abnormality monitoring module to perform the second test task; the third logic call unit 1023 is used to control the underlying functional test module to perform the third test task, and the fourth logic call unit 1024 is used to control the application functional test module to perform the fourth test task; the startup module 101 is used to send a first startup test instruction to the logic call module 102; the instruction parsing module 1025 is used to receive and parse the first startup test instruction to generate a first parsing result; the execution module 1026 receives and determines the first execution subject corresponding to the first startup test instruction based on the first parsing result, the first execution subject including at least one of the first logic call unit 1021, the second logic call unit 1022, the third logic call unit 1023, and the fourth logic call unit 1024; the control module 1027 is used to control the corresponding module in the test module 103 to perform the corresponding test task through the first execution subject.

[0051] Its beneficial effects are as follows: the present invention provides a testing technology solution that is not limited to the existing calling logic through the first execution subject including at least one of the first logic calling unit, the second logic calling unit, the third logic calling unit, and the fourth logic calling unit, and can simultaneously perform the upper and lower layer test calling commands inside the terminal, or first perform the lower layer test calling command and then the upper layer test calling command; under the premise of ensuring the accuracy of the terminal automation test results, the efficiency of the terminal automation test is improved and the testing cost is reduced. The automated testing device provided by the present invention can start one of the first test task, the second test task, the third test task, and the fourth test task at a time, or can start two, three, or four of the first test task, the second test task, the third test task, and the fourth test task at a time, without being limited to the upper and lower layer logical calling relationships inside the terminal.

[0052] In some embodiments, the test module is Figure 2 As shown, the bottom-level function test module 201 includes: a fifth logic call unit 2011 and a sixth logic call unit 2012; the application function test module 202 includes: a seventh logic call unit 2021 and an eighth logic call unit 2022; the fifth logic call unit 2011 is used to control the upper-layer public interface test module 203 to execute the first test task; the sixth logic call unit 2012 is used to control the exception monitoring module 204 to execute the second test task; the seventh logic call unit 2021 is used to control the upper-layer public interface test module 203 to execute the first test task; and the eighth logic call unit 2022 is used to control the exception monitoring module 204 to execute the second test task. Furthermore, the startup module is further used to send a second startup test instruction to the logic call module; the instruction parsing module is used to receive and parse the second startup test instruction to generate a second parsing result; the execution module receives and, based on the second parsing result, determines a second execution subject corresponding to the second startup test instruction, wherein the second execution subject includes at least one of the fifth logic call unit, the sixth logic call unit, the seventh logic call unit, and the eighth logic call unit. Its beneficial effect is that: the present invention also provides a method of calling the upper layer test call command through the bottom layer during the terminal bottom layer test, so as to realize that when the upper layer cooperation test is also required during the bottom layer test process, the bottom layer test call can be well integrated into the control of the upper layer operation.

[0053] In some embodiments, the common interface includes: at least one of: a touch screen sensing interface, a sliding screen sensing interface, a page turning sensing interface, and a volume adjustment sensing interface; the touch screen sensing interface is used to sense whether the user performs a touch screen operation; the sliding screen sensing interface is used to sense whether the user performs a sliding screen operation; the page turning sensing interface is used to sense whether the user performs a page turning operation; and the volume adjustment sensing interface is used to sense whether the user performs a volume adjustment operation.

[0054] In some embodiments, the communication function includes at least one of a multimedia subsystem function, an application subsystem function, a smart sensor hub function, a short-range communication function, and a cellular communication function. The cellular communication function includes a Subscriber Identity Module (SIM card) status.

[0055] In some embodiments, the underlying functions include: storing, calling or deleting files in a file library, and adjusting the frequency or voltage of hardware in the terminal.

[0056] In some embodiments, the functions of each application in the terminal include: at least one of opening, exiting, and background running of each application in the terminal.

[0057] Based on the automated testing device provided in the above embodiment, the present invention provides an automated testing method, the process of which is as follows: Figure 3 Shown, including:

[0058] S301. Provide the automated testing device according to any one of the above embodiments;

[0059] S302, the startup module sends a first startup test instruction to the logic calling module;

[0060] S303: The instruction parsing module receives and parses the first startup test instruction to generate a first parsing result;

[0061] S304: The execution module receives and determines, based on the first parsing result, a first execution subject corresponding to the first startup test instruction, where the first execution subject includes at least one of the first logic calling unit, the second logic calling unit, the third logic calling unit, and the fourth logic calling unit.

[0062] S305: The control module controls the corresponding module in the test module to execute the corresponding test task through the first execution entity.

[0063] In some embodiments, the automated testing method further includes: the startup module sends a second startup test instruction to the logic call module; the instruction parsing module receives and parses the second startup test instruction to generate a second parsing result; the execution module receives and determines the second execution subject corresponding to the second startup test instruction based on the second parsing result, and the second execution subject includes at least one of the fifth logic call unit, the sixth logic call unit, the seventh logic call unit and the eighth logic call unit.

[0064] In some embodiments, the startup module also includes sending a stop test instruction to the logic call module. The logic call module receives the stop test instruction and controls the corresponding module in the test module to stop executing the corresponding test task through the first execution subject or the second execution subject.

[0065] Exemplarily, the automated testing device can be a virtual network architecture, relying on a computer program, or a real chip. When it is a virtual network architecture, it can be installed in a tester and transmitted to the terminal via the tester, or it can be installed directly in the terminal. Exemplarily, the terminal and the tester can be one or more of a smartphone, a tablet computer, and a portable computer, though desktop computers and the like can also be used. The tester transmits the automated testing device to the terminal via a network, which can include various connection types, such as wired communication links, wireless communication links, and the like. The number of terminals, networks, and testers can be set based on actual needs. Preferably, when the terminal is a virtual network architecture, the tester can replicate and transmit the tester to the terminal an unlimited number of times via the network. This makes the present invention applicable to scenarios where the number of testers is smaller than the number of terminals. When the automated testing device is a chip, the test task can be executed by establishing an electrical connection or communication relationship between the automated testing device and the chip within the terminal. Furthermore, the automated testing device implements testing of interfaces at different levels, requiring only the test steps to be focused on, rather than the specific implementation of each test step, resulting in low script maintenance requirements. The specific implementation of the test steps can refer to existing technologies and is not the focus of this invention. Specifically, the functions of each module in the automated testing device can be fully implemented based on the shell. The specific steps for implementing the test can also be written based on the shell, without the need for compilation, and can support long-term operation without the test machine.

[0066] In order to introduce the content of the present invention in more detail, specific examples are given here.

[0067] First, the upper layer public interface test module, the abnormality monitoring module, the bottom layer function test module, and the application function test module in the test module are explained respectively according to specific examples.

[0068] 1. The upper layer public interface test module is used to perform the first test task, which includes the control interface of the upper layer application based on the Java language architecture, such as touch screen, sliding screen, clicking, and some public interfaces of the terminal.

[0069] 1) The present invention uses the bottom-level commands provided by the terminal to implement basic operation control of the application, and the bottom-level commands include uiautomator dump. When the bottom-level commands are converted into computer language, they may include click_by_text(), click_by_resourceid(), and waitFor_activity().

[0070] 2) Taking click_by_text() as an example, for the test script, if you want to click to enter the camera application, you only need to use "click_by_text("camera")" to enter the camera. The solution technology is to first dump the interface elements into an XML type file through the uiautomator dump in the shell, analyze the XML to filter out the control information containing "camera" and with the attribute of "clickable", then extract its coordinate position information, and then send the input tap (inputtap) instruction. When the automated testing device starts working, it can monitor whether the terminal is executing and whether it is executing accurately according to the user's needs. When the user "clicks" the camera, the automated testing device will immediately obtain the user's instruction to click the camera on the terminal and monitor whether the camera is opened normally.

[0071] 3) Taking waitFor_activity() as an example, after clicking an action, the automated testing device confirms whether the click was successful and enters a new interface. For example, waitFor_activity"com.android.camera2 / com.android.camera.CameraLauncher" can be used to determine whether the camera interface has been entered. This solution uses dumpsysactivity to dump all window information of the current page, then filters the top-level window information. If it is "com.android.camera2 / com.android.camera.CameraLauncher", it is considered correct, achieving the desired effect.

[0072] 2. The abnormal monitoring module is used to perform the second test task, which can be a test task for the abnormal monitor library, including abnormal monitoring and automatic reporting of the communication system, the terminal external device or application

[0073] 1) The present invention utilizes the bottom layer commands provided by the terminal to implement real-time monitoring of the SIM card status, the short-range communication system, and the cellular communication system. Once an abnormality occurs, the test is terminated and reported.

[0074] 2) Taking the real-time monitoring of the SIM card status as an example, the present invention uses the getprop command provided by Linux to read the attribute value representing the SIM card status to confirm the SIM card status of the dual SIM cards, and obtains it once every 5 seconds. Once the attribute value is less than 0.00, the SIM card is considered abnormal, and the test is stopped. At the same time, the abnormality is displayed on the terminal interface to facilitate timely discovery by testers.

[0075] 3. The bottom-layer function test module is used to perform the third test task, which can be a test task for the bottom-layer function, such as file query, central processing unit (CPU) frequency or voltage adjustment

[0076] 1) The third test task can mainly be to implement the interface required for connection of the test task through Linux commands.

[0077] 2) Taking the file query interface as an example, if you want to check whether a file exists on an SD card, from an application perspective, you need to first enter the file manager, then click on the SD card directory, and search inside the directory to see if it exists. However, if it is implemented through low-level commands, only one sentence is needed to achieve the goal, which is encapsulated into an interface. For script writers, there is no need to worry about what specific commands to use, such as directly calling the corresponding file.

[0078] 4. The application function test module is used to perform the fourth test task, which can be a test task for the operation and inspection interface of various applications in the terminal, such as opening the application and checking whether the application is open. The applications include camera, photo album, communication software, and Internet software.

[0079] 1) Taking the photo function interface as an example, there are several steps: click to take a photo, enter the gallery, view the photo, and if the photo is there, it is determined that the photo was taken successfully. The logic is implemented as follows, where capture() is the interface provided by this applib. The implementation of this interface is to call the interface corresponding to the first test task.

[0080] 2) Using the photo-taking interface described in 2 as an example, the present invention also provides an interface implementation that can call the corresponding interface of the third test task, implementing both upper-layer and lower-layer control within the same interface. As shown in the following logic, the determination of whether a photo was taken successfully can be implemented by calling the lower-layer functional test module, thereby improving script execution efficiency.

[0081] Based on the above invention, it is only necessary to call the above interface function in the shell script to realize the automation of the operation of the upper application at the kernel layer, and no compilation is required. The script will not change due to the change of the terminal 0 resolution. At the same time, the script can be executed in the background by using commands to run independently of the PC. The automated testing device and automated testing method provided by the present invention use shell script as the implementation language to realize the business control of the bottom and upper layers from the Linux layer, meeting the testing requirements of different aspects, that is, meeting the testing requirements of the kernel layer and the application (APP) layer. Even if there are thousands of machines waiting to be tested,

[0082] Testing can also be done without relying on a large number of test sets and stable wifi. It is simple and easy to control 5, which can call the underlying commands and perform upper-level control testing. Therefore, this technical solution was developed.

[0083] In other embodiments of the present application, the present application discloses a terminal, such as Figure 4 As shown, the terminal may include: one or more processors 401; memory 402; display 403; one or more application programs (not shown); and one or more computer programs 404.

[0084] The one or more computer programs 404 are stored in the memory 402 and configured to be executed by the one or more processors 401.

[0085] The computer program 404 includes instructions, which can be used to execute the various steps in the above corresponding embodiments.

[0086] Through the description of the above embodiments, those skilled in the art can clearly understand that for the convenience and brevity of description, only the division of the above functional modules is used as an example. In actual application,

[0087] The above functions can be distributed to different functional modules as needed, that is, the internal structure 5 of the device can be divided into different functional modules to complete all or part of the functions described above.

[0088] For the specific working processes of the system, devices and units, reference can be made to the corresponding processes in the aforementioned method embodiments, which will not be repeated here.

[0089] The functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0090] If the integrated unit 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 embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) or a processor to execute all or part of the steps of the method of each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as flash memory, mobile hard disk, read-only memory, random access memory, magnetic disk or optical disk.

[0091] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present invention should be included in the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims.

Claims

1. An automated testing device, characterized in that: Applied to the terminal, including: startup module, logic call module, and test module; The test module includes: an upper-layer public interface test module, an abnormality monitoring module, a bottom-layer function test module, and an application function test module; the upper-layer public interface test module is used to perform a first test task, which includes testing whether the function of the terminal's public interface is abnormal; the abnormality monitoring module is used to perform a second test task, which includes testing whether the communication function of the terminal or the functions of the terminal's external devices and applications are abnormal; the bottom-layer function test module is used to perform a third test task, which includes testing whether the bottom-layer functions of the terminal are abnormal; the application function test module is used to perform a fourth test task, which includes testing whether the functions of each application of the terminal are abnormal; The logic call module is provided with a first logic call unit, a second logic call unit, a third logic call unit, a fourth logic call unit, an instruction parsing module, an execution module and a control module; the first logic call unit is used to control the upper-layer public interface test module to perform the first test task; the second logic call unit is used to control the abnormality monitoring module to perform the second test task; the third logic call unit is used to control the underlying functional test module to perform the third test task, and the fourth logic call unit is used to control the application functional test module to perform the fourth test task; The startup module is used to send a first startup test instruction to the logic calling module; The instruction parsing module is used to receive and parse the first startup test instruction to generate a first parsing result; The execution module receives and determines, based on the first parsing result, a first execution subject corresponding to the first startup test instruction, where the first execution subject includes at least one of the first logic calling unit, the second logic calling unit, the third logic calling unit, and the fourth logic calling unit; The control module is used to control corresponding modules in the test modules to perform corresponding test tasks through the first execution entity.

2. The automated testing device according to claim 1, wherein: The bottom layer function test module includes: a fifth logic call unit and a sixth logic call unit; the application function test module includes: a seventh logic call unit and an eighth logic call unit; The fifth logic calling unit is used to control the upper layer public interface test module to perform the first test task; the sixth logic calling unit is used to control the abnormality monitoring module to perform the second test task; The seventh logic calling unit is used to control the upper layer public interface test module to perform the first test task; the eighth logic calling unit is used to control the abnormality monitoring module to perform the second test task; The startup module is further configured to send a second startup test instruction to the logic calling module; The instruction parsing module is used to receive and parse the second startup test instruction to generate a second parsing result; The execution module receives and determines a second execution subject corresponding to the second startup test instruction based on the second analysis result, and the second execution subject includes at least one of the fifth logic call unit, the sixth logic call unit, the seventh logic call unit and the eighth logic call unit.

3. The automated testing device according to claim 1, wherein: The common interface includes: at least one of a touch screen sensing interface, a sliding screen sensing interface, a page turning sensing interface, and a volume adjustment sensing interface; The touch screen sensing interface is used to sense whether the user performs a touch screen operation; the sliding screen sensing interface is used to sense whether the user performs a sliding screen operation; the page turning sensing interface is used to sense whether the user performs a page turning operation; and the volume adjustment sensing interface is used to sense whether the user performs a volume adjustment operation.

4. The automated testing device according to claim 1, wherein: The communication function includes at least one of a multimedia subsystem function, an application subsystem function, an intelligent sensor hub function, a short-range communication function, and a cellular communication function.

5. The automated testing device according to claim 1, wherein: The underlying functions include: storing, calling or deleting files in a file library, and adjusting the frequency or voltage of hardware in the terminal.

6. The automated testing device according to claim 1, wherein: The functions of each application in the terminal include at least one of opening, exiting, and background running of each application in the terminal.

7. An automated testing method, characterized in that: include: Providing an automated testing device according to any one of claims 1, 3 to 6; The startup module sends a first startup test instruction to the logic calling module; The instruction parsing module receives and parses the first startup test instruction to generate a first parsing result; The execution module receives and determines a first execution subject corresponding to the first startup test instruction based on the first parsing result, where the first execution subject includes at least one of the first logic calling unit, the second logic calling unit, the third logic calling unit, and the fourth logic calling unit; The control module controls corresponding modules in the test module to execute corresponding test tasks through the first execution entity.

8. An automated testing method, characterized in that: include: Providing an automated testing device as claimed in claim 2; The startup module sends a first startup test instruction to the logic calling module; The instruction parsing module receives and parses the first startup test instruction to generate a first parsing result; The execution module receives and determines a first execution subject corresponding to the first startup test instruction based on the first parsing result, where the first execution subject includes at least one of the first logic calling unit, the second logic calling unit, the third logic calling unit, and the fourth logic calling unit; The control module controls corresponding modules in the test module to execute corresponding test tasks through the first execution entity.

9. The automated testing method according to claim 8, wherein: Also includes: The startup module sends a second startup test instruction to the logic calling module; The instruction parsing module receives and parses the second startup test instruction to generate a second parsing result; The execution module receives and determines a second execution subject corresponding to the second startup test instruction based on the second analysis result, and the second execution subject includes at least one of the fifth logic call unit, the sixth logic call unit, the seventh logic call unit and the eighth logic call unit.

10. The automated testing method according to claim 9, wherein: The startup module further includes sending a stop test instruction to the logic calling module. The logic calling module receives the stop test instruction and controls the corresponding module in the test module to stop executing the corresponding test task through the first execution subject or the second execution subject.

11. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the automated testing method according to any one of claims 7 to 10 are executed.

12. A terminal comprising a memory and a processor, wherein the memory stores a computer program that can be run on the processor, characterized in that: When the processor runs the computer program, the steps of the automated testing method according to any one of claims 7 to 10 are performed.

Citation Information

Patent Citations

  • ERP software automated testing system and method

    CN103631713A

  • Interface testing method, system, computer device and storage medium

    CN109298997A