CN111488268A - Dispatching method and dispatching device for automatic test - Google Patents

Dispatching method and dispatching device for automatic test Download PDF

Info

Publication number
CN111488268A
CN111488268A CN201910073097.1A CN201910073097A CN111488268A CN 111488268 A CN111488268 A CN 111488268A CN 201910073097 A CN201910073097 A CN 201910073097A CN 111488268 A CN111488268 A CN 111488268A
Authority
CN
China
Prior art keywords
mobile device
tested
execution script
test
scheduling
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
CN201910073097.1A
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.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information 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 Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201910073097.1A priority Critical patent/CN111488268A/en
Publication of CN111488268A publication Critical patent/CN111488268A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention discloses a scheduling method and a scheduling device for automatic testing, and relates to the technical field of computers. One embodiment of the method comprises: receiving a scheduling task of an automatic test, and determining at least one mobile device to be tested from a pre-established device pool according to the scheduling task; acquiring an execution script and a product test packet corresponding to a scheduling task, and sending the product test packet to at least one mobile device to be tested; and utilizing the execution script to carry out concurrent testing on at least one mobile device to be tested for installing the product test package. According to the embodiment, the mobile equipment to be tested can be determined from the equipment pool according to the scheduling task, then the mobile equipment to be tested is tested by utilizing the execution script and the product test packet, the effect of testing multiple mobile equipment simultaneously is achieved, the method is suitable for testing the mobile equipment of various systems, the working efficiency of automatic testing is improved, and the automatic testing time is shortened.

Description

Dispatching method and dispatching device for automatic test
Technical Field
The invention relates to the technical field of computers, in particular to a scheduling method and a scheduling device for automatic testing.
Background
With the advent of the intelligent era, more and more people have one or more mobile devices, and with the increasing demand of people, the types and functions of application programs installed on the mobile devices are continuously updated. When a new application program is online or a new version of an original application program is online, product tests need to be performed on multiple versions of the application program to ensure that good user experience is brought to a user. Considering the wide variety of makes and models of mobile devices, a common solution today is to automate the testing of large brands of mobile devices with open source testing tools.
The existing open source test tools mainly comprise: appum (i.e., a mobile-side automation framework that can be used to test native applications, mobile web applications, and hybrid applications), SDK (i.e., Software Development Kit, which is a collection of Development tools used by Software engineers to build application Software for a particular Software package, Software framework, hardware platform, operating system, etc.), TestNG (i.e., a testing framework designed to simplify a wide range of testing requirements), and WebDriverAgent (i.e., a mobile testing framework for a mobile operating system iOS), among others.
In the process of implementing the invention, the inventor finds that at least the following problems exist in the prior art: in the prior art, the mobile equipment is tested by means of an open source testing tool, and the mobile equipment cannot be tested concurrently, so that the accuracy of a test result is reduced and more time is spent only selecting a large brand of mobile equipment for automatic testing; in addition, the open source test tool used in the prior art has the defects of complex environment installation, poor portability, poor system compatibility and the like.
Disclosure of Invention
In view of this, embodiments of the present invention provide a scheduling method and a scheduling apparatus for an automated test, which can achieve an effect of concurrently testing multiple mobile devices, and are suitable for testing mobile devices of various systems, so as to improve the working efficiency of the automated test and reduce the automated test time.
To achieve the above object, according to an aspect of an embodiment of the present invention, a scheduling method for an automated test is provided.
The scheduling method for the automatic test of the embodiment of the invention comprises the following steps: receiving a scheduling task of an automatic test, and determining at least one mobile device to be tested from a pre-established device pool according to the scheduling task; acquiring an execution script and a product test packet corresponding to the scheduling task, and sending the product test packet to the at least one mobile device to be tested; and utilizing the execution script to carry out concurrent testing on the at least one mobile device to be tested, which is provided with the product test package.
Optionally, before determining at least one mobile device to be tested from a pre-established pool of devices, the method further comprises: acquiring all mobile equipment groups to be tested; and aiming at one mobile device in the mobile device group, establishing connection with the mobile device, acquiring the device information of the connected mobile device, and uploading the device information to a database to complete the construction of the device pool.
Optionally, determining at least one mobile device to be tested from a pre-established device pool according to the scheduling task, including: acquiring a target mobile equipment group according to the scheduling task; and for each target mobile device in the target mobile device group, judging whether the target mobile device exists in the device pool or not, and determining that the target mobile device is a mobile device to be tested if the target mobile device is in a connection state.
Optionally, the obtaining of the execution script and the product test package corresponding to the scheduling task includes: determining an execution script address and a product test packet address corresponding to the scheduling task; pulling the execution script from an automated test execution script library by using the execution script address; and pulling the product test packet from a product test packet library by using the product test packet address.
Optionally, concurrently testing the at least one mobile device to be tested, on which the product test package is installed, by using the execution script, including: starting an automatic testing tool to compile the execution script; assigning a test port for each of the at least one mobile device to be tested that installs the product test package; and performing concurrent testing on each mobile device by using the compiled execution script based on the testing interface.
Optionally, after the at least one mobile device to be tested that installs the product test package is automatically tested by the execution script, the method further comprises: and acquiring an automatic test result, and uploading the automatic test result to a database.
To achieve the above object, according to another aspect of the embodiments of the present invention, there is provided a scheduling apparatus for automated testing.
The scheduling device for the automatic test of the embodiment of the invention comprises: the system comprises a determining module, a testing module and a judging module, wherein the determining module is used for receiving a scheduling task of an automatic test and determining at least one mobile device to be tested from a pre-established device pool according to the scheduling task; the obtaining module is used for obtaining an execution script and a product test packet corresponding to the scheduling task and sending the product test packet to the at least one mobile device to be tested; and the test module is used for carrying out concurrent test on the at least one mobile device to be tested, which is provided with the product test package, by using the execution script.
Optionally, the apparatus further comprises a building module configured to: acquiring all mobile equipment groups to be tested; and aiming at one mobile device in the mobile device group, establishing connection with the mobile device, acquiring the device information of the connected mobile device, and uploading the device information to a database to complete the construction of the device pool.
Optionally, the determining module is further configured to: acquiring a target mobile equipment group according to the scheduling task; and for each target mobile device in the target mobile device group, judging whether the target mobile device exists in the device pool or not, and determining that the target mobile device is a mobile device to be tested if the target mobile device is in a connection state.
Optionally, the obtaining module is further configured to: determining an execution script address and a product test packet address corresponding to the scheduling task; pulling the execution script from an automated test execution script library by using the execution script address; and pulling the product test packet from a product test packet library by using the product test packet address.
Optionally, the test module is further configured to: starting an automatic testing tool to compile the execution script; assigning a test port for each of the at least one mobile device to be tested that installs the product test package; and performing concurrent testing on each mobile device by using the compiled execution script based on the testing interface.
Optionally, the test module is further configured to: and acquiring an automatic test result, and uploading the automatic test result to a database.
To achieve the above object, according to still another aspect of embodiments of the present invention, there is provided an electronic apparatus.
An electronic device of an embodiment of the present invention includes: one or more processors; the storage device is used for storing one or more programs, and when the one or more programs are executed by one or more processors, the one or more processors realize the scheduling method of the automated test of the embodiment of the invention.
To achieve the above object, according to still another aspect of an embodiment of the present invention, there is provided a computer-readable medium.
A computer-readable medium of an embodiment of the present invention stores thereon a computer program, and the program, when executed by a processor, implements the scheduling method of automated testing of an embodiment of the present invention.
One embodiment of the above invention has the following advantages or benefits: the mobile equipment to be tested can be determined from the equipment pool according to the scheduling task, and then the mobile equipment to be tested is tested by utilizing the execution script and the product test packet, so that the effect of testing a plurality of mobile equipment simultaneously is achieved, the method is suitable for testing the mobile equipment of various systems, the working efficiency of automatic testing is improved, and the automatic testing time is reduced; when the equipment pool is constructed in the embodiment of the invention, the connection with all the mobile equipment needs to be established, the equipment information is acquired, and the equipment information is uploaded to the database of the server, so that the equipment pool can be constructed, and the aim of monitoring the mobile equipment by the server is fulfilled; according to the embodiment of the invention, firstly, a target mobile equipment group required to be carried out is determined according to a scheduling task, and then the mobile equipment to be tested is screened out from the target mobile equipment group through the pre-constructed related information of the target mobile equipment in an equipment pool, so that the mobile equipment can be tested concurrently, the mobile equipment to be tested can be ensured to be in an online connection state, and the accuracy of automatic testing is improved; the equipment information in the embodiment of the invention can comprise a brand, a model, a system version, a resolution, an installed program package, a unique identifier of equipment and a unique identifier of a client connected with the equipment, so that a detailed automatic test result can be generated when the mobile equipment is automatically tested; in the embodiment of the invention, the scheduling task comprises an execution script address and a product test packet address of the automatic test, so that the execution script and the product test packet can be pulled; in the embodiment of the invention, a test port is distributed for each mobile device to be tested, and then the test port is utilized for automatic test, so that the effect of testing the mobile devices concurrently can be achieved; according to the embodiment of the invention, after the automatic test is carried out, the test result is obtained and uploaded to the database of the server, so that the test result can be conveniently and directly checked by a worker, and the product is optimized according to the test result.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a schematic diagram of the main steps of a scheduling method of automated testing according to an embodiment of the present invention;
FIG. 2 is a schematic view of a main flow of a scheduling method of an automated test according to a referential embodiment of the present invention;
FIG. 3 is a schematic diagram of the main modules of a scheduling apparatus for automated testing according to an embodiment of the present invention;
FIG. 4 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
fig. 5 is a schematic block diagram of a computer system suitable for use in implementing a terminal device or server of an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Fig. 1 is a schematic diagram of main steps of a scheduling method of an automated test according to an embodiment of the present invention. As a reference embodiment of the present invention, as shown in fig. 1, the main steps of the scheduling method for automated testing according to the embodiment of the present invention may include:
step S101: and receiving a scheduling task of the automatic test, and determining at least one mobile device to be tested from a pre-established device pool according to the scheduling task. The dispatching method of the automatic test is applied to the client, and the client establishes connection with the mobile equipment to form an equipment pool. There are multiple clients in this device pool, each client establishing a connection with a mobile device. The scheduling task is sent by a server monitoring the client, and the scheduling task comprises the devices in which client needs to be automatically tested. If the client receives the scheduling task sent by the server, it is indicated that the mobile equipment established with the client has equipment to be tested. Or, if the server does not send the scheduling task to the client at a certain time, it indicates that the mobile device connected to the client does not need to perform the test in the scheduling task.
Taking a client as a Personal Computer (Personal Computer, abbreviated as PC, the PCs in the present invention all refer to electronic devices capable of implementing the scheduling method of the automated test of the present invention, that is, an application program or a test scheduling packet that can implement the scheduling method of the automated test of the present invention has been installed in the PC in the present invention), taking a mobile device as an example, assuming that there are 3 PCs with serial numbers A, B and C in an equipment pool, the PC with serial number a establishes connection with 15 mobile phones, the PC with serial number a1 to a15 establishes connection with 20 mobile phones, the PC with serial number B establishes connection with B1 to B20, the PC with serial number C establishes connection with 18 mobile phones, and the serial numbers C1 to C18. When the server needs to test cell phones a10 to a14 and cell phone B1, the server will send a scheduling task for testing cell phones a10 to a14 to the PC with serial number a, and will also send a scheduling task for testing cell phone B1 to the PC with serial number B. Since no testing is required for handsets C1 through C18 at this time, the server does not send scheduling tasks to PC with sequence number C.
As another reference embodiment of the present invention, in the step S101, the mobile device to be tested is selected from the device pool, and it may be determined that the device pool is constructed very importantly, so that before determining at least one mobile device to be tested from the pre-established device pool, the scheduling method for the automated testing in the present invention may further include: acquiring all mobile equipment groups to be tested; and aiming at one mobile device in the mobile device group, establishing connection with the mobile device, acquiring the device information of the connected mobile device, and uploading the device information to a database to complete the construction of a device pool. The invention establishes the connection between the client and all the mobile devices, thus forming an equipment pool, and directly selecting the equipment from the equipment pool when a task is scheduled each time, thereby overcoming the defect that some tests in the prior art can not carry out tests on the equipment of all the systems. In the invention, an equipment pool is constructed in advance, and the equipment pool can store various types of mobile equipment of various systems. After the connection with the mobile equipment is established, the equipment information is stored in the database of the server, so that the connection information can be searched through the database, and the server can conveniently send scheduling tasks. The database of the invention is a database of the server and is used for storing the equipment information for establishing connection, and if the database contains the equipment information of a certain mobile equipment, the mobile equipment is connected with the client. Therefore, when the server sends the scheduling task, the scheduling task can be generated according to the equipment information in the database, but the situation that the server has abnormal faults cannot be avoided.
In addition, in the embodiment of the present invention, the connection established with the mobile device may be established through a Universal Serial Bus (USB), or may be established through bluetooth, or may also be established through bluetooth, but considering stability of data transmission, the preferred scheme is to establish the direct connection between the mobile device and the client through USB. After the connection is established, the client can identify the equipment information of the mobile equipment and then upload the equipment information to the database of the server, so that the aim of monitoring the mobile equipment by the server can be achieved.
In this embodiment of the present invention, the device information may include: brand information of the device, model information of the device, system version information of the device, resolution information of the device, installed package information of the device, unique identification information of the device, and unique identification information of a client that establishes a connection with the device. The brand information of the device refers to the brand of the device, such as Huaye, Zhongxing, millet, or apple iphone, etc.; model information of the device, such as hua shi P10, 2S red rice of millet, or 6S apple iphone, etc.; the resolution information of the device refers to the resolution of the screen, and the higher the resolution is, the clearer the screen is displayed, such as 240 × 320, 320 × 480 or 640 × 960; the installed package information of the device refers to third party package information installed on the device, for example, WeChat, Jingdong, or Aiqiyi, etc.; the unique identification information of the equipment refers to a unique identification number of the equipment and represents the identity information of the equipment; the unique identification information of the client connected with the device refers to the identity information of the client connected with the device, and taking the client as a PC as an example, the unique identification of the PC can be obtained through an internet protocol address and a physical address of the PC. The device information in the embodiment of the invention comprises the unique identification information of the client connected with the device, and the advantage is that the database of the server can store which clients are connected with which mobile devices, so that the server can be ensured to send the scheduling task to the corresponding client, the testing time is reduced, and the testing efficiency is improved.
Taking a mobile device as a mobile phone of an android system, taking a client as a PC as an example, the PC can identify the brand, model, system version, resolution, installed third-party program package and unique identification number of the device through an SDK of the android system device, and upload the information, the IP address and the MAC address of the PC to a database of a server through an http interface (an application program interface based on http service of hypertext transfer protocol, which may be other methods in the present invention, without limitation). Taking a mobile device as a mobile phone of an apple system and a client as a PC as an example, the PC can identify the brand, model, system version, resolution, installed third-party program package and unique identification number of the device through a libemobile device (also called libiphone, which is an open source package) of the apple system device, and upload the information, the IP address and the MAC address of the PC to a database of a server through an http interface.
As another reference embodiment of the present invention, the determining at least one mobile device to be tested from the pre-established device pool according to the scheduling task in step S101 may include: according to the scheduling task, acquiring a target mobile equipment group needing automatic testing; and judging whether the target mobile equipment exists in the equipment pool or not aiming at each target mobile equipment in the target mobile equipment group, wherein the target mobile equipment is in a connection state, and if so, determining that the target mobile equipment is the mobile equipment to be tested. After receiving the scheduling task, the embodiment of the invention needs to determine whether the mobile equipment needing to be tested in the scheduling task exists in the equipment pool, and if so, needs to judge whether the mobile equipment establishes a connection state with the client, and the mobile equipment can be tested only under the condition that the two conditions are met.
Step S102: and acquiring an execution script and a product test packet corresponding to the scheduling task, and sending the product test packet to at least one mobile device to be tested. In step S101, the embodiment of the present invention receives a scheduling task sent by a server, and then obtains an execution script and a product test package corresponding to the scheduling task according to the scheduling task. The execution script is an automatic test script and is used for testing the mobile equipment, and the product test package is a product initialization program package needing to be tested. For example, if a scheduling task needs to test a new version of an application package, the application package is first obtained from the server, and an execution script for executing the automated test needs to be obtained. After the client acquires the product test package, the client sends the product test package to the mobile device to be tested, and because the mobile device to be tested is in an online state (that is, the mobile device is connected with the client), the mobile device to be tested can generate an executable test execution file testng.
As still another reference embodiment of the present invention, the obtaining of the execution script and the product test package corresponding to the scheduling task in step S102 may include: determining an execution script address and a product test packet address corresponding to a scheduling task; pulling the execution script from the automatic test execution script library by using the execution script address; and pulling the product test packet from the product test packet library by using the address of the product test packet. The server in the embodiment of the invention is provided with an automatic test script library and a product test package library. The automatic test script library stores various execution scripts for testing products, such as a function test execution script or a service test execution script; the product test package library stores various versions of application program initial packages developed by developers, such as a first version package of a P product, a second version package of the P product, a first version package of an S product and the like.
Taking a client as a PC and a mobile device as a mobile phone as an example, the PC is connected with 15 mobile phones with serial numbers of A1 to A15, the scheduling task comprises testing P product test packages of the mobile phones A1 to A5 and testing S product test packages of the mobile phones A6 to A8, the PC can obtain the P product test packages and the S product test packages from the scheduling task, then the PC sends the P product test packages to the mobile phones A1 to A5, and the S product test packages to the mobile phones A6 to A8. Meanwhile, the PC can also acquire an execution script address for testing the P product test packet and an execution script address for testing the S product test packet from the scheduling task, and then pull the execution script.
Step S103: and utilizing the execution script to carry out concurrent testing on at least one mobile device to be tested for installing the product test package. After the execution script is obtained in step S102 and the product test package is sent to the mobile device to be tested, the client may test the mobile device by using the execution script.
As another reference embodiment of the present invention, the concurrently testing at least one mobile device to be tested, which is installed with the product test package, by using the execution script in step S103 may include: starting an automatic testing tool to compile the execution script; assigning a test port for each of at least one mobile device to be tested that installs a product test package; and performing concurrent testing on each mobile device by using the compiled execution script based on the testing interface. The automatic test tool in the embodiment of the invention integrates the existing open source test tool, can utilize the functions of the test tool and simultaneously can avoid the complicated steps of installing the test tool. In the embodiment of the invention, after the client acquires the execution script, the automatic test tool is automatically started to compile the execution script, a test port is allocated to each mobile device to be tested, and the port is used for carrying out automatic test. Taking the client as a PC and the mobile device as a mobile phone as an example, the PC allocates an unoccupied PC port, and starts an app in an automated testing tool to interact with the mobile phone to realize a simulated click operation, thereby completing automated testing of the mobile phone. In the prior art, different versions of appums are required for mobile phones of different systems, but in the embodiment of the invention, the testing function of the appum tool is utilized, and an interface environment based on the appum is not required, so that the appum is not required to be installed, the problem of system version compatibility is avoided, and the problem of complicated installation environment is solved.
In this embodiment of the present invention, after performing an automated test on at least one mobile device to be tested, which is installed with a product test package, by using an execution script, the scheduling method of the automated test may further include: and acquiring an automatic test result, and uploading the automatic test result to a database. According to the embodiment of the invention, after the automatic test is carried out, the test result is obtained and uploaded to the database of the server, so that the test result can be conveniently and directly checked by a worker, and the product is optimized according to the test result.
Fig. 2 is a schematic diagram of a main flow of a scheduling method of an automated test according to a referential embodiment of the present invention. As shown in fig. 2, the main flow of the scheduling method for automated testing according to the embodiment of the present invention may include:
step S201: establishing connection with all mobile devices, acquiring device information of the connected mobile devices, and uploading the device information to a database to complete the construction of a device pool;
step S202: the method comprises the steps that a client receives a scheduling task of an automatic test sent by a server;
step S203: the client side obtains a mobile equipment group to be tested according to the scheduling task;
step S204: the client randomly selects a mobile device D from the mobile device group;
step S205: the client judges whether the mobile device D exists in the device pool and keeps a connection state with the mobile device D, if so, step S206 is executed, otherwise, step S207 is executed;
step S206: the client determines that the mobile device D is a mobile device to be tested;
step S207: the client judges whether all the devices in the target device are analyzed, if yes, step S208 is executed;
step S208: the client side obtains an execution script address and a product test packet address of the mobile equipment to be tested according to the scheduling task;
step S209: the client pulls an execution script for testing the mobile equipment to be tested by using the execution script address, and compiles the execution script;
step S210: the client pulls a product test packet to be tested by using the product test packet address, and sends the product test packet to the mobile equipment to be tested;
step S211: after the mobile device to be tested acquires the product test package, automatically generating an execution test file, and installing the product test package;
step S212: the client allocates a test port for the mobile equipment to be tested, and performs concurrent test on the mobile equipment to be tested by using the compiled execution script based on the test interface;
step S213: and the client generates an automatic test result and uploads the automatic test result to a database of the server.
It should be noted that, in the embodiment of the present invention, the server monitors all the clients, monitors the mobile devices connected to each client, generates the scheduling task, and sends the scheduling task to the client, and if the mobile device on a certain client does not need to be tested in the scheduling task, the scheduling task is not sent to the client. In addition, the server also monitors addition and deletion of the mobile equipment on the client. In addition, in the embodiment of the present invention, there are multiple clients, and the connection establishment with all the mobile devices in step S201 is to establish a connection between each client and the mobile device corresponding to the client.
According to the technical scheme of the dispatching method for the automatic test, the mobile equipment to be tested can be determined from the equipment pool according to the dispatching task, then the mobile equipment to be tested is tested by utilizing the execution script and the product test packet, the effect of testing a plurality of mobile equipment simultaneously is achieved, the dispatching method is suitable for testing the mobile equipment of various systems, the working efficiency of the automatic test is improved, and the automatic test time is reduced; when the equipment pool is constructed in the embodiment of the invention, the connection with all the mobile equipment needs to be established, the equipment information is acquired, and the equipment information is uploaded to the database of the server, so that the equipment pool can be constructed, and the aim of monitoring the mobile equipment by the server is fulfilled; according to the embodiment of the invention, firstly, a target mobile equipment group required to be carried out is determined according to a scheduling task, and then the mobile equipment to be tested is screened out from the target mobile equipment group through the pre-constructed related information of the target mobile equipment in an equipment pool, so that the mobile equipment can be tested concurrently, the mobile equipment to be tested can be ensured to be in an online connection state, and the accuracy of automatic testing is improved; the equipment information in the embodiment of the invention can comprise a brand, a model, a system version, resolution, an installed program package and a unique identifier, so that a detailed automatic test result can be generated when the mobile equipment is automatically tested; in the embodiment of the invention, the scheduling task comprises an execution script address and a product test packet address of the automatic test, so that the execution script and the product test packet can be pulled; in the embodiment of the invention, a test port is distributed for each mobile device to be tested, and then the test port is utilized for automatic test, so that the effect of testing the mobile devices concurrently can be achieved; according to the embodiment of the invention, after the automatic test is carried out, the test result is obtained and uploaded to the database of the server, so that the test result can be conveniently and directly checked by a worker, and the product is optimized according to the test result.
Fig. 3 is a schematic diagram of main blocks of a scheduling apparatus for automated testing according to an embodiment of the present invention. As shown in fig. 3, the scheduling apparatus 300 for automated testing according to the embodiment of the present invention mainly includes the following modules: a determination module 301, an acquisition module 302 and a test module 303.
The determining module 301 may be configured to receive a scheduling task of an automated test, and determine at least one mobile device to be tested from a pre-established device pool according to the scheduling task. The obtaining module 302 may be configured to obtain an execution script and a product test package corresponding to the scheduling task, and send the product test package to at least one mobile device to be tested. The testing module 303 may be configured to concurrently test at least one mobile device to be tested that installs the product test package with the execution script.
In this embodiment of the present invention, the scheduling apparatus for automated testing may further include a building module (not shown in the figure), where the building module may be configured to: acquiring all mobile equipment groups to be tested; and aiming at one mobile device in the mobile device group, establishing connection with the mobile device, acquiring the device information of the connected mobile device, and uploading the device information to a database to complete the construction of a device pool.
In this embodiment of the present invention, the determining module 301 may further be configured to: acquiring a target mobile equipment group according to the scheduling task; and judging whether the target mobile equipment exists in the equipment pool or not aiming at each target mobile equipment in the target mobile equipment group, wherein the target mobile equipment is in a connection state, and if so, determining that the target mobile equipment is the mobile equipment to be tested.
In this embodiment of the present invention, the obtaining module 302 may further be configured to: determining an execution script address and a product test packet address corresponding to a scheduling task; pulling the execution script from the automatic test execution script library by using the execution script address; and pulling the product test packet from the product test packet library by using the address of the product test packet.
In this embodiment of the present invention, the test module 303 may further be configured to: starting an automatic testing tool to compile the execution script; assigning a test port for each of at least one mobile device to be tested that installs a product test package; and automatically testing each mobile device by using the compiled execution script based on the test interface.
In this embodiment of the present invention, the test module 303 may further be configured to: and acquiring an automatic test result, and uploading the automatic test result to a database.
As can be seen from the above description, the scheduling apparatus for automated testing according to the embodiment of the present invention can determine the mobile device to be tested from the device pool according to the scheduling task, and then test the mobile device to be tested by using the execution script and the product test package, so as to achieve the effect of concurrently testing multiple mobile devices, and is suitable for testing mobile devices of various systems, thereby improving the work efficiency of automated testing and reducing the time of automated testing; when the equipment pool is constructed in the embodiment of the invention, the connection with all the mobile equipment needs to be established, the equipment information is acquired, and the equipment information is uploaded to the database of the server, so that the equipment pool can be constructed, and the aim of monitoring the mobile equipment by the server is fulfilled; according to the embodiment of the invention, firstly, a target mobile equipment group required to be carried out is determined according to a scheduling task, and then the mobile equipment to be tested is screened out from the target mobile equipment group through the pre-constructed related information of the target mobile equipment in an equipment pool, so that the mobile equipment can be tested concurrently, the mobile equipment to be tested can be ensured to be in an online connection state, and the accuracy of automatic testing is improved; the equipment information in the embodiment of the invention can comprise a brand, a model, a system version, resolution, an installed program package and a unique identifier, so that a detailed automatic test result can be generated when the mobile equipment is automatically tested; in the embodiment of the invention, the scheduling task comprises an execution script address and a product test packet address of the automatic test, so that the execution script and the product test packet can be pulled; in the embodiment of the invention, a test port is distributed for each mobile device to be tested, and then the test port is utilized for automatic test, so that the effect of testing the mobile devices concurrently can be achieved; according to the embodiment of the invention, after the automatic test is carried out, the test result is obtained and uploaded to the database of the server, so that the test result can be conveniently and directly checked by a worker, and the product is optimized according to the test result.
Fig. 4 shows an exemplary system architecture 400 to which the scheduling method for automated testing or the scheduling apparatus for automated testing of an embodiment of the present invention may be applied.
As shown in fig. 4, the system architecture 400 may include terminal devices 401, 402, 403, a network 404, and an electronic device 405. The network 404 serves as a medium for providing communication links between the terminal devices 401, 402, 403 and the electronic device 405. Network 404 may include various types of connections, such as wire, wireless communication links, or fiber optic cables, to name a few.
A user may use the terminal devices 401, 402, 403 to interact with an electronic device 405 over a network 404 to receive or send messages or the like. The terminal devices 401, 402, 403 may have installed thereon various communication client applications, such as shopping-like applications, web browser applications, search-like applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only).
The terminal devices 401, 402, 403 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The electronic device 405 may be an electronic device that provides various services, such as a background management electronic device (for example only) that provides support for shopping-like websites browsed by users using the terminal devices 401, 402, 403. The background management electronic device may analyze and process the received data such as the product information query request, and feed back a processing result (for example, target push information and product information — only an example) to the terminal device.
It should be noted that the scheduling method for the automated test provided by the embodiment of the present invention is generally executed by the electronic device 405, and accordingly, the scheduling apparatus for the automated test is generally disposed in the electronic device 405.
It should be understood that the number of terminal devices, networks, and electronic devices in fig. 4 is merely illustrative. There may be any number of terminal devices, networks, and electronic devices, as desired for implementation.
Referring now to FIG. 5, shown is a block diagram of a computer system 500 suitable for use with a terminal device implementing an embodiment of the present invention. The terminal device shown in fig. 5 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 5, the computer system 500 includes a Central Processing Unit (CPU)501 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)502 or a program loaded from a storage section 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data necessary for the operation of the system 500 are also stored. The CPU 501, ROM 502, and RAM 503 are connected to each other via a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
To the I/O interface 505, AN input section 506 including a keyboard, a mouse, and the like, AN output section 507 including a keyboard such as a Cathode Ray Tube (CRT), a liquid crystal display (L CD), and the like, a speaker, and the like, a storage section 508 including a hard disk and the like, and a communication section 509 including a network interface card such as a L AN card, a modem, and the like, the communication section 509 performs communication processing via a network such as the internet, a drive 510 is also connected to the I/O interface 505 as necessary, a removable medium 511 such as a magnetic disk, AN optical disk, a magneto-optical disk, a semiconductor memory, and the like is mounted on the drive 510 as necessary, so that a computer program read out therefrom is mounted into the storage section 508 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 509, and/or installed from the removable medium 511. The computer program performs the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 501.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present invention may be implemented by software or hardware. The described modules may also be provided in a processor, which may be described as: a processor includes a determination module, an acquisition module, and a test module. Where the names of these modules do not in some cases constitute a definition of the module itself, for example, the determining module may also be described as a "module that receives a scheduling task for automated testing and determines at least one mobile device to be tested from a pre-built pool of devices according to the scheduling task".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise: receiving a scheduling task of an automatic test, and determining at least one mobile device to be tested from a pre-established device pool according to the scheduling task; acquiring an execution script and a product test packet corresponding to a scheduling task, and sending the product test packet to at least one mobile device to be tested; and utilizing the execution script to carry out concurrent testing on at least one mobile device to be tested for installing the product test package.
According to the technical scheme of the embodiment of the invention, the mobile equipment to be tested can be determined from the equipment pool according to the scheduling task, and then the mobile equipment to be tested is tested by utilizing the execution script and the product test packet, so that the effect of concurrently testing a plurality of mobile equipment is achieved, the method is suitable for testing the mobile equipment of various systems, the working efficiency of automatic testing is improved, and the automatic testing time is reduced; when the equipment pool is constructed in the embodiment of the invention, the connection with all the mobile equipment needs to be established, the equipment information is acquired, and the equipment information is uploaded to the database of the server, so that the equipment pool can be constructed, and the aim of monitoring the mobile equipment by the server is fulfilled; according to the embodiment of the invention, firstly, a target mobile equipment group required to be carried out is determined according to a scheduling task, and then the mobile equipment to be tested is screened out from the target mobile equipment group through the pre-constructed related information of the target mobile equipment in an equipment pool, so that the mobile equipment can be tested concurrently, the mobile equipment to be tested can be ensured to be in an online connection state, and the accuracy of automatic testing is improved; the equipment information in the embodiment of the invention can comprise a brand, a model, a system version, resolution, an installed program package and a unique identifier, so that a detailed automatic test result can be generated when the mobile equipment is automatically tested; in the embodiment of the invention, the scheduling task comprises an execution script address and a product test packet address of the automatic test, so that the execution script and the product test packet can be pulled; in the embodiment of the invention, a test port is distributed for each mobile device to be tested, and then the test port is utilized for automatic test, so that the effect of testing the mobile devices concurrently can be achieved; according to the embodiment of the invention, after the automatic test is carried out, the test result is obtained and uploaded to the database of the server, so that the test result can be conveniently and directly checked by a worker, and the product is optimized according to the test result.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (14)

1. A scheduling method for automated testing, comprising:
receiving a scheduling task of an automatic test, and determining at least one mobile device to be tested from a pre-established device pool according to the scheduling task;
acquiring an execution script and a product test packet corresponding to the scheduling task, and sending the product test packet to the at least one mobile device to be tested;
and utilizing the execution script to carry out concurrent testing on the at least one mobile device to be tested, which is provided with the product test package.
2. The scheduling method of claim 1, prior to determining at least one mobile device to be tested from a pre-established pool of devices, the method further comprising:
acquiring all mobile equipment groups to be tested;
and aiming at one mobile device in the mobile device group, establishing connection with the mobile device, acquiring the device information of the connected mobile device, and uploading the device information to a database to complete the construction of the device pool.
3. The scheduling method of claim 1, wherein determining at least one mobile device to be tested from a pre-established pool of devices according to the scheduling task comprises:
acquiring a target mobile equipment group according to the scheduling task;
and for each target mobile device in the target mobile device group, judging whether the target mobile device exists in the device pool or not, and determining that the target mobile device is a mobile device to be tested if the target mobile device is in a connection state.
4. The scheduling method of claim 1, wherein obtaining the execution script and the product test package corresponding to the scheduling task comprises:
determining an execution script address and a product test packet address corresponding to the scheduling task;
pulling the execution script from an automated test execution script library by using the execution script address;
and pulling the product test packet from a product test packet library by using the product test packet address.
5. The scheduling method of claim 1, wherein the performing a batch test on the at least one mobile device to be tested installing the product test package using the execution script comprises:
starting an automatic testing tool to compile the execution script;
assigning a test port for each of the at least one mobile device to be tested that installs the product test package;
and performing concurrent testing on each mobile device by using the compiled execution script based on the testing interface.
6. The scheduling method of claim 1, wherein after automatically testing the at least one mobile device under test that installs the product test package with the execution script, the method further comprises: and acquiring an automatic test result, and uploading the automatic test result to a database.
7. An automated test scheduling apparatus, comprising:
the system comprises a determining module, a testing module and a judging module, wherein the determining module is used for receiving a scheduling task of an automatic test and determining at least one mobile device to be tested from a pre-established device pool according to the scheduling task;
the obtaining module is used for obtaining an execution script and a product test packet corresponding to the scheduling task and sending the product test packet to the at least one mobile device to be tested;
and the test module is used for carrying out concurrent test on the at least one mobile device to be tested, which is provided with the product test package, by using the execution script.
8. The scheduling apparatus of claim 7, wherein the apparatus further comprises a construction module configured to:
acquiring all mobile equipment groups to be tested;
and aiming at one mobile device in the mobile device group, establishing connection with the mobile device, acquiring the device information of the connected mobile device, and uploading the device information to a database to complete the construction of the device pool.
9. The scheduling apparatus of claim 7, wherein the determining module is further configured to:
acquiring a target mobile equipment group according to the scheduling task;
and for each target mobile device in the target mobile device group, judging whether the target mobile device exists in the device pool or not, and determining that the target mobile device is a mobile device to be tested if the target mobile device is in a connection state.
10. The scheduling apparatus of claim 7, wherein the obtaining module is further configured to:
determining an execution script address and a product test packet address corresponding to the scheduling task;
pulling the execution script from an automated test execution script library by using the execution script address;
and pulling the product test packet from a product test packet library by using the product test packet address.
11. The scheduling apparatus of claim 7 wherein the testing module is further configured to:
starting an automatic testing tool to compile the execution script;
assigning a test port for each of the at least one mobile device to be tested that installs the product test package;
and performing concurrent testing on each mobile device by using the compiled execution script based on the testing interface.
12. The scheduling apparatus of claim 7 wherein the testing module is further configured to: and acquiring an automatic test result, and uploading the automatic test result to a database.
13. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-6.
14. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-6.
CN201910073097.1A 2019-01-25 2019-01-25 Dispatching method and dispatching device for automatic test Pending CN111488268A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910073097.1A CN111488268A (en) 2019-01-25 2019-01-25 Dispatching method and dispatching device for automatic test

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910073097.1A CN111488268A (en) 2019-01-25 2019-01-25 Dispatching method and dispatching device for automatic test

Publications (1)

Publication Number Publication Date
CN111488268A true CN111488268A (en) 2020-08-04

Family

ID=71810674

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910073097.1A Pending CN111488268A (en) 2019-01-25 2019-01-25 Dispatching method and dispatching device for automatic test

Country Status (1)

Country Link
CN (1) CN111488268A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113392027A (en) * 2021-07-07 2021-09-14 北京智慧星光信息技术有限公司 Compatibility testing method and system for mobile terminal application and electronic equipment
WO2023185482A1 (en) * 2022-03-29 2023-10-05 中兴通讯股份有限公司 Test method, storage medium and electronic apparatus

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113392027A (en) * 2021-07-07 2021-09-14 北京智慧星光信息技术有限公司 Compatibility testing method and system for mobile terminal application and electronic equipment
WO2023185482A1 (en) * 2022-03-29 2023-10-05 中兴通讯股份有限公司 Test method, storage medium and electronic apparatus

Similar Documents

Publication Publication Date Title
CN111679990B (en) Test data generation method and device, readable medium and electronic equipment
CN110377440B (en) Information processing method and device
CN111813685B (en) Automatic test method and device
CN111309304B (en) Method, device, medium and electronic equipment for generating IDL file
CN111786939B (en) Method, device and system for testing management platform of Internet of things
CN112306851A (en) Automatic testing method and device
WO2019029451A1 (en) Method for publishing mobile applications and electronic apparatus
CN110968331A (en) Method and device for running application program
CN111414154A (en) Method and device for front-end development, electronic equipment and storage medium
CN109840109B (en) Method and apparatus for generating software development toolkit
CN111488268A (en) Dispatching method and dispatching device for automatic test
CN110851211A (en) Method, apparatus, electronic device, and medium for displaying application information
CN111666079A (en) Method, device, system, equipment and computer readable medium for software upgrading
CN115996179A (en) Service node testing method and device, readable medium and electronic equipment
CN112579447A (en) Browser testing method and device
CN109120433B (en) Method and apparatus for containerized deployment of hosts
CN111324470A (en) Method and device for generating information
CN116662193A (en) Page testing method and device
CN114116487B (en) Pressure testing method and device, electronic equipment and storage medium
CN115964302A (en) Data testing method and device
CN110580216A (en) application extraction and detection method and device
CN110806967A (en) Unit testing method and device
CN113704079B (en) Protobuf-based interface testing method and device
CN112131095B (en) Pressure testing method and device
CN112433938A (en) Method and device for testing application of mobile terminal

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