CN107454124B - Equipment automation method and device - Google Patents

Equipment automation method and device Download PDF

Info

Publication number
CN107454124B
CN107454124B CN201610375229.2A CN201610375229A CN107454124B CN 107454124 B CN107454124 B CN 107454124B CN 201610375229 A CN201610375229 A CN 201610375229A CN 107454124 B CN107454124 B CN 107454124B
Authority
CN
China
Prior art keywords
automation
equipment
server
instruction
type
Prior art date
Application number
CN201610375229.2A
Other languages
Chinese (zh)
Other versions
CN107454124A (en
Inventor
徐达峰
Original Assignee
创新先进技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 创新先进技术有限公司 filed Critical 创新先进技术有限公司
Priority to CN201610375229.2A priority Critical patent/CN107454124B/en
Publication of CN107454124A publication Critical patent/CN107454124A/en
Application granted granted Critical
Publication of CN107454124B publication Critical patent/CN107454124B/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network-specific arrangements or communication protocols supporting networked applications
    • H04L67/14Network-specific arrangements or communication protocols supporting networked applications for session management
    • H04L67/141Network-specific arrangements or communication protocols supporting networked applications for session management provided for setup of an application session
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing packet switching networks
    • H04L43/50Testing arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network-specific arrangements or communication protocols supporting networked applications
    • H04L67/28Network-specific arrangements or communication protocols supporting networked applications for the provision of proxy services, e.g. intermediate processing or storage in the network

Abstract

The application discloses an equipment automation method and device, which are used for solving the problems that in the prior art, automation of mobile equipment is often performed only for a single scene, and automation requirements such as multi-scene and multi-context tests cannot be met. The application discloses an equipment automation method, including: the server receives an automation instruction; the server side determines the equipment type corresponding to the automation instruction according to the automation instruction; and the server side starts the agent side so that the agent side drives at least one device belonging to the device type to execute the automation instruction by adopting a driving program corresponding to the device type.

Description

Equipment automation method and device

Technical Field

The present application relates to the field of automation, and in particular, to a method and an apparatus for automation of a device.

Background

With the rapid development of the mobile internet, the demand of mobile devices increases at a high speed, and the mobile devices and applications on application devices are more complicated and multi-scenario.

In the prior art, the operation of a user on a mobile device is often simulated by a machine to realize mobile device automation, which may include automatic testing of the mobile device and an application on the mobile device and other automation operations.

However, in the prior art, automation of a mobile device is often performed only for a simple single scene, and complicated automation requirements such as multi-scene and multi-context testing cannot be met.

Disclosure of Invention

The equipment automation method and device provided by the embodiment of the application are used for solving the problem that the automation requirements of mobile equipment automation in the prior art for more complicated automation such as multi-scene and multi-context tests cannot be met.

The embodiment of the application adopts the following technical scheme:

an apparatus automation method provided by an embodiment of the present application includes:

the server receives an automation instruction;

the server side determines the equipment type corresponding to the automation instruction according to the automation instruction;

and the server side starts an agent side so that the agent side drives the equipment to execute the automation instruction by adopting a corresponding driving program according to the equipment type and the context condition of at least one piece of equipment belonging to the equipment type.

Optionally, the receiving, by the server, the automation instruction specifically includes:

the server receives an automation instruction sent by a client, wherein the automation instruction is obtained by the client from a user process.

Optionally, after the server determines, according to the automation instruction, a device type corresponding to the automation instruction, the method further includes:

the server determines the at least one device belonging to the device type according to the device type;

the server side establishes connection with the equipment;

the server obtains the context of the device based on the connection established with the device.

Optionally, after the server starts the agent according to the device type, the method further includes:

and the server provides the equipment type and the context condition of the equipment to the agent so that the agent drives the equipment to execute the automation instruction by adopting a corresponding driver according to the equipment type and the context condition of at least one piece of equipment belonging to the equipment type.

The equipment automation device that this application embodiment provided, the device is located the server side, includes:

the first receiving module is used for receiving an automation instruction;

the determining module is used for determining the equipment type corresponding to the automation instruction according to the automation instruction;

and the starting module is used for starting the agent end so that the agent end can drive the equipment to execute the automation instruction by adopting a corresponding driving program according to the equipment type and the context condition of at least one piece of equipment belonging to the equipment type.

Optionally, the first receiving module receives an automation instruction sent by a client, where the automation instruction is obtained by the client from a user process.

Optionally, the apparatus further comprises:

the first obtaining module is used for determining the at least one device belonging to the device type according to the device type after the determining module determines the device type corresponding to the automation instruction according to the automation instruction, establishing connection with the device, and obtaining the context condition of the device based on the connection established with the device.

Optionally, the apparatus further comprises:

and the providing module is used for providing the device type and the context condition of the device to the agent terminal after the agent terminal is started by the starting module, so that the agent terminal drives the device to execute the automation instruction by adopting a corresponding driving program according to the device type and the context condition of at least one device belonging to the device type.

Another apparatus automation method provided in an embodiment of the present application includes:

the agent end establishes connection with at least one device, and the device belongs to the device type corresponding to the automation instruction received by the server end;

the agent end receives the automation instruction;

and the agent end drives the equipment to execute the automation instruction by adopting a corresponding driving program based on the connection established with the equipment and according to the equipment type and the context condition of the equipment.

Optionally, before the agent end drives the device to execute the automation instruction by using a corresponding driver according to the device type and the context of the device, the method further includes:

and the agent side obtains the device type and the context condition of the device from the device and/or the server side.

Optionally, the establishing, by the agent, a connection with at least one device specifically includes:

the method comprises the steps that an agent side obtains relevant information of at least one device from a server side, the device belongs to a device type corresponding to an automation instruction received by the server side, and the relevant information comprises an address of the device;

and the agent end establishes connection with the equipment according to the related information.

Optionally, the receiving, by the agent, the automation instruction specifically includes:

the agent end receives the automation instruction sent by a client end and/or the server end, wherein the automation instruction sent by the client end is obtained by the client end from a user process, and the automation instruction sent by the server end is obtained by the server end from the client end.

Another apparatus automation device provided in an embodiment of the present application, where the apparatus is located at an agent end, includes:

the connection module is connected with at least one device, and the device belongs to the device type corresponding to the automation instruction received by the server;

the second receiving module is used for receiving the automation instruction;

and the driving module is used for driving the equipment to execute the automation instruction by adopting a corresponding driving program according to the equipment type and the context condition of the equipment based on the connection established with the equipment.

Optionally, the apparatus further comprises:

and the second obtaining module is used for obtaining the equipment type and the context condition of the equipment from the equipment and/or the server before the driving module drives the equipment to execute the automation instruction by adopting a corresponding driving program according to the equipment type and the context condition of the equipment.

Optionally, the connection module obtains relevant information of at least one device from the server, where the device belongs to a device type corresponding to the automation instruction received by the server, and establishes a connection with the device according to the relevant information, where the relevant information includes an address of the device.

Optionally, the second receiving module receives the automation instruction sent by a client and/or the server, where the automation instruction sent by the client is obtained by the client from a user process, and the automation instruction sent by the server is obtained by the server from the client.

Another apparatus automation method provided in an embodiment of the present application includes:

the method comprises the steps that a client sends an automation instruction to a server, so that the server determines the equipment type corresponding to the automation instruction according to the automation instruction;

and the client sends the automation instruction to an agent end, so that the agent end drives the equipment to execute the automation instruction by adopting a corresponding driver according to the equipment type and the context of at least one piece of equipment belonging to the equipment type.

Optionally, before the client sends the automation instruction to the server, the method further includes:

and the client receives the automation instruction sent by the user process.

Optionally, the sending, by the client, the automation instruction to the server specifically includes:

the client packages the automation instructions, wherein the packaging comprises protocol conversion aiming at the automation instructions;

and the client sends the packaged automation instruction to the server.

The embodiment of the present application provides another apparatus for automation of a device, where the apparatus is located at a client, and the apparatus includes:

the first sending module is used for sending an automation instruction to a server so that the server can determine the equipment type corresponding to the automation instruction according to the automation instruction;

and the second sending module is used for sending the automation instruction to the agent terminal so that the agent terminal can drive the equipment to execute the automation instruction by adopting a corresponding driving program according to the equipment type and the context condition of at least one piece of equipment belonging to the equipment type.

Optionally, the apparatus further comprises:

and the third receiving module is used for receiving the automation instruction sent by the user process before the first sending module sends the automation instruction to the server.

Optionally, the first sending module packages the automation instruction by the client, and sends the packaged automation instruction to the server, where the package includes a protocol conversion for the automation instruction.

The embodiment of the application adopts at least one technical scheme which can achieve the following beneficial effects: the device can correspondingly have multiple contexts for the situation of multiple scenes, and one or more agent terminals which can be started by the server terminal adopt corresponding driving programs to drive the device to execute the automation instructions according to the device type of the device and the context situation of the device, so that the automation requirements of multiple scenes, multiple context tests and the like can be met, and therefore, the problems in the prior art can be partially or completely solved.

Drawings

The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:

fig. 1 is a schematic flow chart of an apparatus automation method according to an embodiment of the present application;

FIG. 2 is a schematic flow chart of another method for automation of a device according to an embodiment of the present disclosure;

fig. 3 is a schematic diagram of several common device driver frameworks and connection protocols between the device driver frameworks and devices provided in an embodiment of the present application;

FIG. 4 is a schematic flow chart illustrating another method for automating equipment according to an embodiment of the present disclosure;

fig. 5 is a flowchart of multi-terminal interaction when the scheme of the present application is implemented in an actual application scenario provided in the embodiment of the present application;

FIG. 6 is a schematic structural diagram of an apparatus automation device corresponding to FIG. 1 provided in an embodiment of the present application;

FIG. 7 is a schematic structural diagram of an apparatus automation device corresponding to FIG. 2 provided in an embodiment of the present application;

fig. 8 is a schematic structural diagram of an apparatus automation device corresponding to fig. 4 according to an embodiment of the present application.

Detailed Description

In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be described in detail and completely with reference to the following specific embodiments of the present application and the accompanying drawings. It should be apparent that the described embodiments are only some of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.

In the embodiment of the present application, the device may be a mobile device, such as a mobile phone, a tablet computer, a notebook computer, a smart watch, a smart bracelet, a vehicle-mounted mobile station, and the like; the device may also be a non-mobile device such as a Personal Computer (PC), a midrange computer, a cluster of computers, etc.

In the embodiment of the present application, the scene may refer to a service scene of an application on a device, and the like. For example, applications on a mobile phone include a Native application that runs locally, a Web application that runs via a browser and the internet, and a Native and Web compatible application. Native and Web can be respectively a class of service scenes, and for each class of service scenes, many detailed service scenes can be further divided according to different specific service contents, such as an instant messaging service scene, a payment service scene, a multimedia audiovisual service scene, a game service scene and the like, and the detailed service scenes can be further refined, and the refinement degree of the service scenes is not limited in the application.

At present, the types of devices of mobile devices are increasing, the multi-scenario applications on the mobile devices are also increasing, and these situations lead to multi-scenario and more automation requirements such as multi-context tests, wherein the types of devices can be divided based on platforms, and common platforms include an iOS platform, an Android platform, a PC platform (Desktop), and the like. As described in the background art, the prior art cannot meet automation requirements of multi-scenario and multi-context testing, and the scheme of the present application can meet the requirements, which will be described below.

The scheme of the application can be implemented by an agent end, a client end or a server end and equipment to be used for executing the automation instruction; the scheme of the application can also be implemented by matching other terminals with the agent terminal and the equipment to be executed with the automation instruction.

The device to execute the automation instruction refers to a device in the device automation, the other terminals may refer to a user process, a client, a server, and the like, the other terminals and the agent terminal may be located on other devices except the device to execute the automation instruction, and any two terminals of the user process, the client, the server, and the agent terminal may be located on the same device or different devices. In order to distinguish the device to execute the automation instruction from the other devices, the following references to "devices" refer to the devices to execute the automation instruction.

For ease of understanding, the following describes the scheme of the present application from the perspective of a server, a proxy, and a client, respectively.

Fig. 1 is a schematic flowchart of an apparatus automation method according to an embodiment of the present application, where an execution subject of the flowchart is a server.

The process in fig. 1 may include the following steps:

s101: the server receives an automation instruction.

In the embodiment of the present application, the automation instruction may be a test instruction for an automation test, such as a statement in a test case script, or may be an operation instruction for other automation works besides the automation test, such as a statement in an automatic ticket buying script.

In the embodiment of the application, the client may establish a connection with the server in advance, and the automation instruction received by the server may be sent by the client, or may be directly written into the server by the user, and so on.

S102: and the server determines the equipment type corresponding to the automation instruction according to the automation instruction.

In the embodiment of the present application, the automation instruction may carry attribute information indicating one or more types of devices. The attribute information may be preset by a user or a machine, and may be set so that the attribute information indicates a certain type of device, provided that the present automation process desires to execute an automation instruction by a device belonging to the device type.

In the embodiment of the present application, as described above, the device types may be divided based on a platform, and the device types include, but are not limited to, at least one of iOS, Android, and Desktop.

S103: and the server side starts an agent side so that the agent side drives the equipment to execute the automation instruction by adopting a corresponding driving program according to the equipment type and the context condition of at least one piece of equipment belonging to the equipment type.

In this embodiment of the present application, the agent may be an instance of a predetermined agent class, and the server side starting the agent may at least include: the server initializes an instance of the proxy class.

In this embodiment of the application, the device in step S103 may be determined by the server according to the device type determined in step S102, for example, the server may find one or more available devices belonging to the device type according to the device type; the device in step S103 may also be determined by the agent according to the device type.

In this embodiment, the server may start one or more agents for driving the device to execute the automation instruction. It should be noted that, in practical applications, step S103 may also be executed before step S101 and/or step S102, and if there is an activated available agent after step S102 is executed, the server may not repeatedly execute the step of activating the agent, but may complete subsequent automation work in cooperation with the activated available agent.

In this embodiment, the agent end may provide a driver corresponding to the device type and corresponding to the context of the device according to the device type determined in step S102 and the context of at least one device belonging to the device type, where the context of the device may refer to a context related to the automation instruction and/or a context required by the device, and the like.

Further, aiming at automation requirements such as multi-scenario and multi-context testing, the agent end can provide applicable driving programs for the multi-scenario and the multi-context respectively, and can drive equipment to normally execute the automation instructions corresponding to the automation requirements.

For example, for a multi-scenario in which Native and Web are mixed, multi-context testing (which may include Native function testing, testing of an embedded Web module, etc.), drivers suitable for the Native and Web-related scenarios may be correspondingly provided, and the driver device may normally execute corresponding automation instructions.

The solution of the present application also supports lateral scaling when device driven updates and corresponding tool updates to quickly adapt to changes.

By the method, the equipment can correspondingly have multiple contexts for the situation of multiple scenes, one or more agent terminals which can be started by the server terminal drive the equipment to execute the automation instruction by adopting corresponding driving programs according to the equipment type of the equipment and the context situation of the equipment, so that the automation requirements of multiple scenes, multiple context tests and the like can be met, and the problems in the prior art can be partially or completely solved.

Moreover, because the automation instruction in the embodiment of the application can correspond to one or more device types, and the agent end can adapt to the driver according to the device type, the automation instruction can conveniently run across platforms, so that the platform-crossing performance of the scheme of the application is better, and the cost can be saved.

For example, under the condition that the scheme of the application is adopted, the same test case script or automatic script can be supported to interactively operate on two platforms of iOS and Android at the same time, the script can be compiled at any place and operate at any place, and the script compiling and maintaining cost is greatly reduced. Besides supporting platforms corresponding to mobile devices such as iOS and Android, the solution of the present application also supports various platforms corresponding to a PC, such as Windows and Linux.

Based on the method in fig. 1, the present application also provides some specific embodiments of the method in fig. 1, and further embodiments, which are described below.

In the embodiment of the present application, as can be seen from the foregoing description, in addition to the server, the agent and the device, there may be a client and a user process to participate in the scheme of the present application. In an implementation process, for step S101, the receiving, by the server, the automation instruction may specifically include: the server receives an automation instruction sent by a client, wherein the automation instruction is obtained by the client from a user process. In this case, the implementation process of the scheme of the present application may be started from the action of the user process.

Specifically, the server and the client can be started by the user process, the user process logs in the client, the connection between the client and the server is established, the user can send an automation instruction to the client, and the client sends the automation instruction to the server. It should be noted that, in practical applications, the client may also package the automation instruction and then send the automation instruction to the server, instead of directly forwarding the automation instruction, where the packaging may include operations such as protocol conversion for the automation instruction, and the purpose of packaging may be to improve security and/or subsequent processing efficiency of the automation instruction.

Through the work of the client and the server, a plurality of technical details can be shielded for the user process, the workload of the user process is reduced, and the usability of the scheme of the application to the user can be improved.

In the embodiment of the present application, it has been mentioned above that the context of the device may be obtained from the device by the server and then provided to the agent, or the agent may obtain the context from the device by itself. In the former case, for step S102, after the server determines the device type corresponding to the automation instruction according to the automation instruction, the server may further perform: the server determines the at least one device belonging to the device type according to the device type; the server side establishes connection with the equipment; the server obtains the context of the device based on the connection established with the device. Further, after the server starts the agent according to the device type, the server may further perform: and the server provides the equipment type and the context condition of the equipment to the agent so that the agent drives the equipment to execute the automation instruction by adopting a corresponding driver according to the equipment type and the context condition of at least one piece of equipment belonging to the equipment type.

The above description describes an apparatus automation method (standing at a server side) provided in the embodiment of the present application. Based on the same idea, the embodiment of the application also provides another device automation method (standing at the proxy side).

Fig. 2 is a schematic flowchart of another device automation method according to an embodiment of the present application, where an execution subject of the flowchart is a proxy side.

The flow in fig. 2 may include the following steps:

s201: and the agent end establishes connection with at least one device, and the device belongs to the device type corresponding to the automation instruction received by the server end.

In the embodiment of the present application, a form of establishing a connection between the proxy and the device is not limited, and the connection may be a general communication connection (such as a TCP connection), a connection with a mapping binding function, or the like.

S202: the agent receives the automation instruction.

In the embodiment of the present application, the automation instruction may be sent by the client to the agent (where the automation instruction may also be transmitted through the server), or may be sent by the server to the agent.

S203: and the agent end drives the equipment to execute the automation instruction by adopting a corresponding driving program based on the connection established with the equipment and according to the equipment type and the context condition of the equipment.

In the embodiment of the present application, the obtaining path of the driver used by the agent is not limited. The agent itself may be a device driver framework (which then establishes a connection with the device), have drivers, may also obtain drivers from other driver providers, and so on. For the convenience of understanding, the embodiments of the present application also provide several common device driver frameworks and schematic diagrams of connection protocols between the device driver frameworks and the devices, as shown in fig. 3.

The device driving frameworks shown in fig. 3 are UIAutomator, XCTest, chromeriver, webkitemotedebugger, and Other device driving frameworks are also denoted by Other Driver proxy.

It should be noted that the device driver framework in fig. 3 is only an example and is not a limitation of the present application, a connection protocol between the device driver framework and the device may be a protocol such as a socket or a web socket, and the socket and the web socket are also examples of the connection protocol and are not a limitation of the present application, and besides the example connection protocol, any link-based protocol is also applicable to the scheme of the present application.

The main effects of the method in fig. 2 are the same as those of the method in fig. 1, and are not described herein again.

Based on the method in fig. 2, the present application also provides some specific embodiments of the method in fig. 2, and further embodiments, which are described below.

In this embodiment of the present application, for step S203, before the agent drives the device to execute the automation instruction by using a corresponding driver according to the device type and the context of the device, the agent may further perform: and the agent side obtains the device type and the context condition of the device from the device and/or the server side.

In this embodiment of the application, for step S201, establishing a connection between the agent and at least one device may specifically include: the method comprises the steps that an agent side obtains relevant information of at least one device from a server side, the device belongs to a device type corresponding to an automation instruction received by the server side, and the relevant information comprises an address of the device; and the agent end establishes connection with the equipment according to the related information. The connection establishment mode is beneficial for the server side to master the connection establishment condition between the agent side and the equipment.

In practical applications, the related information of the device may include other information such as device type, device identification, device port, etc. in addition to the address of the device.

In this embodiment of the application, for step S202, the receiving, by the agent, the automation instruction may specifically include: the agent end receives the automation instruction sent by a client end and/or the server end, wherein the automation instruction sent by the client end is obtained by the client end from a user process, and the automation instruction sent by the server end is obtained by the server end from the client end.

Another method for automating the device (standing at the proxy side) provided by the embodiment of the present application is also described above. Based on the same idea, the embodiment of the application also provides another device automation method (standing at the client side).

Fig. 4 is a schematic flowchart of another apparatus automation method provided in an embodiment of the present application, where an execution subject of the flowchart is a client.

The flow in fig. 4 may include the following steps:

s401: the client sends an automation instruction to the server, so that the server determines the equipment type corresponding to the automation instruction according to the automation instruction.

S402: and the client sends the automation instruction to an agent end, so that the agent end drives the equipment to execute the automation instruction by adopting a corresponding driver according to the equipment type and the context of at least one piece of equipment belonging to the equipment type.

The main effect of the method in fig. 4 is the same as that of the method in fig. 1, and is not described herein again.

Based on the method in fig. 4, the present application also provides some specific embodiments of the method in fig. 4, and further embodiments, which are described below.

In the embodiment of the present application, as can be seen from the foregoing description, for step S401, before the client sends the automation instruction to the server, the following steps may be further performed: and the client receives the automation instruction sent by the user process.

In this embodiment of the application, as can be seen from the foregoing description, for step S401, the sending, by the client, the automation instruction to the server specifically includes: the client packages the automation instructions, wherein the packaging comprises protocol conversion aiming at the automation instructions; and the client sends the packaged automation instruction to the server. For ease of understanding, the description is made by way of example.

For example, for an automation instruction corresponding to an operation of clicking one button, the following protocol exchange may be performed:

1. sending { command: "find _ element", args: { id: "buy" }

2. Accept { success: true, data [ "element _ 1" ] }

3. Sending { command: "click", args: { element Id: "element _ 1" }

4. Receive { success: false, errMsg: [ "unknown _ error" ]

According to the scheme, the automation work of the equipment is completed through the cooperation of the client, the server, the agent and the like, the structure is clear, the structure is simple, the integration is easy, and the large-scale concurrency and integrated automation scheme can be supported.

The scheme of the present application is explained above from three terminals, respectively. In order to help understand the scheme of the present application more intuitively, the embodiment of the present application further provides a multi-end interaction flowchart in the practical application scenario when the scheme of the present application is implemented, as shown in fig. 5. A common user process, client, server, agent and device in FIG. 5.

The interaction flow in fig. 5 may include the following steps:

1: the user process uses the unoccupied port to start the server, and the server can start the Http service.

2: the server side replies the started message and the port to the user process.

3: and the user process starts the client by using the port responded by the server.

4: and the client establishes connection with the server.

5: the server side responds to the message to the client side to determine connection.

6: the client replies (possibly in a transparent manner) with a success message to the user process.

7: and the user process sends an automation instruction to the client.

8: the client packages the automation instruction and then sends the automation instruction to the client, and the automation instruction can be packaged into an end-to-end exchange protocol.

9: and the server determines the corresponding equipment type (such as iOS or Android) according to the packaged automation instruction so as to know which platform (such as iOS platform, Android platform and the like) corresponds to, and find and connect the available equipment.

10: the device replies the connected state to the server.

11: the server side initializes the agent side.

12: and the proxy end establishes mapping binding with the equipment.

13: the device responds that the binding is in effect and is ready to run the driver instructions (i.e., is ready to execute the automation instructions under the driver of the agent).

14: and sending a successful response (which can adopt a transparent transmission mode) to the server.

15: and sending a successful response (which can adopt a transparent transmission mode) to the client.

16: and the client sends the automation instruction to the agent.

17: the agent end initializes corresponding drive according to the device type (required platform) and the context condition corresponding to the device, and drives the device to execute the automation instruction.

18: the device returns a success message to the proxy.

19: the agent end sends the success message (can adopt a transparent transmission mode) to the client end, and the client end can carry out analysis processing.

20: the client returns the results to the user process.

Based on the same idea, the above apparatus automation method provided in the embodiment of the present application further provides a schematic structural diagram of a corresponding apparatus automation apparatus, as shown in fig. 6, 7, and 8.

Fig. 6 is a schematic structural diagram of an apparatus automation device corresponding to fig. 1 according to an embodiment of the present application, where the device is located at a server and includes:

a first receiving module 601, which receives an automation instruction;

a determining module 602, configured to determine, according to the automation instruction, a device type corresponding to the automation instruction;

the starting module 603 starts the agent end, so that the agent end drives the device to execute the automation instruction by using a corresponding driver according to the context of the device type and at least one device belonging to the device type.

Optionally, the first receiving module 601 receives an automation instruction sent by a client, where the automation instruction is obtained by the client from a user process.

Optionally, the apparatus further comprises:

a first obtaining module 604, configured to, after the determining module 602 determines the device type corresponding to the automation instruction according to the automation instruction, determine, according to the device type, the at least one device belonging to the device type, establish a connection with the device, and obtain a context of the device based on the connection established with the device.

Optionally, the apparatus further comprises:

a providing module 605, configured to provide the device type and the context of the device to the agent after the agent is started by the starting module, so that the agent drives the device to execute the automation instruction by using a corresponding driver according to the device type and the context of at least one device belonging to the device type.

Fig. 7 is a device automation apparatus corresponding to fig. 2 provided in an embodiment of the present application, where the apparatus is located at an agent end, and includes:

a connection module 701, configured to establish a connection with at least one device, where the device belongs to a device type corresponding to an automation instruction received by a server;

a second receiving module 702, which receives the automation instruction;

and a driver module 703, configured to drive the device to execute the automation instruction by using a corresponding driver according to the device type and the context of the device based on the connection established with the device.

Optionally, the apparatus further comprises:

a second obtaining module 704, configured to obtain the device type and the context of the device from the device and/or the server before the driving module 703 drives the device to execute the automation instruction by using a corresponding driver according to the device type and the context of the device.

Optionally, the connection module 701 obtains relevant information of at least one device from the server, where the device belongs to a device type corresponding to the automation instruction received by the server, and establishes a connection with the device according to the relevant information, where the relevant information includes an address of the device.

Optionally, the second receiving module 702 receives the automation instruction sent by a client and/or the server, where the automation instruction sent by the client is obtained by the client from a user process, and the automation instruction sent by the server is obtained by the server from the client.

Fig. 8 is a device automation apparatus corresponding to fig. 4 provided in an embodiment of the present application, where the apparatus is located at a client, and includes:

a first sending module 801, configured to send an automation instruction to a server, so that the server determines, according to the automation instruction, a device type corresponding to the automation instruction;

a second sending module 802, configured to send the automation instruction to an agent, so that the agent drives, according to the context of the device type and the context of at least one device belonging to the device type, the device to execute the automation instruction by using a corresponding driver.

Optionally, the apparatus further comprises:

the third receiving module 803 receives the automation instruction sent by the user process before the first sending module 801 sends the automation instruction to the server.

Optionally, the first sending module 801 is configured to package the automation instruction by the client, and send the packaged automation instruction to the server, where the package includes a protocol conversion for the automation instruction.

The device provided by the application is in one-to-one correspondence with the method provided by the application, and therefore, the device also has beneficial technical effects similar to the method, and since the beneficial technical effects of the method have been described in detail above, the beneficial technical effects of the device are not described in detail herein.

As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.

The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.

These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.

These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.

In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.

The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.

Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.

It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.

The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (22)

1. An apparatus automation method, comprising:
the method comprises the steps that a server receives an automation instruction, wherein the automation instruction is a test instruction for multi-scenario and multi-context automation test, and the multi-scenario comprises a mixed service scenario of Nation and Web;
the server side determines the equipment type corresponding to the automation instruction according to the automation instruction;
and the server side starts an agent side so that the agent side drives the equipment to execute the automation instruction by adopting a corresponding driving program according to the equipment type and the context condition of at least one piece of equipment belonging to the equipment type.
2. The method of claim 1, wherein the server receives the automation instruction, and specifically comprises:
the server receives an automation instruction sent by a client, wherein the automation instruction is obtained by the client from a user process.
3. The method of claim 1, wherein after the server determines the device type corresponding to the automation instruction according to the automation instruction, the method further comprises:
the server determines the at least one device belonging to the device type according to the device type;
the server side establishes connection with the equipment;
the server obtains the context of the device based on the connection established with the device.
4. The method of claim 3, wherein after the server initiates the agent according to the device type, the method further comprises:
and the server provides the equipment type and the context condition of the equipment to the agent so that the agent drives the equipment to execute the automation instruction by adopting a corresponding driver according to the equipment type and the context condition of at least one piece of equipment belonging to the equipment type.
5. An apparatus automation method, comprising:
the agent end establishes connection with at least one device, and the device belongs to the device type corresponding to the automation instruction received by the server end;
the agent end receives the automation instruction, wherein the automation instruction is a test instruction for multi-scene multi-context automation test, and the multi-scene comprises a mixed service scene of Nation and Web;
and the agent end drives the equipment to execute the automation instruction by adopting a corresponding driving program based on the connection established with the equipment and according to the equipment type and the context condition of the equipment.
6. The method of claim 5, wherein before the agent uses a corresponding driver to drive the device to execute the automation instruction according to the device type and the context of the device, the method further comprises:
and the agent side obtains the device type and the context condition of the device from the device and/or the server side.
7. The method of claim 5, wherein the establishing of the connection between the agent and the at least one device specifically comprises:
the method comprises the steps that an agent side obtains relevant information of at least one device from a server side, the device belongs to a device type corresponding to an automation instruction received by the server side, and the relevant information comprises an address of the device;
and the agent end establishes connection with the equipment according to the related information.
8. The method of claim 5, wherein the receiving, by the agent, the automation instruction comprises:
the agent end receives the automation instruction sent by a client end and/or the server end, wherein the automation instruction sent by the client end is obtained by the client end from a user process, and the automation instruction sent by the server end is obtained by the server end from the client end.
9. An apparatus automation method, comprising:
the method comprises the steps that a client sends an automation instruction to a server, so that the server determines the equipment type corresponding to the automation instruction according to the automation instruction; the automatic instruction is a test instruction for multi-scenario and multi-context automatic test, wherein the multi-scenario comprises a mixed service scenario of Nation and Web;
and the client sends the automation instruction to an agent end, so that the agent end drives the equipment to execute the automation instruction by adopting a corresponding driver according to the equipment type and the context of at least one piece of equipment belonging to the equipment type.
10. The method of claim 9, wherein before the client sends the automation instructions to the server, the method further comprises:
and the client receives the automation instruction sent by the user process.
11. The method of claim 9, wherein the client sends the automation instruction to the server, and specifically comprises:
the client packages the automation instructions, wherein the packaging comprises protocol conversion aiming at the automation instructions;
and the client sends the packaged automation instruction to the server.
12. An equipment automation device, the device located at a server side, comprising:
the system comprises a first receiving module, a second receiving module and a third receiving module, wherein the first receiving module receives an automation instruction, and the automation instruction is a test instruction for multi-scene multi-context automation test, wherein the multi-scene comprises a mixed service scene of Nation and Web;
the determining module is used for determining the equipment type corresponding to the automation instruction according to the automation instruction;
and the starting module is used for starting the agent end so that the agent end can drive the equipment to execute the automation instruction by adopting a corresponding driving program according to the equipment type and the context condition of at least one piece of equipment belonging to the equipment type.
13. The apparatus of claim 12, wherein the first receiving module receives an automation instruction sent by a client, and the automation instruction is obtained by the client from a user process.
14. The apparatus of claim 12, wherein the apparatus further comprises:
the first obtaining module is used for determining the at least one device belonging to the device type according to the device type after the determining module determines the device type corresponding to the automation instruction according to the automation instruction, establishing connection with the device, and obtaining the context condition of the device based on the connection established with the device.
15. The apparatus of claim 14, wherein the apparatus further comprises:
and the providing module is used for providing the device type and the context condition of the device to the agent terminal after the agent terminal is started by the starting module, so that the agent terminal drives the device to execute the automation instruction by adopting a corresponding driving program according to the device type and the context condition of at least one device belonging to the device type.
16. An equipment automation device, the device located at a proxy side, comprising:
the connection module is connected with at least one device, and the device belongs to the device type corresponding to the automation instruction received by the server;
the second receiving module is used for receiving the automation instruction, wherein the automation instruction is a test instruction for multi-scene multi-context automation test, and the multi-scene comprises a mixed service scene of a nature and a Web;
and the driving module is used for driving the equipment to execute the automation instruction by adopting a corresponding driving program according to the equipment type and the context condition of the equipment based on the connection established with the equipment.
17. The apparatus of claim 16, wherein the apparatus further comprises:
and the second obtaining module is used for obtaining the equipment type and the context condition of the equipment from the equipment and/or the server before the driving module drives the equipment to execute the automation instruction by adopting a corresponding driving program according to the equipment type and the context condition of the equipment.
18. The apparatus according to claim 16, wherein the connection module obtains, from the server, information related to at least one device belonging to a device type corresponding to the automation instruction received by the server, and establishes a connection with the device according to the information related to the device, where the information related to the device includes an address of the device.
19. The apparatus of claim 16, wherein the second receiving module receives the automation instruction sent by a client and/or the server, wherein the automation instruction sent by the client is obtained by the client from a user process, and the automation instruction sent by the server is obtained by the server from the client.
20. An equipment automation device, the device located at a client, comprising:
the first sending module is used for sending an automation instruction to a server so that the server can determine the equipment type corresponding to the automation instruction according to the automation instruction; the automatic instruction is a test instruction for multi-scenario and multi-context automatic test, wherein the multi-scenario comprises a mixed service scenario of Nation and Web;
and the second sending module is used for sending the automation instruction to the agent terminal so that the agent terminal can drive the equipment to execute the automation instruction by adopting a corresponding driving program according to the equipment type and the context condition of at least one piece of equipment belonging to the equipment type.
21. The apparatus of claim 20, wherein the apparatus further comprises:
and the third receiving module is used for receiving the automation instruction sent by the user process before the first sending module sends the automation instruction to the server.
22. The apparatus of claim 20, wherein the first sending module packages the automation instructions and sends the packaged automation instructions to the server, and wherein the package comprises a protocol conversion for the automation instructions.
CN201610375229.2A 2016-05-31 2016-05-31 Equipment automation method and device CN107454124B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610375229.2A CN107454124B (en) 2016-05-31 2016-05-31 Equipment automation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610375229.2A CN107454124B (en) 2016-05-31 2016-05-31 Equipment automation method and device

Publications (2)

Publication Number Publication Date
CN107454124A CN107454124A (en) 2017-12-08
CN107454124B true CN107454124B (en) 2020-11-03

Family

ID=60485042

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610375229.2A CN107454124B (en) 2016-05-31 2016-05-31 Equipment automation method and device

Country Status (1)

Country Link
CN (1) CN107454124B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1997909A (en) * 2004-05-22 2007-07-11 株式会社爱德万测试 Method and system for controlling interchangeable components in a modular test system
CN102141962A (en) * 2011-04-07 2011-08-03 北京航空航天大学 Safety distributed test framework system and test method thereof
CN102185738A (en) * 2011-05-13 2011-09-14 迈普通信技术股份有限公司 Communication equipment hardware host testing system and testing method
CN102377733A (en) * 2010-08-12 2012-03-14 盛科网络(苏州)有限公司 Automatic testing system of application layer protocol and automatic testing method thereof
CN103312850A (en) * 2013-05-10 2013-09-18 江苏科技大学 Mobile phone automation testing system and work method
CN103678100A (en) * 2012-09-10 2014-03-26 联芯科技有限公司 Application automatic testing method and system of terminal
CN104834586A (en) * 2014-02-10 2015-08-12 腾讯科技(深圳)有限公司 Automatic test method, device and system of Android interface
CN104834594A (en) * 2014-12-29 2015-08-12 平安科技(深圳)有限公司 Method and apparatus for testing web system
CN104978259A (en) * 2014-04-01 2015-10-14 中国银联股份有限公司 Mobile equipment software automation test cluster system and test method thereof
CN105405221A (en) * 2015-10-28 2016-03-16 深圳怡化电脑股份有限公司 Method and device for automated test

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
RU2012110523A (en) * 2012-03-20 2013-10-27 Оракл Интернешенел Корпорейшн Domain-based test system for security

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1997909A (en) * 2004-05-22 2007-07-11 株式会社爱德万测试 Method and system for controlling interchangeable components in a modular test system
CN102377733A (en) * 2010-08-12 2012-03-14 盛科网络(苏州)有限公司 Automatic testing system of application layer protocol and automatic testing method thereof
CN102141962A (en) * 2011-04-07 2011-08-03 北京航空航天大学 Safety distributed test framework system and test method thereof
CN102185738A (en) * 2011-05-13 2011-09-14 迈普通信技术股份有限公司 Communication equipment hardware host testing system and testing method
CN103678100A (en) * 2012-09-10 2014-03-26 联芯科技有限公司 Application automatic testing method and system of terminal
CN103312850A (en) * 2013-05-10 2013-09-18 江苏科技大学 Mobile phone automation testing system and work method
CN104834586A (en) * 2014-02-10 2015-08-12 腾讯科技(深圳)有限公司 Automatic test method, device and system of Android interface
CN104978259A (en) * 2014-04-01 2015-10-14 中国银联股份有限公司 Mobile equipment software automation test cluster system and test method thereof
CN104834594A (en) * 2014-12-29 2015-08-12 平安科技(深圳)有限公司 Method and apparatus for testing web system
CN105405221A (en) * 2015-10-28 2016-03-16 深圳怡化电脑股份有限公司 Method and device for automated test

Also Published As

Publication number Publication date
CN107454124A (en) 2017-12-08

Similar Documents

Publication Publication Date Title
US20170041259A1 (en) Instant message processing method, apparatus, and system
TWI629639B (en) Method and device for realizing screen capture
JP6664551B1 (en) Multi-block chain network data processing method, apparatus, and server
US9614931B2 (en) Identifying a resource set require for a requested application and launching the resource set in a container for execution in a host operating system
US20150304440A1 (en) Systems and Methods for Pushing Applications
JP6770063B2 (en) Methods and devices for implementing service functions
EP2902901A1 (en) Development, compiling and debugging method and device for application
CN104158836A (en) Method for rendering mobile application interface through data
AU2014375830B2 (en) Data processing method for realizing multiple operating systems and terminal device
JP2019520624A (en) Page component dynamic layout
CN102685210B (en) Wireless routing equipment, mobile terminal, management system and method
US9584372B2 (en) Discovering resources of a distributed computing environment
TWI453603B (en) Platform independent information handling system, communication method, and computer program product thereof
US20180295026A1 (en) Standby instances for auto-scaling groups
CN103942225A (en) Method and system for invoking resources of Hybrid App client and client
US9386264B2 (en) Augmenting capabilities of a host device
KR101720071B1 (en) Webpages with onboard hardware functions
US20150195346A1 (en) Open platform, open platform access system, storage medium, and method for allowing third party application to access open platform
CN101506789A (en) Techniques for providing accessibility options in remote terminal sessions
US8966508B2 (en) Method for executing hybrid web application and apparatus therefor
CN106354481B (en) Method and equipment for uniformly mapping HTTP (hyper text transport protocol) request
US9645910B1 (en) Cross platform mobile HTML debugging
US20180285053A1 (en) Screenshot method and apparatus
US10540174B2 (en) Managed multi-container builds
US20150161023A1 (en) Distributed debugging of an application in a distributed computing environment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20201014

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant after: Innovative advanced technology Co.,Ltd.

Address before: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant before: Advanced innovation technology Co., Ltd

Effective date of registration: 20201014

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant after: Advanced innovation technology Co., Ltd

Address before: A four-storey 847 mailbox in Grand Cayman Capital Building, British Cayman Islands

Applicant before: Alibaba Group Holding Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant