Method and device for testing user interface, electronic device, and medium
By realizing localized automatic traversal on the client and using inter-process communication for traversal instructions transmission and analysis, the problems of low efficiency and poor stability in the existing technology are solved, and efficient user interface testing is achieved.
Patent Information
- Application Number
- CN202110222706.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-02-26
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2041-02-26
AI Technical Summary
In the prior art, the client needs to wait for server instructions to cause the automation traversal efficiency, and requires a USB connection to limit the device location. The server cannot continue traversal when the USB is abnormal or the USB is disconnected, which affects stability.
By realizing localized automatic traversal on the client, the service module generates traversal instructions and sends them to the traversal module through inter-process communication, performs traversal operations, generates and analyzes traversal reports, and realizes localized automated traversal.
No server and USB connection is required, which improves the efficiency and stability of automated traversals and enables testing of the user interface in the target application.
Smart Images

Figure CN112783797B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology and can be used in the financial field or other fields. More specifically, the present disclosure relates to a method and device, an electronic device, and a medium for testing a user interface. Background Art
[0002] Most of the existing methods for testing the user interface of an application through automated traversal use the server as the server side and the application as the client side for automated traversal. For example, for an Android application, the server generates a traversal instruction for the client based on the user interface information (such as buttons, controls, or lists, etc.) obtained from the client, and sends the traversal instruction to the client; after receiving the traversal instruction, the client triggers the traversal operation (for example, traversal, clicks, screenshots, etc.), thereby realizing the automated traversal of each user interface of the application.
[0003] In the process of realizing the concept disclosed in the present invention, the inventors found that there are at least the following problems in the prior art: on the one hand, because the client needs to wait for the server's instructions to perform automatic traversal, the execution speed is slow, which affects the efficiency of the automatic traversal; on the other hand, because the server and the client need to be connected via USB, the client device needs to be placed in a fixed position; furthermore, when the server is abnormal or the USB is disconnected, the client can no longer continue to perform automatic traversal, which affects the stability of the automatic traversal. Summary of the invention
[0004] In view of this, the embodiments of the present disclosure provide a method, an apparatus, an electronic device, and a medium for testing a user interface, which can realize localized automatic traversal of a user interface.
[0005] In one aspect of an embodiment of the present disclosure, a method for testing a user interface is provided. The method comprises: a service module generates a traversal instruction for traversing a user interface in a target application; the service module sends the traversal instruction to a traversal module through inter-process communication; and the traversal module executes the traversal instruction to trigger an automated traversal of the user interface in the target application to test the user interface in the target application.
[0006] According to an embodiment of the present disclosure, the method further includes: the traversal module generating traversal report information after the traversal is completed; and the traversal module sending the traversal report information to the service module through the inter-process communication.
[0007] According to an embodiment of the present disclosure, the method further includes: the service module storing the traversal report information; and the service module analyzing the traversal process based on the traversal report information.
[0008] According to an embodiment of the present disclosure, the traversal report information includes images of traversed user interfaces; the service module analyzes the traversal process based on the traversal report information, including: receiving user images input by the user, searching for images matching the user images; and feeding back the search results to the user to inform the user of the traversal status of the user interfaces involved in the user images.
[0009] According to an embodiment of the present disclosure, the service module generates a traversal instruction for traversing a user interface in a target application, including: acquiring a traversal algorithm; configuring the traversal algorithm; and generating the traversal instruction based on the configuration of the traversal algorithm.
[0010] According to an embodiment of the present disclosure, configuring the traversal algorithm includes configuring at least one of the following parameters: the target application, the starting point of the traversal, the end point of the traversal, or the traversal execution speed.
[0011] According to an embodiment of the present disclosure, the method is applied to an Android system; wherein the method further comprises: encapsulating the service module and the traversal module to form an Android system application package; and installing in the form of the Android system application package to obtain an Android system client.
[0012] Another aspect of the disclosed embodiment provides a device for testing a user interface. The device includes a service module and a traversal module. The service module is used to generate a traversal instruction for traversing the user interface in a target application. The traversal module is used to execute the traversal instruction, triggering an automated traversal of the user interface in the target application to test the user interface in the target application. Data is transmitted between the service module and the traversal module via inter-process communication. The service module is also used to send the traversal instruction to the traversal module via the inter-process communication.
[0013] According to an embodiment of the present disclosure, the traversal module is further used to generate traversal report information after the traversal is completed, and send the traversal report information to the service module through the inter-process communication.
[0014] According to an embodiment of the present disclosure, the service module includes a storage submodule and an analysis submodule. The storage submodule is used to store the traversal report information. The analysis submodule is used to analyze the traversal process based on the traversal report information.
[0015] According to an embodiment of the present disclosure, the analysis submodule includes a screenshot analysis submodule. The screenshot analysis submodule is used to receive a user picture input by a user, search for an image matching the user picture, and feed back the search result to the user, so as to inform the user of the traversal of the user interface involved in the user picture, when the traversal report information includes an image of the traversed user interface.
[0016] According to an embodiment of the present disclosure, the service module includes an algorithm submodule, a configuration submodule, and an instruction generation submodule. The algorithm submodule is used to obtain a traversal algorithm. The configuration submodule is used to configure the traversal algorithm. The instruction generation submodule is used to generate the traversal instruction based on the configuration of the traversal algorithm.
[0017] Another aspect of the embodiments of the present disclosure provides an electronic device. The electronic device includes one or more memories and one or more processors. The memories store executable instructions. The processors execute the executable instructions to implement the above method.
[0018] According to another aspect of the present disclosure, a computer-readable storage medium is provided, which stores computer-executable instructions, wherein the instructions are used to implement the above method when executed.
[0019] Another aspect of an embodiment of the present disclosure provides a computer program, wherein the computer program includes computer executable instructions, and the instructions are used to implement the method described above when executed.
[0020] One or more of the above embodiments have the following advantages or beneficial effects: by combining the server-side program for generating traversal instructions in the prior art into the client application, the client application can have both the function of generating traversal instructions and the function of triggering the traversal operation of the target application, thereby achieving the purpose of localized automatic traversal of the user interface. In this way, the embodiment of the present disclosure can issue traversal instructions through inter-process communication without deploying a server and without relying on USB, thereby effectively improving the efficiency of the user interface test of the target application while solving the problem that the automatic traversal cannot be continued due to server-side abnormality or USB disconnection. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The above and other objects, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:
[0022] Figure 1 The application scenario of the method and device for testing a user interface according to an embodiment of the present disclosure is schematically shown;
[0023] Figure 2The system architecture of the method and device for testing a user interface according to an embodiment of the present disclosure is schematically shown;
[0024] Figure 3 A flowchart of a method for testing a user interface according to an embodiment of the present disclosure is schematically shown;
[0025] Figure 4 A flowchart of a method for testing a user interface according to another embodiment of the present disclosure is schematically shown;
[0026] Figure 5 A flowchart of an analysis and traversal process according to an embodiment of the present disclosure is schematically shown;
[0027] Figure 6 A structural block diagram schematically shows a device for testing a user interface according to an embodiment of the present disclosure; and
[0028] Figure 7 A block diagram schematically shows an electronic device suitable for implementing the method for testing a user interface according to an embodiment of the present disclosure; DETAILED DESCRIPTION
[0029] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.
[0030] Figure 1 The application scenario 100 of the method and apparatus for testing a user interface according to an embodiment of the present disclosure is schematically shown. It should be noted that: Figure 1 What is shown are merely examples of application scenarios to which the embodiments of the present disclosure can be applied, in order to help those skilled in the art understand the technical content of the present disclosure, but it does not mean that the embodiments of the present disclosure cannot be used in other devices, systems, environments or scenarios.
[0031] like Figure 1 As shown, the application scenario 100 may include a terminal device 110. Various client applications are installed in the terminal device 110, wherein: Figure 1 Schematically illustrates multiple client applications, such as a test application 101 and a target application 102.
[0032] The test application 101 may be a client application program obtained by installing the apparatus for testing a user interface according to an embodiment of the present disclosure in the terminal device 110 .
[0033] The target application 102 may be, for example, a test subject of the test application 101 .
[0034] According to an embodiment of the present disclosure, the test application 101 can automatically generate a traversal instruction for the user interface in the target application 102 based on the various user interfaces, buttons / controls, lists and other information in the target application 102, without the aid of a USB device and without communicating with a server, and trigger an automated traversal operation on the user interface in the target application 102 through the traversal instruction, thereby testing the performance of the user interface in the target application 102.
[0035] Figure 2 The system architecture 200 of the method and apparatus for testing a user interface according to an embodiment of the present disclosure is schematically shown.
[0036] Combination Figure 1 and Figure 2 In the system architecture 200, the test application 101 may include a service module 1 and a traversal module 2. The service module 1 and the traversal module 2 transmit data through inter-process communication. The target application 102 may include one or more user interfaces, which may be, for example, a GUI (Graphic User Interface). The target application 102 may be any client application installed in the terminal device 110, such as a mobile banking APP.
[0037] The service module 1 is used to generate a traversal instruction for traversing the user interface in the target application program, for example, generating the traversal instruction according to information such as a configured traversal algorithm.
[0038] At the same time, the service module 1 is also used to send the traversal instruction to the traversal module 2 through inter-process communication.
[0039] The traversal module 2 is used to receive the traversal instruction and execute the traversal instruction to trigger the automatic traversal of the user interface in the target application 102 to test the user interface in the target application. For example, the traversal module 2 can interact with the operating system of the terminal device 110 to control the traversal of the user interface in the target application 102 through the traversal instruction.
[0040] According to other embodiments of the present disclosure, the traversal module 2 is further used to collect traversal process information during the traversal of the user interface in the target application 102, generate traversal report information after the traversal process is completed, and send the traversal report information to the service module 1. For example, the traversal module 2 can obtain the traversal process information from the system log of the terminal device 110 or through interaction with the terminal device 110. The traversal process information may include, for example, the traversal path, each control or button operated during the traversal process, response data and / or screenshots of each user interface, and other information.
[0041] According to the embodiments of the present disclosure, the work done by the server side in the related technology is replaced by the service module 1, and the data transmission between the service module 1 and the traversal module 2 is realized through inter-process communication, thereby eliminating the USB connection communication between the server and the client. In this way, localized user interface automatic traversal testing can be implemented to improve testing efficiency.
[0042] According to some embodiments of the present disclosure, the method and apparatus of the embodiments of the present disclosure can be applied to the installation system. For example, the operating system of the terminal device 110 is the Android system. Before installing the test application 101 to the terminal device 101, the service module 1 and the traversal module 2 can be packaged to form an Android system application package (APK); then the Android system application package is installed to obtain the Android system client (i.e., the test application 101).
[0043] It should be noted that the method and device for testing a user interface according to the embodiments of the present disclosure can be used in the financial field, and can also be used in any field other than the financial field. The present disclosure does not limit the application field.
[0044] The following combination Figure 1 and Figure 2 ,pass Figure 3 to Figure 5 The method for testing a user interface according to various embodiments of the present disclosure is exemplarily introduced.
[0045] Figure 3 A flowchart of a method for testing a user interface according to an embodiment of the present disclosure is schematically shown.
[0046] like Figure 3 As shown, the method for testing a user interface according to this embodiment may include operations S310 to S330.
[0047] In operation S310, the service module 1 generates a traversal instruction for traversing the user interface in the target application. Specifically, the service module 1 may first obtain a traversal algorithm, then configure the traversal algorithm, and generate a traversal instruction based on the configuration of the traversal algorithm. Among them, configuring the traversal algorithm may include configuring at least one of the following parameters: target application, starting point of traversal, end point of traversal, or traversal execution speed. The starting point of traversal may be, for example, the starting user interface of traversal, or the starting control or button, etc. The same is true for the end point of traversal.
[0048] In operation S320, the service module 1 sends the traversal instruction to the traversal module 2 through inter-process communication.
[0049] In operation S330, the traversal module 2 executes the traversal instruction to trigger an automated traversal of the user interface in the target application to test the user interface in the target application. A traversal instruction can trigger a traversal of one or more user interfaces of the target application according to a predetermined traversal algorithm, traversal start / end point, and traversal speed.
[0050] Figure 4 A flowchart of a method for testing a user interface according to another embodiment of the present disclosure is schematically shown.
[0051] like Figure 4 As shown, the method for testing a user interface according to this embodiment may further include operations S440 to S470 in addition to operations S310 to S330.
[0052] In operation S440, the traversal module 2 generates traversal report information after the traversal is completed.
[0053] And in operation S450, the traversal module 2 sends the traversal report information to the service module 1 through inter-process communication.
[0054] Next, in operation S460, the service module 1 may store the traversal report information.
[0055] Then in operation S470, the service module 1 analyzes the traversal process based on the traversal report information. The service module 1 can provide the tester or the maintenance personnel with the analysis of the response performance of each interface of the target application.
[0056] Figure 5 The flowchart of the analysis traversal process in operation S470 according to an embodiment of the present disclosure is schematically shown.
[0057] like Figure 5 As shown, according to this embodiment, operation S470 may include operations S471 to S473.
[0058] First, in operation S471, a user picture input by a user is received. For example, a tester uploads a screenshot of a certain user interface in order to check whether the user interface has been traversed, or if so, how each control in the user interface responds.
[0059] Then, in operation S472, an image matching the user's picture is searched, for example, image matching is performed based on image similarity.
[0060] Then in operation S473, the search results are fed back to the user to inform the user of the traversal of the user interface involved in the user's picture. If a matching image is searched, it means that the user interface has been traversed, and then the searched matching image and the traversal information associated with the matching image (for example, which interface the matching image jumped from, the response of the control / button in the user interface, etc.) can be fed back to the user. If no matching image is searched, it means that the user interface has not been traversed. At this time, the tester can reconfigure the parameters of the traversal algorithm for traversal, or manually test the user interface.
[0061] According to the embodiments of the present disclosure, when the traversal report information includes images of traversed user interfaces, the user can input images and quickly determine whether a certain user interface has been traversed by image matching. If it has been traversed, it can be quickly checked whether the user interface responds normally during the traversal process, or whether there are flashbacks, crashes, etc. The efficiency of traversal analysis can be effectively improved by image matching.
[0062] Figure 6 The structural block diagram of an apparatus 601 for testing a user interface according to an embodiment of the present disclosure is schematically shown.
[0063] like Figure 6 As shown, the device 601 for testing the user interface according to this embodiment may include a service module 1 and a traversal module 2. The device 601 for testing the user interface may be the aforementioned Figure 1 or Figure 2 A specific embodiment of a test application 101 is shown in FIG.
[0064] The service module 1 is used to generate a traversal instruction for traversing the user interface in the target application. The traversal module 2 is used to execute the traversal instruction and trigger an automatic traversal of the user interface in the target application to test the user interface in the target application.
[0065] When the device 601 is running, the service module 1 runs in process 1, and the traversal module 2 runs in process 2. The service module 1 and the traversal module 2 transmit data through inter-process communication.
[0066] Specifically, the service module 1 is used to send the traversal instruction to the traversal module 2 through the inter-process communication. Optionally, the traversal module 2 is also used to generate traversal report information after the traversal is completed, and send the traversal report information to the service module 1 through the inter-process communication.
[0067] According to an embodiment of the present disclosure, the service module 1 may include an algorithm submodule 11, a configuration submodule 12, and an instruction generation submodule 13. According to other embodiments of the present disclosure, the service module 1 may further include a storage submodule 14 and an analysis submodule 15.
[0068] The algorithm submodule 11 is used to obtain a traversal algorithm and implement the traversal algorithm, which mainly includes a depth-first traversal algorithm and a breadth-first traversal algorithm.
[0069] When traversing according to the depth-first traversal algorithm, for example, you can click to enter a user interface in the target application, and then click a control on this user interface to enter the next user interface. In this way, you can traverse each user interface layer by layer along a certain path.
[0070] When traversing according to the breadth-first traversal algorithm, for example, after clicking a control in a user interface of the target application to cause a jump, the user interface is returned to click other controls in the user interface.
[0071] The configuration submodule 12 is used to configure the traversal algorithm. For example, various parameters in the traversal algorithm may be configured, such as specifying a target application, initializing a starting point and / or an end point of the traversal, or initializing a traversal execution speed.
[0072] The instruction generation submodule 13 is used to generate traversal instructions based on the configuration of the traversal algorithm.
[0073] The storage submodule 14 is used to store traversal report information. The traversal report information may include the traversal path of a traversal process (for example, which controls are operated in sequence and which user interfaces are jumped to in sequence), interface crash information (for example, freeze or flash back) in the traversal process, and screenshot information of the user interface after each control operation in the traversal process.
[0074] The analysis submodule 15 is used to analyze the traversal process based on the traversal report information.
[0075] According to an embodiment of the present disclosure, the analysis submodule 15 may further include a screenshot analysis submodule 151. The screenshot analysis submodule 151 is used to receive a user picture input by a user, search for an image matching the user picture, and feed back the search results to the user, in order to inform the user of the traversal of the user interface involved in the user picture, when the traversal report information includes an image of the traversed user interface (e.g., a screenshot), For example, if a tester or maintenance personnel wants to check whether a certain user interface has been traversed, or whether it responds normally, they can upload an image of the user interface, and then search through image matching. If a similar screenshot is found, the searched screenshot can be fed back to the user, so that the user can quickly find and confirm whether a certain user interface has been traversed.
[0076] According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits, or at least part of the functions of any one of them can be implemented in one module. According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits can be split into multiple modules for implementation. According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits can be at least partially implemented as hardware circuits, such as field programmable gate arrays (FPGAs), programmable logic arrays (PLAs), systems on chips, systems on substrates, systems on packages, application specific integrated circuits (ASICs), or can be implemented by hardware or firmware in any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware, and firmware, or in any appropriate combination of any of them. Alternatively, according to the embodiments of the present invention, one or more of the modules, submodules, units, and subunits can be at least partially implemented as computer program modules, and when the computer program modules are run, the corresponding functions can be performed.
[0077] For example, any multiple of the service module 1, the traversal module 2, the algorithm submodule 11, the configuration submodule 12, the instruction generation submodule 13, the storage submodule 14, the analysis submodule 15, and the screenshot analysis submodule 151 can be combined in one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the service module 1, the traversal module 2, the algorithm submodule 11, the configuration submodule 12, the instruction generation submodule 13, the storage submodule 14, the analysis submodule 15, and the screenshot analysis submodule 151 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or by any one of the three implementation methods of software, hardware, and firmware, or by a suitable combination of any of them. Alternatively, at least one of the service module 1, the traversal module 2, the algorithm sub-module 11, the configuration sub-module 12, the instruction generation sub-module 13, the storage sub-module 14, the analysis sub-module 15, and the screenshot analysis sub-module 151 can be at least partially implemented as a computer program module, which can perform corresponding functions when the computer program module is executed.
[0078] Figure 7 A block diagram of an electronic device 700 suitable for implementing the method for testing a user interface according to an embodiment of the present disclosure is schematically shown. Figure 7 The electronic device 700 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0079] like Figure 7 As shown, the electronic device 700 according to an embodiment of the present disclosure includes a processor 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage part 708 to a random access memory (RAM) 703. The processor 701 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 701 may also include an onboard memory for caching purposes. The processor 701 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.
[0080] In RAM703, various programs and data required for the operation of electronic device 700 are stored. Processor 701, ROM702 and RAM703 are connected to each other via bus 704. Processor 701 performs various operations of the method flow according to the embodiment of the present disclosure by executing the program in ROM 702 and / or RAM 703. It should be noted that the program can also be stored in one or more memories other than ROM702 and RAM 703. Processor 701 can also perform various operations of the method flow according to the embodiment of the present disclosure by executing the program stored in the one or more memories.
[0081] According to an embodiment of the present disclosure, the electronic device 700 may further include an input / output (I / O) interface 705, which is also connected to the bus 704. The electronic device 700 may further include one or more of the following components connected to the I / O interface 705: an input portion 706 including a keyboard, a mouse, etc.; an output portion 707 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage portion 708 including a hard disk, etc.; and a communication portion 709 including a network interface card such as a LAN card, a modem, etc. The communication portion 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 710 as needed, so that a computer program read therefrom is installed into the storage portion 708 as needed.
[0082] According to an embodiment of the present disclosure, the method flow according to an embodiment of the present disclosure can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable storage medium, and the computer program contains a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 709, and / or installed from the removable medium 711. When the computer program is executed by the processor 701, the above-mentioned functions defined in the system of the embodiment of the present disclosure are executed. According to an embodiment of the present disclosure, the system, equipment, device, module, unit, etc. described above can be implemented by a computer program module.
[0083] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present disclosure is implemented.
[0084] According to an embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, may include but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, an apparatus or a device. For example, according to an embodiment of the present disclosure, a computer-readable storage medium may include the ROM 702 and / or RAM 703 described above and / or one or more memories other than ROM 702 and RAM 703.
[0085] An embodiment of the present disclosure also includes a computer program product, which includes a computer program, and the computer program contains a program code for executing the method provided by the embodiment of the present disclosure. When the computer program product runs on an electronic device, the program code is used to enable the electronic device to implement the image recognition method provided by the embodiment of the present disclosure.
[0086] When the computer program is executed by the processor 701, the above functions defined in the system / device of the embodiment of the present disclosure are executed. According to the embodiment of the present disclosure, the system, device, module, unit, etc. described above can be implemented by a computer program module.
[0087] In one embodiment, the computer program may be based on a tangible storage medium such as an optical storage device, a magnetic storage device, etc. In another embodiment, the computer program may also be transmitted and distributed in the form of a signal on a network medium, and downloaded and installed through the communication part 709, and / or installed from a removable medium 711. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0088] According to an embodiment of the present disclosure, the program code for executing the computer program provided by the embodiment of the present disclosure can be written in any combination of one or more programming languages. Specifically, these computing programs can be implemented using high-level process and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, Java, C++, python, "C" language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on the remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect through the Internet).
[0089] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0090] The embodiments of the present disclosure are described above. However, these embodiments are only for illustrative purposes and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the various embodiments cannot be used in combination to advantage. The scope of the present disclosure is defined by the attached claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art may make a variety of substitutions and modifications, which should all fall within the scope of the present disclosure.
Claims
1. A method for testing a user interface, comprising: The service module generates a traversal instruction for traversing a user interface in a target application; The service module sends the traversal instruction to the traversal module through inter-process communication; The traversal module executes the traversal instruction to trigger an automatic traversal of the user interface in the target application to test the user interface in the target application; The traversal module generates traversal report information after the traversal is completed, and the traversal report information includes screenshots of the traversed user interface; The traversal module sends the traversal report information to the service module through the inter-process communication; The service module stores the traversal report information; as well as The service module analyzes the traversal process based on the traversal report information, including: Receive a user picture input by a user, where the user picture is a screenshot of a user interface in the target application; Searching for images that match the user's picture; and The search result is fed back to the user to inform the user of the traversal status of the user interface involved in the user picture.
2. The method according to claim 1, wherein: The service module generates a traversal instruction for traversing the user interface in the target application program, including: Get the traversal algorithm; configuring the traversal algorithm; and The traversal instruction is generated based on the configuration of the traversal algorithm.
3. The method according to claim 2, wherein: Configuring the traversal algorithm includes configuring at least one of the following parameters: The target application, the starting point of the traversal, the end point of the traversal, or the traversal execution speed.
4. The method according to any one of claims 1 to 3, wherein: The method is applied to an Android system; wherein the method further comprises: Encapsulating the service module and the traversal module to form an Android system application package; and Install it in the form of the Android system application package to obtain the Android system client.
5. A device for testing a user interface, comprising: A service module, for generating a traversal instruction for traversing a user interface in a target application; A traversal module, used for executing the traversal instruction, triggering an automatic traversal of the user interface in the target application to test the user interface in the target application; wherein data is transmitted between the service module and the traversal module through inter-process communication; The service module is also used to send the traversal instruction to the traversal module through the inter-process communication; The traversal module is further used to generate traversal report information after the traversal is completed, and send the traversal report information to the service module through the inter-process communication; wherein the traversal report information includes a screenshot of the traversed user interface; The service module is further used to: store the traversal report information, and analyze the traversal process based on the traversal report information; The analyzing the traversal process based on the traversal report information includes: Receive a user picture input by a user, where the user picture is a screenshot of a user interface in the target application; Searching for images that match the user's picture; and The search result is fed back to the user to inform the user of the traversal status of the user interface involved in the user picture.
6. An electronic device comprising: One or more memories storing executable instructions; as well as One or more processors execute the executable instructions to implement the method according to any one of claims 1 to 4.
7. A computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, causes the processor to execute the method according to any one of claims 1 to 4.
