CN109828893A - Multitask android performance test methods based on docker engine and the system for executing this method - Google Patents

Multitask android performance test methods based on docker engine and the system for executing this method Download PDF

Info

Publication number
CN109828893A
CN109828893A CN201811586782.6A CN201811586782A CN109828893A CN 109828893 A CN109828893 A CN 109828893A CN 201811586782 A CN201811586782 A CN 201811586782A CN 109828893 A CN109828893 A CN 109828893A
Authority
CN
China
Prior art keywords
equipment
task
container
android
docker
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN201811586782.6A
Other languages
Chinese (zh)
Inventor
廖述峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Maocai Network Technology Co Ltd
Original Assignee
Hangzhou Maocai Network Technology Co Ltd
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 Hangzhou Maocai Network Technology Co Ltd filed Critical Hangzhou Maocai Network Technology Co Ltd
Priority to CN201811586782.6A priority Critical patent/CN109828893A/en
Publication of CN109828893A publication Critical patent/CN109828893A/en
Pending legal-status Critical Current

Links

Abstract

The present invention relates to the android performance test methods based on docker engine and the systems for executing this method.The described method includes: the timed task that equipment is monitored;When detecting new android equipment access, from mono- container of mirror image fork, and will be inside corresponding usb device map to container;Wherein, mirror image has pre-installed sdk environment;Start container, after container starting, opens a deamon process, the continuous poll of deamon process actively obtains execution task, when the task of acquisition, executes the task at once, and restarting equipment actively destroys task after execution.The system comprises the host equipped with dockermanager and docker, usb interface and the external interface for receiving task list;Mission dispatching device, for sending task list to the host equipped with dockermanager and docker.The present invention is by the reconstruct to system entirety, the problem of environment can be made to realize one-touch deployment, and be avoided that adb multithreading defect.

Description

Multitask android performance test methods based on docker engine and for executing The system of this method
Technical field
The present invention relates to android performance test field more particularly to a kind of android performances based on docker engine Test method and system for executing this method.
Background technique
During the android performance test of enterprise level, if using CS design architecture, due to type, industry Scene of being engaged in is more and complicated, will certainly use distributed mode and shunt to test assignment, therefore the same slave node accesses More android equipment are normalities.When traditional server docking multiple devices execute task, typically controlled by adb System connects equipment to realize different tasks, and the multithreading of adb framework itself limits, and easilys lead to adb under parallel state Task execution is unstable.
It is as shown in Figure 1 existing distributed task dispatching framework, using CS design architecture, user is flat by task management Platform dispatches task by master, finally dispatches android terminal on slave and executes task.In task execution mistake When more, every slave is communicated by adb with mobile, and adb multithreading itself limits, when a server connects more mobile phones When, it will lead to the more socket client of more mobile phones and share an end socket server and communicated, when a wherein mobile phone Socket task when blocking, will lead to task collective obstruction all on the server, eventually lead to all slave's Mission failure.It, can only be by restarting adb come Reset Status when there is task blocking generally for multiple devices execution adb order. But it resets adb and equally also results in adb task execution failure all on current server.Wherein:
Master: master controller is responsible for task and is assigned;
Slave: node is responsible for execution task.
Therefore, the defect for how solving adb ensures that normal performance test development is exactly a very big problem.
Summary of the invention
To solve the above-mentioned problems, the purpose of the present invention is to provide the android performance tests based on docker engine Method, using distributed docker framework is removed, by the isolation mech isolation test of docker itself, Lai Shixian equipment and adb every From the problem of avoiding multithreading defect in adb use.
In order to achieve the above purpose, the multitask android performance based on docker engine that the present invention provides a kind of Test method, comprising:
The timed task that equipment is monitored, for detecting whether there is new android equipment access;
When detecting new android equipment access, reflected from mono- container of mirror image fork, and by corresponding usb equipment It is mapped to inside container;Wherein, mirror image has pre-installed sdk environment, and the sdk environment includes adb tool, and adb is run in container;
Start container, after container starting, opens a deamon process, the continuous poll of deamon process, which actively obtains, to be held Row task executes the task, and restarting equipment actively destroys task after execution when the task of acquisition at once.
Preferably, the timed task that the equipment is monitored, comprising:
Android equipment accesses host host, the information of the usb equipment of timing inquiry access, analytical equipment letter by usb Breath judges whether it is android equipment;
The usb facility information in this query result and last query result is compared, whether judge access is newly to set It is standby.
Preferably, wherein, checking facility information by lsusb order, several identification field calculating currently connect in extraction The unique value of each usb equipment entered.
Preferably, wherein, obtaining task by external interface, the deamon process poll external interface obtains task.
The present invention also provides a kind of systems for executing above-mentioned test method, comprising:
Host equipped with dockermanager and docker, for provide connection android equipment usb interface with And the external interface for receiving task list;
Mission dispatching device, for sending task list to the host equipped with dockermanager and docker.
Preferably, the dockermanager includes:
Equipment monitors module, for executing the timed task of equipment monitoring, detects whether that new android equipment connects Enter;
Mirror image management module is managed for configuring the mirror image including equipment operating environment, and to it;
Container Management module for from mirror image fork container, and is managed it, including to container operation and container Between communication management.
Data processing module, for carrying out data processing.
The above-mentioned multitask android performance test methods based on docker engine, compared with prior art, by being The reconstruct for entirety of uniting, the problem of environment can be made to realize one-touch deployment, and be avoided that adb multithreading defect.
The above-mentioned system for executing test method, its advantages be referred in above-mentioned each achievable mode based on Beneficial effect brought by the multitask android performance test methods of docker engine, details are not described herein.
Detailed description of the invention
Fig. 1 is distributed execution android performance test designed holder composition in the prior art.
Fig. 2 is the flow chart of method in the present invention.
Fig. 3 is the system architecture diagram in the present invention.
Specific embodiment
For the sake of clarity, illustrate the definition for the specific word or phrase that the present invention uses first.
Adb:Android Debug Bridge, commonly abbreviated as adb are mainly stored under sdk installation directory In platform-tools file, it is a very powerful command-line tool, and by this tool, you can be with yours Android equipment interacts.Adb includes three parts: operating in adb server, the adb client at the end PC and operates in The operation logic of the adbd of android equipment end, adb are that the adb server at the end PC and the finger daemon adbd of mobile phone terminal are built Vertical connection, then for the adb client at the end PC by adb server forward command, adbd parses operation after receiving order.adb It is communicated between client and adb server by socket.Pass through specified adb server between adb server and adbd The network port establish connection, the default network port of adb server is [5037].
Docker: the engine of open source can be created easily for any application a lightweight, transplantable, self-supporting Self-sustaining container.Docker includes mirror image (image), container (container) and warehouse (repository), docker mirror image It is a special file system, provides outside the files such as program, library, resource, configuration required when container operation, further comprise one A little some configuration parameters (such as anonymous volume, environmental variance, user) to prepare when operation, mirror image is static definition, container Entity when being mirror image operation, the essence of container is process, warehouse memory image.
Dockermanager:docker basic management tool, realizes the basic management of mirror image, container.
Deamon process: finger daemon, finger daemon are to be detached from controlling terminal and periodically carrying out certain from the background Kind task or the process for waiting certain events to be processed.
The preferred embodiment of this patent is described in further detail with reference to the accompanying drawing.
As shown in Fig. 2, a kind of multitask android performance test methods based on docker engine, comprising:
The timed task that equipment is monitored, for detecting whether there is new android equipment access;
When detecting new android equipment access, from mono- container of mirror image fork, and corresponding device map is arrived Inside container;Wherein, mirror image includes SDK environment, and the SDK environment includes adb tool, and adb is run in container;
Start container, after container starting, opens a deamon process, the continuous poll of deamon process, which actively obtains, to be held Row task executes the task, and restarting equipment actively destroys task after execution when the task of acquisition at once.
Wherein, the timed task that the equipment is monitored, comprising:
Android equipment accesses host host, the information of the usb equipment of timing inquiry access, analytical equipment letter by usb Breath judges whether it is android equipment;
The usb facility information in this query result and last query result is compared, whether judge access is newly to set It is standby.
Wherein, facility information is checked by lsusb order, several identification fields calculate each be currently accessed in extraction The unique value of usb equipment.Lsusb be in display system and be connected to system usb bus message tool, lsusb can show The equipment shown driving and be connected internally to your system, and export in the specific format, the content of lsusb output includes that multiple expressions are set The field of standby details, by all information for the usb equipment that the content of format parsing lsusb output can be accessed.Pass through Whether the equipment that the unique value of identification usb equipment can more easily identify access is new access device, and is operated on it.
Wherein, task is obtained by external interface, the deamon process poll external interface obtains task.Once inquiring There is mission dispatching to the external interface, obtains task execution.In embodiment, task object storage is deposited by task list Storage, each task object are equipped with corresponding task ID and it are numbered, and being issued to external interface is task ID, once it looks into Task ID is ask, corresponding task is obtained according to task ID and is executed in a reservoir.If not getting task, this is right for poll always External tapping.
Above-mentioned multitask android performance test methods, by the isolation mech isolation test of docker itself, Lai Shixian equipment and The isolation of adb specifically executes the test assignment of an android equipment to be tested in a vessel, avoids out Existing adb Multi-thread Communication can be released by operations such as deletions to container moreover, after the completion of to primary test The connection of android equipment and system.Docker framework is used simultaneously, and the rapid deployment to test environment may be implemented.
The invention relates to the multitask android performance test methods based on docker engine, can be applicable in The system shown in Fig. 3, comprising:
Host equipped with dockermanager and docker, for provide connection android equipment usb interface with And the external interface for receiving task list;
Mission dispatching device, for sending task list to the host equipped with dockermanager and docker.
Wherein, the dockermanager includes:
Equipment monitors module, for executing the timed task of equipment monitoring, detects whether that new android equipment connects Enter;
Mirror image management module is managed for configuring the mirror image including equipment operating environment, and to it;
Container Management module for from mirror image fork container, and is managed it, including to container operation and container Between communication management;
Data processing module, for carrying out data processing.It is new including being not limited to detect whether in the above method Android equipment and, the content of data processing involved in the task of required execution.
The embodiment of the present invention also provides a kind of terminal, including one or more processors, and logical with the processor Believe the storage device of connection, wherein the storage device is stored with the program instruction that can be executed by the processor, the processing Device calls described program instruction to be able to carry out multitask android performance test methods provided by the above embodiment.
Those of ordinary skill in the art will appreciate that: realize that the embodiment all or part of the steps of the above method can pass through The relevant hardware of program instruction is completed, and program above-mentioned can store in computer readable storage medium, which holds When row, step including the steps of the foregoing method embodiments is executed;And storage medium above-mentioned includes: that ROM, RAM, magnetic disk or CD etc. are each Kind can store the medium of program code.

Claims (7)

1. a kind of multitask android performance test methods based on docker engine characterized by comprising
The timed task that equipment is monitored, for detecting whether there is new android equipment access;
When detecting new android equipment access, from mono- container of mirror image fork, and by corresponding device map to container It is internal;Wherein, mirror image includes sdk environment, and the sdk environment includes adb tool, and adb is run in container;
Start container, after container starting, opens a deamon process, the continuous poll of deamon process, which actively obtains to execute, appoints Business, when the task of acquisition, executes the task, and restarting equipment actively destroys task after execution at once.
2. a kind of multitask android performance test methods based on docker engine according to claim 1, feature It is, the timed task that the equipment is monitored, comprising:
Android equipment accesses host host, the information of the usb equipment of timing inquiry access by usb, and analytical equipment information is sentenced Whether disconnected is android equipment;
The usb facility information in this query result and last query result is compared, whether judge access is new equipment.
3. a kind of multitask android performance test methods based on docker engine according to claim 2, feature It is, wherein facility information is checked by lsusb order, several identification fields calculate each usb being currently accessed in extraction The unique value of equipment.
4. a kind of multitask android performance test methods based on docker engine according to claim 1, feature It is, wherein task is obtained by external interface, the deamon process poll external interface obtains task.
5. a kind of system for executing such as method of any of claims 1-4, which is characterized in that including
Host equipped with dockermanager and docker, for providing the usb interface and use of connection android equipment In the external interface for receiving task list;
Mission dispatching device, for sending task list to the host equipped with dockermanager and docker.
6. according to claim 5 for executing the multitask android performance test methods based on docker engine System, which is characterized in that the dockermanager includes:
Equipment monitors module, for executing the timed task of equipment monitoring, detects whether new android equipment access;
Mirror image management module is managed for configuring the mirror image including equipment operating environment, and to it;
Container Management module for from mirror image fork container, and is managed it, including to container operation and container between Communication management;
Data processing module, for carrying out data processing.
7. a kind of terminal, which is characterized in that including one or more processors, and the storage being connect with the processor communication Device, wherein the storage device is stored with the program instruction that can be executed by the processor, and the processor calls the journey Sequence instruction is able to carry out such as method of any of claims 1-4.
CN201811586782.6A 2018-12-25 2018-12-25 Multitask android performance test methods based on docker engine and the system for executing this method Pending CN109828893A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811586782.6A CN109828893A (en) 2018-12-25 2018-12-25 Multitask android performance test methods based on docker engine and the system for executing this method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811586782.6A CN109828893A (en) 2018-12-25 2018-12-25 Multitask android performance test methods based on docker engine and the system for executing this method

Publications (1)

Publication Number Publication Date
CN109828893A true CN109828893A (en) 2019-05-31

Family

ID=66861028

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811586782.6A Pending CN109828893A (en) 2018-12-25 2018-12-25 Multitask android performance test methods based on docker engine and the system for executing this method

Country Status (1)

Country Link
CN (1) CN109828893A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111209076A (en) * 2019-12-20 2020-05-29 珠海金山网络游戏科技有限公司 Method and device for monitoring processes in docker container and readable medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107172651A (en) * 2017-05-23 2017-09-15 北京邮电大学 A kind of test platform and method of testing for Mobile Internet Protocol
CN108733553A (en) * 2017-04-18 2018-11-02 北京嘀嘀无限科技发展有限公司 Configuration method, the device and system of test device based on docker

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108733553A (en) * 2017-04-18 2018-11-02 北京嘀嘀无限科技发展有限公司 Configuration method, the device and system of test device based on docker
CN107172651A (en) * 2017-05-23 2017-09-15 北京邮电大学 A kind of test platform and method of testing for Mobile Internet Protocol

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
杨霞等: "采用容器技术的多Android系统的研究与实现", 《小型微型计算机系统》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111209076A (en) * 2019-12-20 2020-05-29 珠海金山网络游戏科技有限公司 Method and device for monitoring processes in docker container and readable medium

Similar Documents

Publication Publication Date Title
CN112463144B (en) Distributed storage command line service method, system, terminal and storage medium
US20140033177A1 (en) Multi-platform test automation enhancement
EP2746936A1 (en) Method and system for starting application in linux container
JPH07146844A (en) Integrated automation development system and method for controlling and adjusting manufacturing device
US10949218B2 (en) Generating an execution script for configuration of a system
CN112738060A (en) Method and device for processing micro-service data, micro-service processing platform and medium
CN109507991B (en) Double-shaft servo control platform debugging system and method
CN108023905B (en) Internet of things application system and method
CN114356521A (en) Task scheduling method and device, electronic equipment and storage medium
CN109828893A (en) Multitask android performance test methods based on docker engine and the system for executing this method
CN117076096A (en) Task flow execution method and device, computer readable medium and electronic equipment
CN112181619A (en) Scheduling method, device, equipment and medium for batch service
CN109190969B (en) Weighing equipment management and control method and system, weighing equipment management middleware and medium
CN114490000A (en) Task processing method, device, equipment and storage medium
CN113419921A (en) Task monitoring method, device, equipment and storage medium
CN114547206A (en) Data synchronization method and data synchronization system
CN113034048A (en) Task processing method, device, server and storage medium
CN111258618A (en) File configuration method and device, computer equipment and storage medium
CN113126961B (en) Pipeline processing method, device and storage medium
CN109976765B (en) Application group deployment method, device, equipment and storage medium
KR102485154B1 (en) Power Communication Service
CN117806797A (en) Unified scheduling method and device for tasks, electronic equipment and storage medium
CN117950635A (en) Application development method and device of platform, electronic equipment and storage medium
CN115794615A (en) System and method for acquiring attribute information of GUI (graphical user interface) elements
CN113849170A (en) Code sharing method and device, electronic equipment and storage medium

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190531