A remote automated testing system, method, and storage medium
The remote automated testing system, based on a client-server-client architecture, utilizes a proxy server to provide API proxy functionality, thus solving the problems of high deployment costs and limited functionality, and enabling remote automated testing across multiple platforms.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BONREE DATA TECH CO LTD
- Filing Date
- 2023-02-15
- Publication Date
- 2026-04-28
AI Technical Summary
Existing automated testing systems are inadequate in terms of deployment costs and limited functionality, especially in the areas of remote access and user interface automation testing.
It adopts a client-server-client architecture, and provides API proxy functionality through a proxy server to avoid providing external access domain names and ports, thereby expanding testing capabilities.
It reduced deployment costs, enriched testing functions, and enabled remote automated testing capabilities across multiple platforms.
Smart Images

Figure CN116126616B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of automated testing technology, and in particular to a remote automated testing system, method, and storage medium. Background Technology
[0002] Performance testing is an essential process in mobile device manufacturing; however, as the production volume of mobile devices continues to expand, testing costs are also gradually increasing. Remote automated testing can significantly reduce testing costs while achieving accurate testing of mobile devices.
[0003] Currently, existing automated testing systems typically employ a client-server architecture, enabling local or remote invocation of relevant functions. Specifically, the core of this architecture is exposing a server connected to the device under test. The server accepts and executes client requests and responds with the results. However, in existing technologies, enabling external clients to access the server requires the server to provide a domain name and port for external access, increasing deployment costs. Furthermore, existing automated testing systems generally only offer user interface automation testing functions, resulting in relatively limited functionality. Summary of the Invention
[0004] This invention provides a remote automated testing system, method, and storage medium. In the process of remote automated testing of mobile terminals, the proxy server only needs to provide API proxy functions for external access, without having to provide external access domain names and ports. This can reduce deployment costs and greatly enrich the achievable testing functions.
[0005] According to one aspect of the present invention, a remote automated testing system is provided, comprising a proxy server and a testing terminal;
[0006] The proxy server is connected to the test terminal and is used to send a corresponding application programming interface (API) request to the test terminal according to the API call request sent by the remote control terminal, and to forward the test results fed back by the test terminal to the remote control terminal.
[0007] The test terminal is used to generate test instructions corresponding to the application programming interface request, send the test instructions to the mobile terminal under test, receive the test results corresponding to the test instructions from the mobile terminal under test, and send the test results to the proxy server.
[0008] Optionally, the remote automated testing system also includes a remote control terminal and at least one mobile terminal to be tested;
[0009] The remote control terminal is connected to the proxy server and is used to generate an application programming interface (API) call request according to the user's operation instructions, send the API call request to the proxy server, and receive test results forwarded by the proxy server.
[0010] Each of the mobile terminals to be tested is connected to the test terminal and is used to execute the test instructions sent by the test terminal to obtain test results and send the test results to the test terminal.
[0011] Optionally, the proxy server includes a streaming media service module;
[0012] The streaming media service module is used to acquire the screen image of the mobile terminal under test sent by the test terminal, and send the screen image to the remote control terminal.
[0013] The remote control terminal is also used to display the screen image;
[0014] The test terminal is also used to acquire the screen image of the mobile terminal under test and send the screen image to the streaming media service module.
[0015] Optionally, the proxy server may further include a CAPTCHA recognition service module;
[0016] The verification code recognition service module is used to receive the verification code to be recognized generated by the mobile terminal under test sent by the test terminal, recognize the verification code to be recognized to obtain the verification code recognition result, and send the verification code recognition result to the test terminal.
[0017] The test terminal is further configured to acquire the verification code to be recognized generated by the mobile terminal under test, send the verification code to be recognized to the verification code recognition service module, receive the verification code recognition result sent by the verification code recognition service module, and send the verification code recognition result to the mobile terminal under test.
[0018] Optionally, the test terminal includes an external access layer, a device access interface layer, a function implementation layer, and a mobile device driver layer;
[0019] The external access layer is connected to the device access interface layer and is used to forward application programming interface requests sent by the proxy server to the device access interface layer, and to forward test results fed back by the device access interface layer to the proxy server.
[0020] The device access interface layer is connected to the function implementation layer and is used to generate corresponding function module call instructions and send them to the function implementation layer according to the application programming interface request forwarded by the external access layer, and to forward the test results sent by the mobile device driver layer to the external access layer.
[0021] The function implementation layer is connected to the mobile device driver layer and is used to call the corresponding function module according to the function module call instruction to generate test instructions and send the test instructions to the mobile device driver layer.
[0022] The mobile device driver layer is connected to the mobile terminal under test and the device access interface layer, and is used to drive the mobile terminal under test according to the test instructions to obtain test results and send the test results to the device access interface layer.
[0023] Optionally, the functional modules include at least one of a device management module, a device user interface automation module, a remote control module, a device performance module, and a media function module.
[0024] Optionally, the mobile device driver layer includes an Android driver module and an iOS driver module;
[0025] The Android driver module is used to drive the mobile terminal under test corresponding to the Android system according to the test instructions in order to obtain test results.
[0026] The iOS driver module is used to drive the mobile terminal under test corresponding to the iOS system according to the test instructions in order to obtain test results.
[0027] Optionally, the mobile terminal to be tested is based on an Android system or an iOS system.
[0028] According to another aspect of the present invention, a remote automated testing method is provided, applied to the remote automated testing system described in any embodiment of the present invention, comprising:
[0029] The proxy server generates a corresponding application programming interface (API) request based on the API call request sent by the remote control terminal.
[0030] The test terminal generates test instructions corresponding to the application programming interface request, and executes the test instructions through the mobile terminal under test to obtain test results.
[0031] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the remote automated testing method according to any embodiment of the present invention.
[0032] The technical solution of this invention involves a proxy server generating a corresponding application programming interface (API) request based on an API call request sent by a remote control terminal. Then, a test terminal generates test instructions corresponding to the API request and executes these instructions on the mobile terminal under test to obtain test results. By adopting a client-server-client architecture, the proxy server only needs to provide API proxy functionality for external access, without needing to provide external access domain names and ports. This reduces deployment costs and greatly enriches the achievable testing functions.
[0033] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0034] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0035] Figure 1A This is a schematic diagram of the structure of a remote automated testing system provided in Embodiment 1 of the present invention;
[0036] Figure 1B This is a schematic diagram of another remote automated testing system provided in Embodiment 1 of the present invention;
[0037] Figure 1C This is a schematic diagram of another remote automated testing system provided in Embodiment 1 of the present invention;
[0038] Figure 1D This is a schematic diagram of the structure of a proxy server according to Embodiment 1 of the present invention;
[0039] Figure 1E This is a schematic diagram of another proxy server structure provided according to Embodiment 1 of the present invention;
[0040] Figure 1F This is a schematic diagram of the structure of a test terminal provided according to Embodiment 1 of the present invention;
[0041] Figure 1G This is a schematic diagram of the structure of a mobile device driver layer according to Embodiment 1 of the present invention;
[0042] Figure 1HThis is a schematic diagram of the internal architecture of the proxy server and the test client provided in Embodiment 1 of the present invention;
[0043] Figure 2A This is a flowchart of a remote automated testing method provided in Embodiment 2 of the present invention;
[0044] Figure 2B This is a schematic diagram of the automated testing page of the remote control client provided according to Embodiment 2 of the present invention;
[0045] Figure 2C This is a schematic diagram of an automated testing process for an Android mobile terminal according to Embodiment 2 of the present invention. Detailed Implementation
[0046] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0047] It should be noted that the terms "first," "second," "target," etc., used in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0048] Example 1
[0049] Figure 1A This invention provides a schematic diagram of a remote automated testing system according to Embodiment 1; the remote automated testing system 100 may include a proxy server 110 and a testing terminal 120;
[0050] The proxy server 110 is connected to the test terminal 120 and is used to send corresponding application programming interface (API) requests to the test terminal 120 according to the API call requests sent by the remote control terminal 130, and to forward the test results fed back by the test terminal 120 to the remote control terminal 130. The proxy server 110 is connected to the remote control terminal 130 and can provide an externally accessible proxy function application programming interface (API), such as APIs for automation, performance acquisition, and remote control.
[0051] In this embodiment, when a test user needs to access the mobile terminal under test, they can first access the proxy server 110 through the application client on the remote control terminal 130, and then access the specific test terminal 120 through the API provided by the proxy server 110. The mobile terminal under test can then be mounted on the test terminal 120.
[0052] The application programming interface (API) call request can be a request to access the proxy API on the proxy server 110. In a specific example, the test user can operate on the application client installed on the remote control terminal 130, such as selecting the mobile terminal to be tested or clicking to select test items, to generate a corresponding API call request and send it to the proxy server 110. Correspondingly, after receiving the API call request sent by the remote control terminal 130, the proxy server 110 can generate an API request corresponding to the API call request based on the pre-configured device access proxy service module and send it to the test terminal 120 to realize remote access to the mobile terminal 140 to be tested mounted on the test terminal 120.
[0053] Secondly, when the proxy server 110 receives the test results (e.g., device performance, screen interface, etc.) from the test terminal 120, it can further forward the test results to the remote control terminal 130 so that the remote control terminal 130 can display the test results to the user.
[0054] The test terminal 120 is used to generate test instructions corresponding to the application programming interface request, send the test instructions to the mobile terminal 140 under test, receive the test results corresponding to the test instructions from the mobile terminal 140 under test, and send the test results to the proxy server 110.
[0055] The test terminal 120 can be a computer device that can be connected to multiple mobile terminals via a wired connection. Typically, the test terminal 120 can be pre-configured with an execution client, which executes the corresponding instructions and returns the results after receiving an API request from the proxy server 110.
[0056] In a specific example, after receiving an API request from the proxy server 110, the test terminal 120 can generate a test instruction corresponding to the API request through pre-configured functional modules in the execution client. This test instruction can then be sent to the mobile terminal 140 under test (e.g., a mobile phone, tablet, etc.) to automatically execute the corresponding operation. The test instruction can be an automatic control instruction for the mobile terminal. Alternatively, a pre-configured driver module can drive the mobile terminal to perform corresponding test operations based on the test instruction to obtain test results.
[0057] The advantage of the above setup is that it separates the API service from the program that executes the instructions, enabling one API service to connect to multiple execution clients, that is, one proxy server 110 to connect to multiple test terminals 120, easily realizing the ability to make remote calls and reducing deployment costs.
[0058] The technical solution of this invention involves a proxy server generating a corresponding application programming interface (API) request based on an API call request sent by a remote control terminal. Then, a test terminal generates test instructions corresponding to the API request and executes these instructions on the mobile terminal under test to obtain test results. By adopting a client-server-client architecture, the proxy server only needs to provide API proxy functionality for external access, without needing to provide external access domain names and ports. This reduces deployment costs and greatly enriches the achievable testing functions.
[0059] Optional, such as Figure 1B As shown, the remote automated testing system 100 may also include a remote control terminal 130 and at least one mobile terminal 140 to be tested.
[0060] The remote control terminal 130 is connected to the proxy server 110 and is used to generate application programming interface (API) call requests according to user operation instructions, send the API call requests to the proxy server 110, and receive test results forwarded by the proxy server 110. The remote control terminal 130 can be a computer device and may have a corresponding remote control client pre-installed, such as a Postman client. Typically, the remote control client can be a Hypertext Transfer Protocol (HTTP) client written in any language.
[0061] In a specific example, test users can operate on the remote control client to generate user operation commands. For example, clicking the APP test button generates the corresponding user operation command. Optionally, the client can pre-set a series of user operation commands for a test content. For example, for APP testing, pre-set user operation commands for operations such as starting the APP, logging into the APP, exiting the APP, and deleting the APP; the client automatically sends the next user operation command after receiving the result of each operation.
[0062] Secondly, the remote control terminal 130 can generate corresponding API call requests based on user operation instructions to remotely call the proxy function API of the proxy server 110, and then control the mobile terminal 140 under test to perform specific test operations through the test terminal 120. Finally, the remote control terminal 130 can receive the test results forwarded by the proxy server 110 and visualize the test results. The test results can be messages indicating successful or failed execution.
[0063] Each of the mobile terminals 140 to be tested is connected to the test terminal 120 and is used to execute the test instructions sent by the test terminal 120 to obtain test results and send the test results to the test terminal 120. The mobile terminals 140 to be tested can be mobile devices based on different operating systems, and one test terminal 120 can connect to multiple mobile terminals 140 to be tested corresponding to different operating systems.
[0064] In this embodiment, the mobile terminal 140 under test can automatically execute various test instructions sent by the test terminal 120 to obtain the corresponding test results and send the test results to the test terminal 120. For example, the mobile terminal 140 under test can send operation logs or its own device performance parameters to the test terminal 120 so that the test terminal 120 can obtain the execution status of the test instructions.
[0065] In one specific embodiment of this example, the structure of the remote automated testing system 100 can be as follows: Figure 1C As shown. The test terminal 120 has a deployment client installed and is connected to multiple mobile devices based on different operating systems, serving as the mobile terminal 140 to be tested. Furthermore, the test terminal 120 connects to the remote control terminal 130 via a proxy server 110Server. The remote control terminal 130 has a user client installed.
[0066] Optional, such as Figure 1D As shown, the proxy server 110 may include a streaming media service module 111;
[0067] The streaming media service module 111 is used to acquire the screen image of the mobile terminal 140 under test sent by the test terminal 120, and send the screen image to the remote control terminal 130; wherein, the streaming media service module 111 is used to provide screen synchronization function of the mobile terminal, for example, it can be a Simple Realtime Server (SRS) streaming media service module.
[0068] The remote control terminal 130 is also used to display the screen image;
[0069] The test terminal 120 is also used to acquire the screen image of the mobile terminal 140 under test and send the screen image to the streaming media service module 111.
[0070] In this embodiment, the remote control terminal 130 can remotely control the test terminal 120 to obtain the real-time screen image of the mobile terminal 140 under test through the streaming media service module 111, and can display the screen image on the function page of the remote control client. In a specific example, the test terminal 120 can take a screenshot of the screen of the mobile terminal 140 under test to obtain the screen image, and can encode the screen image and transmit it to the remote control terminal 130.
[0071] Optional, such as Figure 1E As shown, the proxy server 110 may further include a verification code recognition service module 112;
[0072] The verification code recognition service module 112 is used to receive the verification code to be recognized generated by the mobile terminal to be tested 140 sent by the test terminal 120, recognize the verification code to be recognized to obtain the verification code recognition result, and send the verification code recognition result to the test terminal 120.
[0073] The test terminal 120 is further configured to acquire the verification code to be recognized generated by the mobile terminal 140 under test, send the verification code to be recognized to the verification code recognition service module 112, receive the verification code recognition result sent by the verification code recognition service module 112, and send the verification code recognition result to the mobile terminal 140 under test.
[0074] The CAPTCHA recognition service module 112 is used to provide the function of recognizing image CAPTCHAs or behavioral CAPTCHAs during automated testing. In some special testing scenarios, such as APP login, it is necessary to enter the corresponding CAPTCHA according to the prompts. In this embodiment, the CAPTCHA recognition service module 112 can automatically recognize the CAPTCHA to be recognized and send the CAPTCHA recognition result to the test terminal 120, which in turn forwards it to the corresponding mobile terminal 140 to be tested, so as to support the realization of remote automated testing.
[0075] Optional, such as Figure 1F As shown, the test terminal 120 may include an external access layer 121, a device access interface layer 122, a function implementation layer 123, and a mobile device driver layer 124. In this embodiment, the test terminal 120 may be pre-configured with a test client, the architecture of which may include an external access layer 121, a device access interface layer 122, a function implementation layer 123, and a mobile device driver layer 124.
[0076] The external access layer 121 is connected to the device access interface layer 122 and is used to forward application programming interface requests sent by the proxy server 110 to the device access interface layer 122, and to forward test results fed back by the device access interface layer 122 to the proxy server 110; wherein, the external access layer 121 may include a client proxy for forwarding remote call requests (e.g., API call requests) and responses, and a server for implementing local inter-process communication calls.
[0077] The device access interface layer 122 is connected to the function implementation layer 123 and is used to generate corresponding function module call instructions and send them to the function implementation layer 123 according to the application programming interface requests forwarded by the external access layer 121, and to forward the test results sent by the mobile device driver layer 124 to the external access layer 121; wherein, the device access interface layer 122 is used to provide APIs for functions such as automation, performance acquisition, and remote control, and can call the corresponding function modules in the function implementation layer 123 according to the received API requests.
[0078] The function implementation layer 123 is connected to the mobile device driver layer 124 and is used to call the corresponding function module according to the function module call instruction to generate test instructions and send the test instructions to the mobile device driver layer 124. The function implementation layer 123 may include multiple function modules for the specific implementation of API functions, that is, automatically generating corresponding test instructions and sending them to the mobile device driver layer 124 to drive the mobile terminal 140 under test to perform corresponding test operations.
[0079] The mobile device driver layer 124 is connected to the mobile terminal under test 140 and the device access interface layer 122, and is used to drive the mobile terminal under test 140 according to the test instructions to obtain test results and send the test results to the device access interface layer 122. The mobile device driver layer 124 is used to invoke the system functions of the corresponding mobile terminal under test 140 according to the test instructions.
[0080] The functional modules may include at least one of the following: a device management module, a device user interface automation module, a remote control module, a device performance module, and a media function module. The device management module supports the simultaneous use of multiple mobile terminals on a single test terminal 120; the device user interface automation module supports automated user interface (UI) operations in multiple scenarios on the mobile terminals; the remote control module supports remote or local application for use of the mobile terminals; the device performance module supports the collection of UI performance, device performance, and network data on the mobile terminals; and the media function module supports screen sharing when using the mobile terminals.
[0081] The advantage of the above settings is that they can expand the capabilities of the automation framework, supporting not only UI automation operations, but also remote control and performance data acquisition.
[0082] Optional, such as Figure 1G As shown, the mobile device driver layer 124 may include an Android driver module 1241 and an iOS driver module 1242.
[0083] The Android driver module 1241 is used to drive the mobile terminal 140 under test corresponding to the Android system according to the test instructions in order to obtain test results.
[0084] The iOS driver module 1242 is used to drive the mobile terminal 140 under test corresponding to the iOS system according to the test instructions in order to obtain test results.
[0085] The Android driver module 1241 and the iOS driver module 1242 are used to call the system functions of the mobile terminal 140 under test, which operates on Android and iOS systems, respectively. In this embodiment, the mobile terminal 140 under test can be based on either Android or iOS. The mobile terminal 140 under test can have different types of application clients installed.
[0086] The advantage of the above setup is that the same API can be used to write automated test processes for multiple platforms (iOS or Android), achieving code reuse.
[0087] In one specific implementation of this embodiment, the internal architecture of the proxy server 110 and the test client can be as follows: Figure 1H As shown. The proxy server 110 may include a device access proxy service module, an SRS streaming media service module 111, and a verification code recognition service module 112, to respectively implement API proxy functions, mobile terminal screen synchronization functions, and verification code recognition functions in the automation process. Furthermore, the test client may include an external access layer 121, a device access interface layer 122, a function implementation layer 123, and a mobile device driver layer 124; the external access layer 121 may include a client proxy for forwarding remote call requests and a local server for forwarding local call requests; the function implementation layer 123 may include functional modules for implementing different functions. The mobile device driver layer 124 may include an Android driver module 1241 for driving Android phones and an iOS driver module 1242 for driving iOS phones.
[0088] Example 2
[0089] Figure 2A This is a flowchart of a remote automated testing method provided in Embodiment 2 of the present invention. This embodiment is applicable to the situation of remote automated testing of mobile terminals. This method can be executed by the remote automated testing system 100 described in Embodiment 1 of the present invention, such as... Figure 2A As shown, the method includes:
[0090] S210. Generate a corresponding application programming interface (API) request based on the API call request sent by the remote control terminal through the proxy server.
[0091] Specifically, first, the test user logs into the remote control client installed on the remote control terminal 130 and performs operations within the client to generate user operation commands. Then, the remote control terminal 130 generates a corresponding API call request based on the user operation command and sends it to the proxy server 110. Next, the proxy server 110, based on the API call request, invokes the corresponding pre-configured API function module to generate a corresponding API request. The API call request may include information such as the identifier of the API function module to be invoked.
[0092] S220. Generate test instructions corresponding to the application programming interface request through the test terminal, and execute the test instructions through the mobile terminal under test to obtain test results.
[0093] Specifically, the various functional layers of the client installed and deployed on the test terminal 120 can generate corresponding test instructions that the mobile terminal 140 under test can execute based on the API request; furthermore, the mobile terminal 140 under test can execute the test instructions to obtain test results, thereby ultimately realizing remote automated testing of the mobile terminal.
[0094] In a specific example, the automated testing page of the remote control client can be like this: Figure 2B As shown in the image, the remote control client can execute the iOS automated testing process and simultaneously display the mobile terminal's screen. Furthermore, each test stage and its corresponding results can be displayed on the page.
[0095] In another specific example, the automated testing process for Android mobile terminals can be as follows: Figure 2C As shown. The test program, written in Python, can automatically test various functions of the app.
[0096] The technical solution of this invention involves a proxy server generating a corresponding application programming interface (API) request based on an API call request sent by a remote control terminal. Then, a test terminal generates test instructions corresponding to the API request and executes these instructions on the mobile terminal under test to obtain test results. By adopting a client-server-client architecture, the proxy server only needs to provide API proxy functionality for external access, without needing to provide external access domain names and ports. This reduces deployment costs and greatly enriches the achievable testing functions.
[0097] Example 3
[0098] In some embodiments, the remote automated testing method may be implemented as computer instructions tangibly contained in a computer-readable storage medium, such as a storage unit. In some embodiments, part or all of the computer instructions may be loaded and / or mounted on an electronic device via ROM and / or a communication unit. When the computer program is loaded into RAM and executed by a processor, one or more steps of the remote automated testing method described above may be performed. Alternatively, in other embodiments, the processor may be configured to perform the remote automated testing method by any other suitable means (e.g., by means of firmware).
[0099] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0100] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0101] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0102] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0103] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0104] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0105] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0106] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A remote automated testing system, characterized in that, It includes a proxy server, a test terminal, a remote control terminal, and at least one mobile terminal to be tested; The proxy server is connected to the test terminal and is used to send a corresponding application programming interface (API) request to the test terminal according to the API call request sent by the remote control terminal, and to forward the test results fed back by the test terminal to the remote control terminal. The test terminal is used to generate test instructions corresponding to the application programming interface request, send the test instructions to the mobile terminal under test, receive the test results corresponding to the test instructions from the mobile terminal under test, and send the test results to the proxy server. The remote control terminal is connected to the proxy server and is used to generate an application programming interface (API) call request according to the user's operation instructions, send the API call request to the proxy server, and receive test results forwarded by the proxy server. Each of the mobile terminals to be tested is connected to the test terminal and is used to execute the test instructions sent by the test terminal to obtain test results and send the test results to the test terminal. The proxy server is specifically used to generate an application programming interface request corresponding to the application programming interface call request and send it to the test terminal after receiving the application programming interface call request sent by the remote control terminal, based on the pre-set device access proxy service module. The test terminal is specifically used to generate test instructions corresponding to application programming interface requests through pre-configured functional modules in the execution client, and send the test instructions to the mobile terminal under test, so as to separate the application programming interface service from the program executing the instructions; wherein, the test instructions are executed by a pre-configured driver module, driving the mobile terminal to perform corresponding test operations to obtain test results; The test terminal includes an external access layer, a device access interface layer, a function implementation layer, and a mobile device driver layer; The external access layer is connected to the device access interface layer and is used to forward the application programming interface request sent by the proxy server to the device access interface layer. The device access interface layer is connected to the function implementation layer and is used to generate corresponding function module call instructions and send them to the function implementation layer based on the application programming interface request forwarded by the external access layer. The functional implementation layer is connected to the mobile device driver layer and is used to call the corresponding functional module according to the functional module call instruction to generate test instructions.
2. The system according to claim 1, characterized in that, The proxy server includes a streaming media service module; The streaming media service module is used to acquire the screen image of the mobile terminal under test sent by the test terminal, and send the screen image to the remote control terminal. The remote control terminal is also used to display the screen image; The test terminal is also used to acquire the screen image of the mobile terminal under test and send the screen image to the streaming media service module.
3. The system according to claim 1, characterized in that, The proxy server also includes a CAPTCHA recognition service module; The verification code recognition service module is used to receive the verification code to be recognized generated by the mobile terminal under test sent by the test terminal, recognize the verification code to be recognized to obtain the verification code recognition result, and send the verification code recognition result to the test terminal. The test terminal is further configured to acquire the verification code to be recognized generated by the mobile terminal under test, send the verification code to be recognized to the verification code recognition service module, receive the verification code recognition result sent by the verification code recognition service module, and send the verification code recognition result to the mobile terminal under test.
4. The system according to claim 1, characterized in that, The external access layer is also used to forward the test results fed back by the device access interface layer to the proxy server; The device access interface layer is also used to forward the test results sent by the mobile device driver layer to the external access layer; The functional implementation layer is also used to send the test instructions to the mobile device driver layer; The mobile device driver layer is connected to the mobile terminal under test and the device access interface layer, and is used to drive the mobile terminal under test according to the test instructions to obtain test results and send the test results to the device access interface layer.
5. The system according to claim 1, characterized in that, The functional modules include at least one of the following: device management module, device user interface automation module, remote control module, device performance module, and media function module.
6. The system according to claim 4, characterized in that, The mobile device driver layer includes an Android driver module and an iOS driver module; The Android driver module is used to drive the mobile terminal under test corresponding to the Android system according to the test instructions in order to obtain test results. The iOS driver module is used to drive the mobile terminal under test corresponding to the iOS system according to the test instructions in order to obtain test results.
7. The system according to claim 6, characterized in that, The mobile terminal to be tested is based on either the Android or iOS system.
8. A remote automated testing method, characterized in that, The remote automated testing system applied to any one of claims 1-7 includes: The application programming interface call request is generated based on the user's operation instructions via a remote control terminal; The proxy server generates a corresponding application programming interface (API) request based on the API call request sent by the remote control terminal. The test terminal generates test instructions corresponding to the application programming interface request, and executes the test instructions through the mobile terminal under test to obtain test results. Specifically, the proxy server generates corresponding application programming interface (API) requests based on the API call requests sent by the remote control terminal, including: Through the proxy server, based on the pre-configured device access proxy service module, an application programming interface (API) request corresponding to the API call request is generated; The test terminal generates test instructions corresponding to the application programming interface request, including: Using a test terminal, based on the pre-configured functional modules in the execution client, test instructions corresponding to the application programming interface (API) request are generated and sent to the mobile terminal under test to separate the API service from the program executing the instructions. The test instructions are executed by a pre-configured driver module, which drives the mobile terminal to perform corresponding test operations to obtain test results. Using the test terminal, based on the pre-configured functional modules in the execution client, test instructions corresponding to the application programming interface request are generated, including: The application programming interface request sent by the proxy server is forwarded to the device access interface layer through the external access layer. The device access interface layer generates corresponding function module call instructions based on the application programming interface requests forwarded by the external access layer and sends them to the function implementation layer. Through the functional implementation layer, the corresponding functional module is invoked according to the functional module invocation instruction to generate test instructions.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that are used to cause a processor to execute the remote automated testing method of claim 8.
Citation Information
Patent Citations
Cloud testing method, device and system of mobile terminal, medium and electronic equipment
CN112860572A