[go: up one dir, main page]

WO2018036167A1 - Test task executor assignment method, device, server and storage medium - Google Patents

Test task executor assignment method, device, server and storage medium Download PDF

Info

Publication number
WO2018036167A1
WO2018036167A1 PCT/CN2017/079641 CN2017079641W WO2018036167A1 WO 2018036167 A1 WO2018036167 A1 WO 2018036167A1 CN 2017079641 W CN2017079641 W CN 2017079641W WO 2018036167 A1 WO2018036167 A1 WO 2018036167A1
Authority
WO
WIPO (PCT)
Prior art keywords
execution machine
idle
execution
identifier
test task
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.)
Ceased
Application number
PCT/CN2017/079641
Other languages
French (fr)
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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Publication of WO2018036167A1 publication Critical patent/WO2018036167A1/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/3668Testing of software
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Definitions

  • the present application relates to the field of computer application technologies, and in particular, to a test task execution machine allocation method, apparatus, server, and storage medium.
  • test task it is necessary to send a test task to an execution machine, and use the execution machine to perform a test task to obtain a test result.
  • the tester is required to apply to the executive manager for the execution machine.
  • the executive manager manually assigns the corresponding number of actuators to the tester, and then the tester can execute the test task with the execution machine.
  • the execution manager needs to manually allocate a corresponding number of execution machines for each tester, so that the test task execution machine allocation process is cumbersome and the execution manager manually assigns The speed and accuracy of the actuator are low, so that the tester cannot quickly and accurately obtain the corresponding number of actuators to perform the test task, resulting in inefficient distribution of the test task actuator.
  • test task execution machine allocation method apparatus, server, and storage medium are provided.
  • a test task execution machine allocation method includes:
  • An execution machine is assigned to the test task based on the found idle execution machine identification.
  • a test task actuator distribution device comprising:
  • the test task obtaining module is configured to obtain a test task created by each terminal in the test page;
  • test task adding module configured to add the test task to the task queue according to the obtaining order
  • a task queue reading module configured to read a test task in the task queue
  • An execution quantity extraction module for extracting the number of execution machines from the read test tasks
  • An execution identifier identification module configured to search for an idle execution machine identifier in the idle execution machine identifier set according to the number of execution machines;
  • the test task sending module is configured to allocate an execution machine to the test task according to the found idle executable machine identifier.
  • a server comprising a memory and a processor, the memory storing computer executable instructions that, when executed by the processor, cause the processor to perform the following steps:
  • An execution machine is assigned to the test task based on the found idle execution machine identification.
  • One or more non-volatile storage media storing computer-executable instructions that, when executed by one or more processors, cause the one or more processors to perform the following steps:
  • An execution machine is assigned to the test task based on the found idle execution machine identification.
  • 1 is an application environment diagram of a test task execution machine distribution system in an embodiment
  • FIG. 2 is a functional block diagram of a test server in a test task execution machine distribution system in an embodiment
  • FIG. 3 is a schematic flow chart of a test task execution machine allocation method in an embodiment
  • FIG. 4 is a schematic flowchart of a step of searching for an idle execution machine identifier in an embodiment
  • FIG. 5 is a schematic flowchart of a step of updating an execution machine identifier in a test task in an embodiment
  • FIG. 6 is a flow chart showing the steps of periodically detecting an actuator in an embodiment
  • Figure 7 is a functional block diagram of a test task actuator distribution device in one embodiment
  • Figure 8 is a functional block diagram of a test task actuator distribution device in another embodiment
  • FIG. 9 is a functional block diagram of an execution machine identification finding module in an embodiment
  • test task sending module 10 is a functional block diagram of a test task sending module in an embodiment
  • Figure 11 is a functional block diagram of a test task actuator distribution device in still another embodiment.
  • the test task execution machine distribution system includes a plurality of terminals 110, a test server 120 and a plurality of execution machines 130, and the plurality of terminals 110 pass through the network and the test server 120. Connected, a plurality of execution machines 130 are connected to the test server 120 via a network.
  • the test server 120 may also be multiple, and the execution machine 130 may specifically be a virtual machine.
  • the terminal 110 may be a desktop computer or a mobile terminal, and the mobile terminal may specifically be at least one of a tablet computer, a smart phone, and a personal data assistant.
  • test server 120 includes a processor coupled through a system bus, a non-volatile storage medium, an internal memory, and a network interface.
  • the processor is used to provide computing and control capabilities to support the operation of the entire test server 120.
  • the non-volatile storage medium of test server 120 stores operating system and computer executable instructions.
  • Computer executable instructions are executable by the processor to implement a test task actuator allocation method provided in the following embodiments.
  • the internal memory in test server 120 provides a cached operating environment for operating systems and computer executable instructions in a non-volatile storage medium.
  • the network interface is used for network communication with the terminal 110 and the execution machine 130. It can be understood that the test server 120 can be implemented by a stand-alone server or a server cluster composed of a plurality of servers.
  • FIG. 2 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation of the test server to which the solution of the present application is applied.
  • the specific test server may It includes more or less components than those shown in Figure 2, or some components are combined, or have different component arrangements.
  • a test task execution machine allocation method is provided.
  • the method is illustrated by being applied to the test server 120 in the test task execution machine distribution system of FIG.
  • the test task execution machine allocation program, the test task execution machine allocation program is used to implement the test task execution machine allocation method, and the test task execution machine allocation method specifically includes the following contents:
  • the test page is displayed in the terminal 110, and the terminal 110 creates a test task in the test page.
  • the test task specifically includes the test case and the number of the execution machine, and specifically includes the execution machine identifier.
  • the terminal 110 sends the test task to the test server 120.
  • the test server 120 receives the test tasks transmitted by the respective terminals 110.
  • the terminal 110 sends an access request to the test server 120.
  • the test server 120 returns test page data to the terminal 110 according to the access request, and the terminal 110 renders the test page according to the received test page data.
  • the test server 120 After obtaining the test task created by each terminal 110, the test server 120 records the acquisition time of each test task, and adds the test task to the end of the task queue according to the order of the acquisition time.
  • the test server 120 acquires one test task, stops acquiring the next test task, adds the obtained test task to the task queue, and acquires the next test task.
  • the test task includes a priority
  • the test server 120 reads the priority in each test task, and sorts the test tasks according to the priority from high to low, according to the priority. The high to low order adds test tasks to the task queue in turn.
  • the test server 120 reads the test task in the task queue, and the test task may include the number of execution machines, the number of execution machines is the number of execution machines required for the test task, and the test server 120 extracts execution from the read test tasks. Number of machines.
  • the test server 120 stores an idle execution machine identifier, the idle execution machine identifier constitutes an idle execution machine identifier set, and the idle execution machine identifier corresponding execution machine is in an idle state. After the test server 120 extracts the number of execution machines from the read test tasks, it searches for the idle execution machine identifier in the idle execution machine identification set, and the number of found idle execution machine identifiers is equal to the number of extracted execution machines.
  • the step S210 further includes the step of updating the idle execution machine identifier set, where the step specifically includes: counting the number of identifiers in the idle execution machine identifier set; comparing the number of execution machines with the number of identifiers; If the number of the identifiers is greater than the number of the identifiers, the identifiers of the executables corresponding to the executables in the idle state are re-acquired, and the obtained executable identifiers are stored in the idle executable identifier set.
  • the test server 120 counts the number of identifiers in the idle execution machine identifier set, compares the number of statistics obtained by the statistics with the number of executed execution machines, and performs an identifier according to the idle execution machine. The number of identifiers in the set determines whether there is enough execution machine assigned to the test task.
  • the number of identifiers obtained by the statistics is greater than or equal to the number of executed machines, it means that there are enough actuators assigned to the test task; if the number of identifiers obtained by statistics is less than The number of executed execution machines indicates that there is not enough execution machine assigned to the test task, and the test server 120 re-detects the execution machine in the idle state and acquires the execution machine identifier corresponding to the execution machine in the idle state, which will be obtained.
  • the execution machine identification is stored in the idle execution machine identification set.
  • the test server 120 allocates the found execution machine 130 corresponding to the idle execution machine identifier to the test task read from the task queue, and reads the information from the task queue.
  • the test task is sent to the executed execution machine 130 corresponding to the found idle executable identifier.
  • the test task is executed to generate a test result.
  • the test task is added to the task queue according to the acquisition order, and the test task in the task queue is read to ensure that the test task is read in a certain order. This avoids the situation where the test task is congested and the test task is not processed for a long time.
  • the idle execution machine identifier is searched from the idle execution machine identification set according to the number of execution machines in the read test task, and the idle task identifier is allocated according to the found idle execution machine identifier. Executing the corresponding machine of the machine identification, thereby simplifying the test task execution machine allocation operation process, quickly and accurately assigning the execution machine to the test task, and improving the test task execution machine allocation efficiency.
  • S310 specifically includes the step of searching for an idle execution machine identifier, and the step specifically includes the following content:
  • S402. Generate an execution machine scheduling request according to the number of execution machines.
  • the number of execution machines is encapsulated in the execution machine scheduling request, and the test server 120 can also encrypt the number of execution machines and encrypt the number of execution machines.
  • the number of execution machines is encapsulated in the execution machine scheduling request.
  • the scheduling server monitors the state of the execution machine, acquires the execution machine identifier corresponding to the execution machine in the idle state, and stores the obtained execution machine identifier in the idle execution machine identifier set.
  • the timing starts.
  • the test server 120 extracts the execution machine scheduling request, and sends the execution machine scheduling request to the scheduling server again.
  • the test server 120 sends an execution machine scheduling request to the scheduling server, where the scheduling server stores the idle execution machine identifier, and the idle execution machine identifier constitutes the idle execution machine identifier set.
  • the scheduling server extracts the number of execution machines in the execution machine scheduling request, searches for the idle execution machine identifier in the idle execution machine identification set according to the number of execution machines, and the scheduling server sends the found idle execution machine identifier.
  • the number of found idle performer IDs is equal to the number of extracted performers.
  • the scheduling server searches for the idle execution machine identifier from the idle execution machine identifier set according to the number of execution machines in the execution machine scheduling request, and receives the found idle execution returned by the scheduling server.
  • the machine identifier is used to search for the idle execution machine identifier by using the dispatching server, and the executed execution machine corresponding to the idle idle machine identifier is allocated to the test task, thereby improving the use efficiency of the execution machine.
  • S312 specifically includes the step of updating the execution machine identifier in the test task, and the step specifically includes the following content:
  • test server 120 detects that there is an execution machine identifier in the test task, the execution server identifier in the test task is deleted, and the found idle execution machine identifier is added to the test task to obtain the updated test task;
  • server 120 does not detect that there is an execution machine identifier in the test task, the server finds the idle execution machine identifier to be added to the test task, and obtains the updated test task.
  • S504 Send the updated test task to the scheduling server, so that the scheduling server extracts the idle execution machine identifier in the updated test task, and allocates the extracted execution machine corresponding to the idle execution machine identifier to the updated test task.
  • the test server 120 sends the updated test task to the scheduling server.
  • the scheduling server parses the test task, extracts the idle execution machine identifier in the test task, and schedules idle execution.
  • the execution machine 130 corresponding to the machine identifier assigns the execution machine to the test task, and synchronously sends the received test task to the execution machine corresponding to the idle execution machine identifier, so that the execution machine performs the test task and generates the test result.
  • the updated test task may further include verification information, and after receiving the updated test task, the scheduling server extracts the verification information in the updated test task, and verifies the verification information, after the verification is passed.
  • the scheduling server extracts the idle execution machine identifier in the updated test task, and allocates an execution machine to the updated test task according to the extracted idle execution identifier.
  • the executable identifier in the read test task is updated according to the found idle execution machine identifier, and after the updated test task is sent to the scheduling server, the scheduling server is caused to perform the idle execution machine according to the test task.
  • the identification assigns an actuator to the test task, which increases the speed and accuracy of the assigned actuator.
  • a test task execution machine allocation method is provided.
  • the method further includes the step of periodically detecting an execution machine, and the step specifically includes the following content:
  • the test server 120 periodically acquires the resource occupancy rate of each execution machine according to the preset duration, and compares the resource occupancy rate of each execution machine with a preset threshold. When the resource occupancy rate is less than the preset threshold, the execution server is in the The idle state; when the resource occupancy rate is greater than or equal to the preset threshold, it indicates that the execution machine is in a state of performing a test task, and is not in an idle state.
  • the resource occupancy rate may specifically be a thread occupancy rate.
  • test server 120 adds an idle flag to the executable identifier corresponding to the execution machine whose resource occupancy is less than the preset threshold, and extracts the identifier of the executable carrying the idle token.
  • test server 120 stores the extracted execution machine identification into the idle execution machine identification set as the idle execution machine identification.
  • the extraction will be performed.
  • the obtained execution machine identifier is stored in the idle execution machine identification set as the idle execution machine identification, so that the idle execution machine can be allocated again, improving the utilization efficiency of the idle execution machine.
  • a test task execution device distribution device 700 is provided.
  • the device specifically includes: a test task acquisition module 702, a test task addition module 704, a task queue reading module 706, and an execution machine number.
  • the test task obtaining module 702 is configured to obtain a test task created by each terminal in the test page.
  • the test task adding module 704 is configured to add the test task to the task queue in the order of acquisition.
  • the task queue reading module 706 is configured to read the test task in the task queue.
  • the execution machine quantity extraction module 708 is configured to extract the number of execution machines from the read test tasks.
  • the execution machine identifier finding module 710 is configured to search for an idle execution machine identifier in the idle execution machine identifier set according to the number of execution machines.
  • the test task sending module 712 is configured to allocate an execution machine to the test task according to the found idle executable machine identifier.
  • the test task is added to the task queue according to the acquisition order, and the test task in the task queue is read to ensure that the test task is read in a certain order. This avoids the situation where the test task is congested and the test task is not processed for a long time.
  • the idle execution machine identifier is searched from the idle execution machine identification set according to the number of execution machines in the read test task, and the idle task identifier is allocated according to the found idle execution machine identifier. Executing the corresponding machine of the machine identification, thereby simplifying the test task execution machine allocation operation process, quickly and accurately assigning the execution machine to the test task, and improving the test task execution machine allocation efficiency.
  • the test task execution device allocation device 700 further includes an identifier quantity statistics module 714 , an identifier quantity comparison module 716 , and an identifier reacquisition module 718 .
  • the identifier quantity statistics module 714 is configured to count the number of identifiers in the idle executable machine identifier set.
  • the identification quantity comparison module 716 is configured to compare the number of execution machines with the number of identifications.
  • the identifier re-acquisition module 718 is configured to re-acquire the execution machine identifier corresponding to the execution machine in the idle state when the number of execution machines is greater than the number of identifiers, and store the acquired execution machine identifier into the idle execution machine identifier set.
  • the number of execution machines required for the test task is compared with the number of statistical identifiers, and when the number of execution machines is greater than the number of identifiers, re-acquiring the idle state. Executing the machine identifier corresponding to the execution machine, storing the obtained execution machine identifier into the idle execution machine identifier set, so that there are enough idle execution machine identifiers in the idle execution machine identifier set, and ensuring that there are enough executions in the idle state.
  • Machines can be assigned to test tasks, increasing the utilization of the actuators and increasing the success rate of assigning actuators to test tasks.
  • the execution machine identification lookup module 710 specifically includes a scheduling request generation module 710a, a scheduling request sending module 710b, and an execution machine identification receiving module 710c.
  • the scheduling request generating module 710a is configured to generate an execution machine scheduling request according to the number of executing machines.
  • the scheduling request sending module 710b is configured to send an execution machine scheduling request to the scheduling server.
  • the execution machine identifier receiving module 710c is configured to receive the idle execution machine identifier returned by the scheduling server, where the idle execution machine identifier is obtained by the scheduling server in the idle execution machine identifier set according to the execution machine scheduling request.
  • the scheduling server searches for the idle execution machine identifier from the idle execution machine identifier set according to the number of execution machines in the execution machine scheduling request, and receives the found idle execution returned by the scheduling server.
  • the machine identifier is used to search for the idle execution machine identifier by using the dispatching server, and the executed execution machine corresponding to the idle idle machine identifier is allocated to the test task, thereby improving the use efficiency of the execution machine.
  • the test task sending module 712 specifically includes a test task update module 712a and a test task synchronization module 712b.
  • the test task update module 712a is configured to update the execution machine identifier in the test task according to the found idle executable machine identifier.
  • the test task synchronization module 712b is configured to send the updated test task to the scheduling server, so that the scheduling server extracts the idle execution machine identifier in the updated test task, and allocates the extracted idle execution machine to the updated test task. Identify the corresponding actuator.
  • the executable identifier in the read test task is updated according to the found idle execution machine identifier, and after the updated test task is sent to the scheduling server, the scheduling server is caused to perform the idle execution machine according to the test task.
  • the identification assigns an actuator to the test task, which increases the speed and accuracy of the assigned actuator.
  • the test task execution device allocation device 700 further includes an execution machine detection module 720 , an execution machine identification extraction module 722 , and an execution machine identification storage module 724 .
  • the execution machine detection module 720 is configured to periodically detect whether the resource occupancy rate of each execution machine is less than a preset threshold.
  • the execution machine identifier extraction module 722 is configured to: when detecting that the resource occupancy rate of the execution machine is less than a preset threshold, extract the detected execution machine identifier corresponding to the execution machine;
  • the executable identifier storage module 724 is configured to store the extracted executable identifier into the idle executable identifier set.
  • the extraction will be performed.
  • the obtained execution machine identifier is stored in the idle execution machine identification set as the idle execution machine identification, so that the idle execution machine is allocated again, and the utilization efficiency of the idle execution machine is improved.
  • Each of the above-described test task actuator distribution devices may be implemented in whole or in part by software, hardware, and combinations thereof.
  • the network interface may be an Ethernet or a wireless network card.
  • Each of the above modules may be embedded in a hardware form or independent of a processor in the server, or may be stored in a memory of the server in a software form, so that the processor calls to perform operations corresponding to the above modules.
  • the processor can be a central processing unit (CPU), a microprocessor, a microcontroller, or the like.
  • the storage medium may be a magnetic disk, an optical disk, or a read-only storage memory (Read-Only) Memory, ROM) or Random Access Memory (RAM).

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)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Debugging And Monitoring (AREA)

Abstract

A test task executor assignment method comprises: acquiring test tasks established by each terminal in a test page; adding the acquired test tasks into a task queue according to the order of acquisition; reading the test tasks in the task queue; extracting a number of executors from the read test tasks; finding idle executor identifications in an idle executor identification set according to the number of executors; and assigning executors for the read test tasks according to the found idle executor identifications.

Description

测试任务执行机分配方法、装置、服务器和存储介质Test task execution machine allocation method, device, server and storage medium

本申请要求于 2016 年 8 月 22 日提交中国专利局、申请号为 201610704227.3 、发明名称为 ' 测试任务执行机分配方法和装置 ' 的中国专利申请的优先权,其全部内容通过引用结合在本申请中。  This application is submitted to the Chinese Patent Office on August 22, 2016, and the application number is 201610704227.3 The title of the invention is the priority of the Chinese patent application entitled "Test Task Execution Machine Assignment Method and Apparatus", the entire contents of which are incorporated herein by reference.

【技术领域】[Technical Field]

本申请涉及计算机应用技术领域,尤其涉及一种测试任务执行机分配方法、装置、服务器和存储介质。The present application relates to the field of computer application technologies, and in particular, to a test task execution machine allocation method, apparatus, server, and storage medium.

【背景技术】【Background technique】

目前在测试技术领域,需要将测试任务发送至执行机,利用执行机来执行测试任务从而得到测试结果。但是在测试过程中,需要执行机时,需要测试人员向执行机管理人员申请执行机,执行机管理人员为测试人员手动分配相应数量的执行机,继而测试人员才能用执行机来执行测试任务。Currently in the field of testing technology, it is necessary to send a test task to an execution machine, and use the execution machine to perform a test task to obtain a test result. However, during the test, when the machine needs to be executed, the tester is required to apply to the executive manager for the execution machine. The executive manager manually assigns the corresponding number of actuators to the tester, and then the tester can execute the test task with the execution machine.

然而,当接收到多个测试人员申请执行机时,则执行机管理人员需要为每个测试人员手动分配相应数量的执行机,这样测试任务执行机分配过程较为繁琐,且执行机管理人员手动分配执行机的速度和准确度较低,从而使得测试人员不能快速准确的获取相应数量的执行机来执行测试任务,导致测试任务执行机分配效率低下。However, when multiple testers are requested to apply for the execution machine, the execution manager needs to manually allocate a corresponding number of execution machines for each tester, so that the test task execution machine allocation process is cumbersome and the execution manager manually assigns The speed and accuracy of the actuator are low, so that the tester cannot quickly and accurately obtain the corresponding number of actuators to perform the test task, resulting in inefficient distribution of the test task actuator.

【发明内容】 [Summary of the Invention]

根据本申请公开的各种实施例,提供一种测试任务执行机分配方法、装置、服务器和存储介质。According to various embodiments disclosed herein, a test task execution machine allocation method, apparatus, server, and storage medium are provided.

一种测试任务执行机分配方法,包括:A test task execution machine allocation method includes:

获取各终端在测试页面中创建的测试任务;Obtain test tasks created by each terminal in the test page;

按照获取顺序将所述测试任务添加到任务队列中;Add the test task to the task queue in the order of acquisition;

读取所述任务队列中的测试任务;Reading test tasks in the task queue;

从读取到的测试任务中提取执行机数量;Extract the number of execution machines from the read test tasks;

根据所述执行机数量在空闲执行机标识集合中查找空闲执行机标识;及Finding an idle execution machine identifier in the idle execution machine identification set according to the number of execution machines; and

根据查找到的空闲执行机标识为所述测试任务分配执行机。An execution machine is assigned to the test task based on the found idle execution machine identification.

一种测试任务执行机分配装置,包括:A test task actuator distribution device comprising:

测试任务获取模块,用于获取各终端在测试页面中创建的测试任务;The test task obtaining module is configured to obtain a test task created by each terminal in the test page;

测试任务添加模块,用于按照获取顺序将所述测试任务添加到任务队列中;a test task adding module, configured to add the test task to the task queue according to the obtaining order;

任务队列读取模块,用于读取所述任务队列中的测试任务;a task queue reading module, configured to read a test task in the task queue;

执行机数量提取模块,用于从读取到的测试任务中提取执行机数量;An execution quantity extraction module for extracting the number of execution machines from the read test tasks;

执行机标识查找模块,用于根据所述执行机数量在空闲执行机标识集合中查找空闲执行机标识;及An execution identifier identification module, configured to search for an idle execution machine identifier in the idle execution machine identifier set according to the number of execution machines; and

测试任务发送模块,用于根据查找到的空闲执行机标识为所述测试任务分配执行机。The test task sending module is configured to allocate an execution machine to the test task according to the found idle executable machine identifier.

一种服务器,包括存储器和处理器,所述存储器存储有计算机可执行指令,所述计算机可执行指令被所述处理器执行时,使得所述处理器执行以下步骤:A server comprising a memory and a processor, the memory storing computer executable instructions that, when executed by the processor, cause the processor to perform the following steps:

获取各终端在测试页面中创建的测试任务;Obtain test tasks created by each terminal in the test page;

按照获取顺序将所述测试任务添加到任务队列中;Add the test task to the task queue in the order of acquisition;

读取所述任务队列中的测试任务;Reading test tasks in the task queue;

从读取到的测试任务中提取执行机数量;Extract the number of execution machines from the read test tasks;

根据所述执行机数量在空闲执行机标识集合中查找空闲执行机标识;及Finding an idle execution machine identifier in the idle execution machine identification set according to the number of execution machines; and

根据查找到的空闲执行机标识为所述测试任务分配执行机。An execution machine is assigned to the test task based on the found idle execution machine identification.

一个或多个存储有计算机可执行指令的非易失性存储介质,所述计算机可执行指令别一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:One or more non-volatile storage media storing computer-executable instructions that, when executed by one or more processors, cause the one or more processors to perform the following steps:

获取各终端在测试页面中创建的测试任务;Obtain test tasks created by each terminal in the test page;

按照获取顺序将所述测试任务添加到任务队列中;Add the test task to the task queue in the order of acquisition;

读取所述任务队列中的测试任务;Reading test tasks in the task queue;

从读取到的测试任务中提取执行机数量;Extract the number of execution machines from the read test tasks;

根据所述执行机数量在空闲执行机标识集合中查找空闲执行机标识;及Finding an idle execution machine identifier in the idle execution machine identification set according to the number of execution machines; and

根据查找到的空闲执行机标识为所述测试任务分配执行机。An execution machine is assigned to the test task based on the found idle execution machine identification.

本申请的一个或多个实施例的细节在下面的附图和描述中提出。本申请的其它特征、目的和优点将从说明书、附图以及权利要求书变得明显。Details of one or more embodiments of the present application are set forth in the accompanying drawings and description below. Other features, objects, and advantages of the invention will be apparent from the description and appended claims.

【附图说明】[Description of the Drawings]

为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings to be used in the embodiments or the prior art description will be briefly described below. Obviously, the drawings in the following description are only It is a certain embodiment of the present application, and other drawings can be obtained according to the drawings without any creative work for those skilled in the art.

图1为一个实施例中测试任务执行机分配系统的应用环境图;1 is an application environment diagram of a test task execution machine distribution system in an embodiment;

图2为一个实施例中测试任务执行机分配系统中测试服务器的功能模块图;2 is a functional block diagram of a test server in a test task execution machine distribution system in an embodiment;

图3为一个实施例中测试任务执行机分配方法的流程示意图;3 is a schematic flow chart of a test task execution machine allocation method in an embodiment;

图4为一个实施例中查找空闲执行机标识的步骤的流程示意图;4 is a schematic flowchart of a step of searching for an idle execution machine identifier in an embodiment;

图5为一个实施例中更新测试任务中执行机标识的步骤的流程示意图;5 is a schematic flowchart of a step of updating an execution machine identifier in a test task in an embodiment;

图6为一个实施例中定期检测执行机的步骤的流程示意图;6 is a flow chart showing the steps of periodically detecting an actuator in an embodiment;

图7为一个实施例中测试任务执行机分配装置的功能模块图;Figure 7 is a functional block diagram of a test task actuator distribution device in one embodiment;

图8为另一个实施例中测试任务执行机分配装置的功能模块图;Figure 8 is a functional block diagram of a test task actuator distribution device in another embodiment;

图9为一个实施例中执行机标识查找模块的功能模块图;9 is a functional block diagram of an execution machine identification finding module in an embodiment;

图10为一个实施例中测试任务发送模块的功能模块图;10 is a functional block diagram of a test task sending module in an embodiment;

图11为又一个实施例中测试任务执行机分配装置的功能模块图。Figure 11 is a functional block diagram of a test task actuator distribution device in still another embodiment.

【具体实施方式】 【detailed description】

体现本申请特征与优点的典型实施方式将在以下的说明中详细叙述。应理解的是本申请能够在不同的实施方式上具有各种的变化,其皆不脱离本申请的范围,且其中的说明及图示在本质上是当作说明之用,而非用以限制本申请。Exemplary embodiments embodying the features and advantages of the present application will be described in detail in the following description. It should be understood that the present invention is capable of various modifications in the various embodiments, and This application.

图1为一个实施例中测试任务执行机分配系统的应用环境图,测试任务执行机分配系统包括多个终端110,测试服务器120和多个执行机130,多个终端110通过网络与测试服务器120连接,多个执行机130通过网络与测试服务器120连接。其中,测试服务器120也可以是多台,执行机130具体可以是虚拟机。终端110可以是台式电脑或移动终端,移动终端具体可以是平板电脑、智能手机和个人数据助理中的至少一种。1 is an application environment diagram of a test task execution machine distribution system in an embodiment. The test task execution machine distribution system includes a plurality of terminals 110, a test server 120 and a plurality of execution machines 130, and the plurality of terminals 110 pass through the network and the test server 120. Connected, a plurality of execution machines 130 are connected to the test server 120 via a network. The test server 120 may also be multiple, and the execution machine 130 may specifically be a virtual machine. The terminal 110 may be a desktop computer or a mobile terminal, and the mobile terminal may specifically be at least one of a tablet computer, a smart phone, and a personal data assistant.

图2为一个实施例中图1测试任务执行机分配系统中测试服务器120的功能模块图。如图2所示,测试服务器120包括通过系统总线连接的处理器、非易失性存储介质、内存储器和网络接口。该处理器用于提供计算和控制能力,支撑整个测试服务器120的运行。测试服务器120的非易失性存储介质存储有操作系统和计算机可执行指令。计算机可执行指令可被处理器执行以实现以下各实施例中提供的一种测试任务执行机分配方法。测试服务器120中的内存储器为非易失性存储介质中的操作系统和计算机可执行指令提供高速缓存的运行环境。网络接口用于与终端110和执行机130进行网络通信。可以理解,测试服务器120可以用独立的服务器或者多个服务器组成的服务器集群来实现。2 is a functional block diagram of the test server 120 in the test task execution machine distribution system of FIG. 1 in one embodiment. As shown in FIG. 2, test server 120 includes a processor coupled through a system bus, a non-volatile storage medium, an internal memory, and a network interface. The processor is used to provide computing and control capabilities to support the operation of the entire test server 120. The non-volatile storage medium of test server 120 stores operating system and computer executable instructions. Computer executable instructions are executable by the processor to implement a test task actuator allocation method provided in the following embodiments. The internal memory in test server 120 provides a cached operating environment for operating systems and computer executable instructions in a non-volatile storage medium. The network interface is used for network communication with the terminal 110 and the execution machine 130. It can be understood that the test server 120 can be implemented by a stand-alone server or a server cluster composed of a plurality of servers.

本领域技术人员可以理解,图2中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的测试服务器的限定,具体的测试服务器可以包括比图2中所示跟多或更少的部件,或者组合某些部件,或者具有不同的部件布置。It will be understood by those skilled in the art that the structure shown in FIG. 2 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation of the test server to which the solution of the present application is applied. The specific test server may It includes more or less components than those shown in Figure 2, or some components are combined, or have different component arrangements.

如图3所示,在一个实施例中,提供一种测试任务执行机分配方法,该方法以应用在图1测试任务执行机分配系统中的测试服务器120上举例说明,测试服务器120上运行有测试任务执行机分配程序,测试任务执行机分配程序用于实施测试任务执行机分配方法,测试任务执行机分配方法具体包括以下内容:As shown in FIG. 3, in one embodiment, a test task execution machine allocation method is provided. The method is illustrated by being applied to the test server 120 in the test task execution machine distribution system of FIG. The test task execution machine allocation program, the test task execution machine allocation program is used to implement the test task execution machine allocation method, and the test task execution machine allocation method specifically includes the following contents:

S302,获取各终端在测试页面中创建的测试任务。S302. Acquire a test task created by each terminal in the test page.

具体地,终端110中显示测试页面,终端110在测试页面中创建测试任务,测试任务具体包括测试用例和执行机数量,具体还可以包括执行机标识。终端110在测试页面中成功创建测试任务后,终端110将测试任务发送至测试服务器120。测试服务器120接收各终端110发送的测试任务。Specifically, the test page is displayed in the terminal 110, and the terminal 110 creates a test task in the test page. The test task specifically includes the test case and the number of the execution machine, and specifically includes the execution machine identifier. After the terminal 110 successfully creates a test task in the test page, the terminal 110 sends the test task to the test server 120. The test server 120 receives the test tasks transmitted by the respective terminals 110.

在一个实施例中,终端110向测试服务器120发送访问请求,测试服务器120根据访问请求向终端110返回测试页面数据,终端110根据接收到的测试页面数据渲染测试页面。In one embodiment, the terminal 110 sends an access request to the test server 120. The test server 120 returns test page data to the terminal 110 according to the access request, and the terminal 110 renders the test page according to the received test page data.

S304,按照获取顺序将测试任务添加到任务队列中。S304. Add the test task to the task queue according to the acquisition order.

具体地,测试服务器120在获取到各终端110创建的测试任务后,记录各个测试任务的获取时间,按照获取时间的顺序将测试任务添加到任务队列末端。Specifically, after obtaining the test task created by each terminal 110, the test server 120 records the acquisition time of each test task, and adds the test task to the end of the task queue according to the order of the acquisition time.

在一个实施例中,测试服务器120每获取一个测试任务,停止获取下一个测试任务,将获取到的测试任务添加到任务队列中,再获取下一个测试任务。In one embodiment, the test server 120 acquires one test task, stops acquiring the next test task, adds the obtained test task to the task queue, and acquires the next test task.

在一个实施例中,测试任务中包括优先级,测试服务器120在获取到测试任务后,读取各测试任务中的优先级,按照优先级由高到低对测试任务进行排序,按照优先级由高到低的顺序依次将测试任务添加到任务队列中。In an embodiment, the test task includes a priority, and after obtaining the test task, the test server 120 reads the priority in each test task, and sorts the test tasks according to the priority from high to low, according to the priority. The high to low order adds test tasks to the task queue in turn.

S306,读取任务队列中的测试任务。S306. Read a test task in the task queue.

S308,从读取到的测试任务中提取执行机数量。S308. Extract the number of execution machines from the read test task.

具体地,测试服务器120读取任务队列中的测试任务,测试任务中可以包括执行机数量,执行机数量为测试任务所需执行机的数量,测试服务器120从读取到的测试任务中提取执行机数量。Specifically, the test server 120 reads the test task in the task queue, and the test task may include the number of execution machines, the number of execution machines is the number of execution machines required for the test task, and the test server 120 extracts execution from the read test tasks. Number of machines.

S310,根据执行机数量在空闲执行机标识集合中查找空闲执行机标识。S310. Find an idle execution machine identifier in the idle execution machine identifier set according to the number of execution machines.

具体地,测试服务器120中存储着空闲执行机标识,空闲执行机标识构成空闲执行机标识集合,空闲执行机标识对应的执行机处于空闲状态。测试服务器120从读取到的测试任务中提取到执行机数量后,在空闲执行机标识集合中查找空闲执行机标识,查找到的空闲执行机标识的数量与提取到的执行机数量相等。Specifically, the test server 120 stores an idle execution machine identifier, the idle execution machine identifier constitutes an idle execution machine identifier set, and the idle execution machine identifier corresponding execution machine is in an idle state. After the test server 120 extracts the number of execution machines from the read test tasks, it searches for the idle execution machine identifier in the idle execution machine identification set, and the number of found idle execution machine identifiers is equal to the number of extracted execution machines.

在一个实施例中,S210之前还包括更新空闲执行机标识集合的步骤,该步骤具体包括以下内容:统计空闲执行机标识集合中的标识数量;将执行机数量与标识数量比较;若执行机数量大于标识数量,则重新获取处于空闲状态的执行机所对应的执行机标识,将获取到的执行机标识存储到空闲执行机标识集合中。In an embodiment, the step S210 further includes the step of updating the idle execution machine identifier set, where the step specifically includes: counting the number of identifiers in the idle execution machine identifier set; comparing the number of execution machines with the number of identifiers; If the number of the identifiers is greater than the number of the identifiers, the identifiers of the executables corresponding to the executables in the idle state are re-acquired, and the obtained executable identifiers are stored in the idle executable identifier set.

具体地,测试服务器120在提取到测试任务中的执行机数量后,统计空闲执行机标识集合中的标识数量,将统计得到的标识数量与提取到的执行机数量进行比较,根据空闲执行机标识集合中的标识数量判断是否有足够的执行机分配给测试任务,若统计得到的标识数量大于等于提取到的执行机数量,表示有足够的执行机分配给测试任务;若统计得到的标识数量小于提取到的执行机数量,表示没有足够的执行机分配给测试任务,测试服务器120会重新检测处于空闲状态的执行机,并获取处于空闲状态的执行机所对应的执行机标识,将获取到的执行机标识存储到空闲执行机标识集合中。Specifically, after extracting the number of execution machines in the test task, the test server 120 counts the number of identifiers in the idle execution machine identifier set, compares the number of statistics obtained by the statistics with the number of executed execution machines, and performs an identifier according to the idle execution machine. The number of identifiers in the set determines whether there is enough execution machine assigned to the test task. If the number of identifiers obtained by the statistics is greater than or equal to the number of executed machines, it means that there are enough actuators assigned to the test task; if the number of identifiers obtained by statistics is less than The number of executed execution machines indicates that there is not enough execution machine assigned to the test task, and the test server 120 re-detects the execution machine in the idle state and acquires the execution machine identifier corresponding to the execution machine in the idle state, which will be obtained. The execution machine identification is stored in the idle execution machine identification set.

S312,根据查找到的空闲执行机标识为测试任务分配执行机。S312. Assign an execution machine to the test task according to the found idle execution machine identifier.

具体地,测试服务器120在查找到空闲执行机标识后,将查找到的空闲执行机标识对应的执行机130分配给从任务队列中读取到的测试任务,将从任务队列中读取到的测试任务发送至查找到的空闲执行机标识对应的执行机130。执行机130接收到测试任务后,执行测试任务生成测试结果。Specifically, after finding the idle execution machine identifier, the test server 120 allocates the found execution machine 130 corresponding to the idle execution machine identifier to the test task read from the task queue, and reads the information from the task queue. The test task is sent to the executed execution machine 130 corresponding to the found idle executable identifier. After the execution machine 130 receives the test task, the test task is executed to generate a test result.

本实施例中,在接收到各个终端在测试页面中创建的测试任务后,按照获取顺序将测试任务添加到任务队列中,读取任务队列中的测试任务,保证按照一定顺序读取测试任务,避免了测试任务拥塞导致测试任务长时间未被处理的情况。在读取到任务队列中的测试任务时,根据读取到的测试任务中的执行机数量从空闲执行机标识集合中查找空闲执行机标识,根据查找到的空闲执行机标识为测试任务分配空闲执行机标识对应的执行机,从而简化了测试任务执行机分配操作过程,快速准确地为测试任务分配执行机,提高了测试任务执行机分配效率。In this embodiment, after receiving the test task created by each terminal in the test page, the test task is added to the task queue according to the acquisition order, and the test task in the task queue is read to ensure that the test task is read in a certain order. This avoids the situation where the test task is congested and the test task is not processed for a long time. When the test task in the task queue is read, the idle execution machine identifier is searched from the idle execution machine identification set according to the number of execution machines in the read test task, and the idle task identifier is allocated according to the found idle execution machine identifier. Executing the corresponding machine of the machine identification, thereby simplifying the test task execution machine allocation operation process, quickly and accurately assigning the execution machine to the test task, and improving the test task execution machine allocation efficiency.

如图4所示,在一个实施例中,S310具体包括查找空闲执行机标识的步骤,该步骤具体包括以下内容:As shown in FIG. 4, in an embodiment, S310 specifically includes the step of searching for an idle execution machine identifier, and the step specifically includes the following content:

S402,根据执行机数量生成执行机调度请求。S402. Generate an execution machine scheduling request according to the number of execution machines.

具体地,测试服务器120在从读取到的测试任务中提取到执行机数量之后,将执行机数量封装在执行机调度请求中,测试服务器120还可以对执行机数量进行加密,并将加密后的执行机数量封装在执行机调度请求中。调度服务器对执行机的状态进行监测,获取处于空闲状态的执行机所对应的执行机标识,将获取到的执行机标识存储到空闲执行机标识集合中。Specifically, after the test server 120 extracts the number of execution machines from the read test tasks, the number of execution machines is encapsulated in the execution machine scheduling request, and the test server 120 can also encrypt the number of execution machines and encrypt the number of execution machines. The number of execution machines is encapsulated in the execution machine scheduling request. The scheduling server monitors the state of the execution machine, acquires the execution machine identifier corresponding to the execution machine in the idle state, and stores the obtained execution machine identifier in the idle execution machine identifier set.

S404,将执行机调度请求发送至调度服务器。S404. Send an execution schedule scheduling request to the scheduling server.

具体地,测试服务器120将执行调度请求发送至调度服务器后,开始计时,当所计时间达到预设时间时,则测试服务器120提取执行机调度请求,再次将执行机调度请求发送至调度服务器。Specifically, after the test server 120 sends the execution scheduling request to the scheduling server, the timing starts. When the calculated time reaches the preset time, the test server 120 extracts the execution machine scheduling request, and sends the execution machine scheduling request to the scheduling server again.

S406,接收调度服务器返回的空闲执行机标识,空闲执行机标识为调度服务器根据执行机调度请求在空闲执行机标识集合中查找得到。S406. Receive an idle execution machine identifier returned by the scheduling server, where the idle execution machine identifier is obtained by the scheduling server in the idle execution machine identifier set according to the execution machine scheduling request.

具体地,测试服务器120在根据执行机数量生成执行机调度请求后,将执行机调度请求发送至调度服务器,调度服务器存储着空闲执行机标识,空闲执行机标识构成空闲执行机标识集合。调度服务器在接收到执行机调度请求后,提取执行机调度请求中的执行机数量,根据执行机数量在空闲执行机标识集合中查找空闲执行机标识,调度服务器将查找到的空闲执行机标识发送至测试服务器120,查找到的空闲执行机标识的数量与提取到的执行机数量相等。Specifically, after the execution server scheduling request is generated according to the number of execution machines, the test server 120 sends an execution machine scheduling request to the scheduling server, where the scheduling server stores the idle execution machine identifier, and the idle execution machine identifier constitutes the idle execution machine identifier set. After receiving the execution machine scheduling request, the scheduling server extracts the number of execution machines in the execution machine scheduling request, searches for the idle execution machine identifier in the idle execution machine identification set according to the number of execution machines, and the scheduling server sends the found idle execution machine identifier. To the test server 120, the number of found idle performer IDs is equal to the number of extracted performers.

本实施例中,调度服务器接收到执行机调度请求后,调度服务器根据执行机调度请求中的执行机数量从空闲执行机标识集合中查找空闲执行机标识,接收调度服务器返回的查找到的空闲执行机标识,利用调度服务器查找空闲执行机标识,将查找到的空闲执行机标识对应的执行机分配给测试任务,提高了执行机的使用效率。In this embodiment, after the scheduling server receives the execution machine scheduling request, the scheduling server searches for the idle execution machine identifier from the idle execution machine identifier set according to the number of execution machines in the execution machine scheduling request, and receives the found idle execution returned by the scheduling server. The machine identifier is used to search for the idle execution machine identifier by using the dispatching server, and the executed execution machine corresponding to the idle idle machine identifier is allocated to the test task, thereby improving the use efficiency of the execution machine.

如图5所示,在一个实施例中,S312具体包括更新测试任务中执行机标识的步骤,该步骤具体包括以下内容:As shown in FIG. 5, in an embodiment, S312 specifically includes the step of updating the execution machine identifier in the test task, and the step specifically includes the following content:

S502,根据查找到的空闲执行机标识更新读取到的测试任务中的执行机标识。S502. Update the executable identifier in the read test task according to the found idle executable identifier.

具体地,测试服务器120检测到测试任务中有执行机标识时,则将测试任务中的执行机标识删除,将查找到的空闲执行机标识添加到测试任务中,得到更新后的测试任务;测试服务器120未检测到测试任务中有执行机标识时,则将查找到的空闲执行机标识添加到测试任务中,得到更新后的测试任务。Specifically, when the test server 120 detects that there is an execution machine identifier in the test task, the execution server identifier in the test task is deleted, and the found idle execution machine identifier is added to the test task to obtain the updated test task; When the server 120 does not detect that there is an execution machine identifier in the test task, the server finds the idle execution machine identifier to be added to the test task, and obtains the updated test task.

S504,将更新后的测试任务发送至调度服务器,使调度服务器提取更新后的测试任务中的空闲执行机标识,为更新后的测试任务分配提取到的空闲执行机标识对应的执行机。S504: Send the updated test task to the scheduling server, so that the scheduling server extracts the idle execution machine identifier in the updated test task, and allocates the extracted execution machine corresponding to the idle execution machine identifier to the updated test task.

具体地,测试服务器120将更新后的测试任务发送至调度服务器,调度服务器在接收到测试服务器120发送的测试任务后,对测试任务进行解析,提取测试任务中的空闲执行机标识,调度空闲执行机标识对应的执行机130,将执行机分配给测试任务,并将接收到的测试任务同步发送至空闲执行机标识对应的执行机,使执行机执行测试任务,并生成测试结果。Specifically, the test server 120 sends the updated test task to the scheduling server. After receiving the test task sent by the test server 120, the scheduling server parses the test task, extracts the idle execution machine identifier in the test task, and schedules idle execution. The execution machine 130 corresponding to the machine identifier assigns the execution machine to the test task, and synchronously sends the received test task to the execution machine corresponding to the idle execution machine identifier, so that the execution machine performs the test task and generates the test result.

在一个实施例中,更新后的测试任务中还可以包括验证信息,调度服务器接收到更新后的测试任务后,提取更新后的测试任务中的验证信息,对验证信息进行验证,在验证通过后,调度服务器提取更新后的测试任务中的空闲执行机标识,根据提取到的空闲执行标识为更新后的测试任务分配执行机。In an embodiment, the updated test task may further include verification information, and after receiving the updated test task, the scheduling server extracts the verification information in the updated test task, and verifies the verification information, after the verification is passed. The scheduling server extracts the idle execution machine identifier in the updated test task, and allocates an execution machine to the updated test task according to the extracted idle execution identifier.

本实施例中,根据查找到的空闲执行机标识更新读取到的测试任务中的执行机标识,在将更新后的测试任务发送至调度服务器后,使调度服务器根据测试任务中的空闲执行机标识为测试任务分配执行机,从而提高了分配执行机的速度和准确性。In this embodiment, the executable identifier in the read test task is updated according to the found idle execution machine identifier, and after the updated test task is sent to the scheduling server, the scheduling server is caused to perform the idle execution machine according to the test task. The identification assigns an actuator to the test task, which increases the speed and accuracy of the assigned actuator.

如图6所示,在一个实施例中,提供一种测试任务执行机分配方法,该方法具体还包括定期检测执行机的步骤,该步骤具体包括以下内容:As shown in FIG. 6, in an embodiment, a test task execution machine allocation method is provided. The method further includes the step of periodically detecting an execution machine, and the step specifically includes the following content:

S602,定期检测各执行机的资源占用率是否小于预设阈值。S602. Regularly check whether the resource occupancy rate of each execution machine is less than a preset threshold.

具体地,测试服务器120按照预设时长定期获取各执行机的资源占用率,将各执行机的资源占用率与预设阈值进行比较,当资源占用率小于预设阈值时,表示该执行机处于空闲状态;当资源占用率大于等于预设阈值时,表示该执行机处于执行测试任务的状态,未处于空闲状态。资源占用率具体可以是线程占用率。Specifically, the test server 120 periodically acquires the resource occupancy rate of each execution machine according to the preset duration, and compares the resource occupancy rate of each execution machine with a preset threshold. When the resource occupancy rate is less than the preset threshold, the execution server is in the The idle state; when the resource occupancy rate is greater than or equal to the preset threshold, it indicates that the execution machine is in a state of performing a test task, and is not in an idle state. The resource occupancy rate may specifically be a thread occupancy rate.

S604,当检测到执行机的资源占用率小于预设阈值时,提取检测到的执行机对应的执行机标识。S604. When it is detected that the resource occupancy rate of the execution machine is less than a preset threshold, extracting the detected execution machine identifier corresponding to the execution machine.

具体地,测试服务器120在检测到资源占用率小于预设阈值,为资源占用率小于预设阈值的执行机对应的执行机标识添加空闲标记,提取携带有空闲标记的执行机标识。Specifically, the test server 120 adds an idle flag to the executable identifier corresponding to the execution machine whose resource occupancy is less than the preset threshold, and extracts the identifier of the executable carrying the idle token.

S606,将提取到的执行机标识存储到空闲执行机标识集合中。S606. Store the extracted execution machine identifier into the idle execution machine identifier set.

具体地,测试服务器120将提取到的执行机标识存储到空闲执行机标识集合中作为空闲执行机标识。Specifically, the test server 120 stores the extracted execution machine identification into the idle execution machine identification set as the idle execution machine identification.

本实施例中,通过定期检测各执行机的资源占用率,通过比较各执行机的资源占用率与预设阈值来确定处于空闲状态的执行机,并提取空闲执行机的执行机标识,将提取到的执行机标识存储到空闲执行机标识集合中作为空闲执行机标识,从而使的空闲执行机可被再次分配,提高空闲执行机的利用效率。In this embodiment, by periodically detecting the resource occupancy rate of each execution machine, comparing the resource occupancy rate of each execution machine with a preset threshold to determine an execution machine in an idle state, and extracting an execution machine identifier of the idle execution machine, the extraction will be performed. The obtained execution machine identifier is stored in the idle execution machine identification set as the idle execution machine identification, so that the idle execution machine can be allocated again, improving the utilization efficiency of the idle execution machine.

如图7所示,在一个实施例中,提供一种测试任务执行机分配装置700,该装置具体包括:测试任务获取模块702、测试任务添加模块704、任务队列读取模块706、执行机数量提取模块708、执行机标识查找模块710和测试任务发送模块712。As shown in FIG. 7, in one embodiment, a test task execution device distribution device 700 is provided. The device specifically includes: a test task acquisition module 702, a test task addition module 704, a task queue reading module 706, and an execution machine number. The extraction module 708, the execution machine identification lookup module 710, and the test task transmission module 712.

测试任务获取模块702,用于获取各终端在测试页面中创建的测试任务。The test task obtaining module 702 is configured to obtain a test task created by each terminal in the test page.

测试任务添加模块704,用于按照获取顺序将测试任务添加到任务队列中。The test task adding module 704 is configured to add the test task to the task queue in the order of acquisition.

任务队列读取模块706,用于读取任务队列中的测试任务。The task queue reading module 706 is configured to read the test task in the task queue.

执行机数量提取模块708,用于从读取到的测试任务中提取执行机数量。The execution machine quantity extraction module 708 is configured to extract the number of execution machines from the read test tasks.

执行机标识查找模块710,用于根据执行机数量在空闲执行机标识集合中查找空闲执行机标识。The execution machine identifier finding module 710 is configured to search for an idle execution machine identifier in the idle execution machine identifier set according to the number of execution machines.

测试任务发送模块712,用于根据查找到的空闲执行机标识为所述测试任务分配执行机。The test task sending module 712 is configured to allocate an execution machine to the test task according to the found idle executable machine identifier.

本实施例中,在接收到各个终端在测试页面中创建的测试任务后,按照获取顺序将测试任务添加到任务队列中,读取任务队列中的测试任务,保证按照一定顺序读取测试任务,避免了测试任务拥塞导致测试任务长时间未被处理的情况。在读取到任务队列中的测试任务时,根据读取到的测试任务中的执行机数量从空闲执行机标识集合中查找空闲执行机标识,根据查找到的空闲执行机标识为测试任务分配空闲执行机标识对应的执行机,从而简化了测试任务执行机分配操作过程,快速准确地为测试任务分配执行机,提高了测试任务执行机分配效率。In this embodiment, after receiving the test task created by each terminal in the test page, the test task is added to the task queue according to the acquisition order, and the test task in the task queue is read to ensure that the test task is read in a certain order. This avoids the situation where the test task is congested and the test task is not processed for a long time. When the test task in the task queue is read, the idle execution machine identifier is searched from the idle execution machine identification set according to the number of execution machines in the read test task, and the idle task identifier is allocated according to the found idle execution machine identifier. Executing the corresponding machine of the machine identification, thereby simplifying the test task execution machine allocation operation process, quickly and accurately assigning the execution machine to the test task, and improving the test task execution machine allocation efficiency.

如图8所示,在一个实施例中,测试任务执行机分配装置700具体还包括:标识数量统计模块714、标识数量比较模块716和标识重新获取模块718。As shown in FIG. 8 , in one embodiment, the test task execution device allocation device 700 further includes an identifier quantity statistics module 714 , an identifier quantity comparison module 716 , and an identifier reacquisition module 718 .

标识数量统计模块714,用于统计空闲执行机标识集合中的标识数量。The identifier quantity statistics module 714 is configured to count the number of identifiers in the idle executable machine identifier set.

标识数量比较模块716,用于将执行机数量与标识数量比较。The identification quantity comparison module 716 is configured to compare the number of execution machines with the number of identifications.

标识重新获取模块718,用于在执行机数量大于标识数量时,重新获取处于空闲状态的执行机所对应的执行机标识,将获取到的执行机标识存储到空闲执行机标识集合中。The identifier re-acquisition module 718 is configured to re-acquire the execution machine identifier corresponding to the execution machine in the idle state when the number of execution machines is greater than the number of identifiers, and store the acquired execution machine identifier into the idle execution machine identifier set.

本实施例中,在统计空闲执行机标识集合中的标识数量后,将测试任务所需的执行机数量与统计的标识数量进行比较,在执行机数量大于标识数量时,重新获取处于空闲状态的执行机所对应的执行机标识,将获取到的执行机标识存储到空闲执行机标识集合中,使空闲执行机标识集合中有足够的空闲执行机标识,保证有足够多的处于空闲状态的执行机可以被分配到测试任务,提高了执行机的利用率,也提高了为测试任务分配执行机的成功率。In this embodiment, after counting the number of identifiers in the idle execution machine identifier set, the number of execution machines required for the test task is compared with the number of statistical identifiers, and when the number of execution machines is greater than the number of identifiers, re-acquiring the idle state. Executing the machine identifier corresponding to the execution machine, storing the obtained execution machine identifier into the idle execution machine identifier set, so that there are enough idle execution machine identifiers in the idle execution machine identifier set, and ensuring that there are enough executions in the idle state. Machines can be assigned to test tasks, increasing the utilization of the actuators and increasing the success rate of assigning actuators to test tasks.

如图9所示,在一个实施例中,执行机标识查找模块710具体包括:调度请求生成模块710a、调度请求发送模块710b和执行机标识接收模块710c。As shown in FIG. 9, in an embodiment, the execution machine identification lookup module 710 specifically includes a scheduling request generation module 710a, a scheduling request sending module 710b, and an execution machine identification receiving module 710c.

调度请求生成模块710a,用于根据执行机数量生成执行机调度请求。The scheduling request generating module 710a is configured to generate an execution machine scheduling request according to the number of executing machines.

调度请求发送模块710b,用于将执行机调度请求发送至调度服务器。The scheduling request sending module 710b is configured to send an execution machine scheduling request to the scheduling server.

执行机标识接收模块710c,用于接收调度服务器返回的空闲执行机标识,空闲执行机标识为调度服务器根据执行机调度请求在空闲执行机标识集合中查找得到。The execution machine identifier receiving module 710c is configured to receive the idle execution machine identifier returned by the scheduling server, where the idle execution machine identifier is obtained by the scheduling server in the idle execution machine identifier set according to the execution machine scheduling request.

本实施例中,调度服务器接收到执行机调度请求后,调度服务器根据执行机调度请求中的执行机数量从空闲执行机标识集合中查找空闲执行机标识,接收调度服务器返回的查找到的空闲执行机标识,利用调度服务器查找空闲执行机标识,将查找到的空闲执行机标识对应的执行机分配给测试任务,提高了执行机的使用效率。In this embodiment, after the scheduling server receives the execution machine scheduling request, the scheduling server searches for the idle execution machine identifier from the idle execution machine identifier set according to the number of execution machines in the execution machine scheduling request, and receives the found idle execution returned by the scheduling server. The machine identifier is used to search for the idle execution machine identifier by using the dispatching server, and the executed execution machine corresponding to the idle idle machine identifier is allocated to the test task, thereby improving the use efficiency of the execution machine.

如图10所示,在一个实施例中,测试任务发送模块712具体包括:测试任务更新模块712a和测试任务同步模块712b。As shown in FIG. 10, in one embodiment, the test task sending module 712 specifically includes a test task update module 712a and a test task synchronization module 712b.

测试任务更新模块712a,用于根据查找到的空闲执行机标识更新测试任务中的执行机标识。The test task update module 712a is configured to update the execution machine identifier in the test task according to the found idle executable machine identifier.

测试任务同步模块712b,用于将更新后的测试任务发送至调度服务器,使调度服务器提取更新后的测试任务中的空闲执行机标识,为所述更新后的测试任务分配提取到的空闲执行机标识对应的执行机。The test task synchronization module 712b is configured to send the updated test task to the scheduling server, so that the scheduling server extracts the idle execution machine identifier in the updated test task, and allocates the extracted idle execution machine to the updated test task. Identify the corresponding actuator.

本实施例中,根据查找到的空闲执行机标识更新读取到的测试任务中的执行机标识,在将更新后的测试任务发送至调度服务器后,使调度服务器根据测试任务中的空闲执行机标识为测试任务分配执行机,从而提高了分配执行机的速度和准确性。In this embodiment, the executable identifier in the read test task is updated according to the found idle execution machine identifier, and after the updated test task is sent to the scheduling server, the scheduling server is caused to perform the idle execution machine according to the test task. The identification assigns an actuator to the test task, which increases the speed and accuracy of the assigned actuator.

如图11所示,在一个实施例中,测试任务执行机分配装置700具体还包括:执行机检测模块720、执行机标识提取模块722和执行机标识存储模块724。As shown in FIG. 11 , in one embodiment, the test task execution device allocation device 700 further includes an execution machine detection module 720 , an execution machine identification extraction module 722 , and an execution machine identification storage module 724 .

执行机检测模块720,用于定期检测各执行机的资源占用率是否小于预设阈值。The execution machine detection module 720 is configured to periodically detect whether the resource occupancy rate of each execution machine is less than a preset threshold.

执行机标识提取模块722,用于当检测到执行机的资源占用率小于预设阈值时,提取检测到的执行机对应的执行机标识;The execution machine identifier extraction module 722 is configured to: when detecting that the resource occupancy rate of the execution machine is less than a preset threshold, extract the detected execution machine identifier corresponding to the execution machine;

执行机标识存储模块724,用于将提取到的执行机标识存储到空闲执行机标识集合中。The executable identifier storage module 724 is configured to store the extracted executable identifier into the idle executable identifier set.

本实施例中,通过定期检测各执行机的资源占用率,通过比较各执行机的资源占用率与预设阈值来确定处于空闲状态的执行机,并提取空闲执行机的执行机标识,将提取到的执行机标识存储到空闲执行机标识集合中作为空闲执行机标识,从而使的空闲执行机被再次分配,提高空闲执行机的利用效率。In this embodiment, by periodically detecting the resource occupancy rate of each execution machine, comparing the resource occupancy rate of each execution machine with a preset threshold to determine an execution machine in an idle state, and extracting an execution machine identifier of the idle execution machine, the extraction will be performed. The obtained execution machine identifier is stored in the idle execution machine identification set as the idle execution machine identification, so that the idle execution machine is allocated again, and the utilization efficiency of the idle execution machine is improved.

上述测试任务执行机分配装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。其中,网络接口可以是以太网或无线网卡等。上述各模块可以硬件形式内嵌于或独立于服务器中的处理器中,也可以以软件形式存储于服务器的存储器中,以便于处理器调用执行以上各个模块对应的操作。该处理器可以为中央处理单元(CPU)、微处理器、单片机等。Each of the above-described test task actuator distribution devices may be implemented in whole or in part by software, hardware, and combinations thereof. The network interface may be an Ethernet or a wireless network card. Each of the above modules may be embedded in a hardware form or independent of a processor in the server, or may be stored in a memory of the server in a software form, so that the processor calls to perform operations corresponding to the above modules. The processor can be a central processing unit (CPU), a microprocessor, a microcontroller, or the like.

本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)或随机存储记忆体(Random Access Memory,RAM)等。One of ordinary skill in the art can understand that all or part of the process of implementing the foregoing embodiments can be completed by a computer program to instruct related hardware, and the program can be stored in a computer readable storage medium. When executed, the flow of an embodiment of the methods as described above may be included. The storage medium may be a magnetic disk, an optical disk, or a read-only storage memory (Read-Only) Memory, ROM) or Random Access Memory (RAM).

以上所述实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above-described embodiments may be arbitrarily combined. For the sake of brevity of description, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction between the combinations of these technical features, All should be considered as the scope of this manual.

上述内容,仅为本申请的较佳实施例,并非用于限制本申请的实施方案,本领域普通技术人员根据本申请的主要构思和精神,可以十分方便地进行相应的变通或修改,故本申请的保护范围应以权利要求书所要求的保护范围为准。The above is only the preferred embodiment of the present application, and is not intended to limit the embodiments of the present application. Those skilled in the art can make corresponding modifications or modifications in accordance with the main concepts and spirit of the present application. The scope of protection of the application shall be subject to the scope of protection required by the claims.

Claims (20)

一种测试任务执行机的分配方法,包括:A method for distributing test task execution machines, including: 获取各终端在测试页面中创建的测试任务;Obtain test tasks created by each terminal in the test page; 按照获取顺序将所述测试任务添加到任务队列中;Add the test task to the task queue in the order of acquisition; 读取所述任务队列中的测试任务;Reading test tasks in the task queue; 从读取到的测试任务中提取执行机数量;Extract the number of execution machines from the read test tasks; 根据所述执行机数量在空闲执行机标识集合中查找空闲执行机标识;及Finding an idle execution machine identifier in the idle execution machine identification set according to the number of execution machines; and 根据查找到的空闲执行机标识为所述读取到的测试任务分配执行机。The execution machine is assigned to the read test task according to the found idle execution machine identifier. 根据权利要求1所述的方法,其特征在于,所述根据所述执行机数量在空闲执行机标识集合中查找空闲执行机标识之前,所述方法还包括:The method according to claim 1, wherein the method further includes: before the finding the idle execution machine identifier in the idle execution machine identifier set according to the number of the execution machines, the method further comprises: 统计空闲执行机标识集合中的标识数量;Counting the number of identifiers in the idle executable identifier set; 将所述执行机数量与所述标识数量比较;及Comparing the number of the execution machines with the number of the identifications; and 若所述执行机数量大于所述标识数量,则重新获取处于空闲状态的执行机所对应的执行机标识,将获取到的执行机标识存储到所述空闲执行机标识集合中。If the number of the execution machines is greater than the number of the identifiers, the execution machine identifier corresponding to the execution machine in the idle state is re-acquired, and the obtained execution machine identifier is stored in the idle execution machine identifier set. 根据权利要求1所述的方法,其特征在于,所述根据所述执行机数量在空闲执行机标识集合中查找空闲执行机标识,包括:The method according to claim 1, wherein the finding an idle execution machine identifier in the idle execution machine identification set according to the number of execution machines comprises: 根据所述执行机数量生成执行机调度请求;Generating an execution machine scheduling request according to the number of execution machines; 将所述执行机调度请求发送至调度服务器;及Transmitting the execution machine scheduling request to a scheduling server; and 接收所述调度服务器返回的空闲执行机标识,所述空闲执行机标识为所述调度服务器根据所述执行机调度请求在空闲执行机标识集合中查找得到。Receiving an idle execution machine identifier returned by the scheduling server, where the idle execution machine identifier is obtained by the scheduling server in the idle execution machine identifier set according to the execution machine scheduling request. 根据权利要求1所述的方法,其特征在于,所述根据查找到的空闲执行机标识为所述读取到的测试任务分配执行机,包括:The method according to claim 1, wherein the assigning an execution machine to the read test task according to the found idle execution machine identifier comprises: 根据查找到的空闲执行机标识更新所述读取到的测试任务中的执行机标识;及Updating the executable identifier in the read test task according to the found idle executable identifier; and 将更新后的测试任务发送至调度服务器,使调度服务器提取所述更新后的测试任务中的空闲执行机标识,为所述更新后的测试任务分配提取到的空闲执行机标识对应的执行机。The updated test task is sent to the scheduling server, so that the scheduling server extracts the idle execution machine identifier in the updated test task, and allocates the extracted execution machine corresponding to the idle execution machine identifier to the updated test task. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method of claim 1 further comprising: 定期检测各执行机的资源占用率是否小于预设阈值;Regularly check whether the resource occupancy rate of each execution machine is less than a preset threshold; 当检测到执行机的资源占用率小于预设阈值时,提取所述检测到的执行机对应的执行机标识;及Extracting an execution machine identifier corresponding to the detected execution machine when detecting that the resource occupancy rate of the execution machine is less than a preset threshold; and 将提取到的执行机标识存储到所述空闲执行机标识集合中。The extracted execution machine identification is stored in the idle execution machine identification set. 一种测试任务执行机分配装置,包括:A test task actuator distribution device comprising: 测试任务获取模块,用于获取各终端在测试页面中创建的测试任务;The test task obtaining module is configured to obtain a test task created by each terminal in the test page; 测试任务添加模块,用于按照获取顺序将所述测试任务添加到任务队列中;a test task adding module, configured to add the test task to the task queue according to the obtaining order; 任务队列读取模块,用于读取所述任务队列中的测试任务;a task queue reading module, configured to read a test task in the task queue; 执行机数量提取模块,用于从读取到的测试任务中提取执行机数量;An execution quantity extraction module for extracting the number of execution machines from the read test tasks; 执行机标识查找模块,用于根据所述执行机数量在空闲执行机标识集合中查找空闲执行机标识;及An execution identifier identification module, configured to search for an idle execution machine identifier in the idle execution machine identifier set according to the number of execution machines; and 测试任务发送模块,用于根据查找到的空闲执行机标识为所述测试任务分配执行机。The test task sending module is configured to allocate an execution machine to the test task according to the found idle executable machine identifier. 根据权利要求6所述的装置,其特征在于,还包括:The device according to claim 6, further comprising: 标识数量统计模块,用于统计空闲执行机标识集合中的标识数量;An identifier quantity statistics module, configured to count the number of identifiers in the idle executable identifier set; 标识数量比较模块,用于将所述执行机数量与所述标识数量比较;及An identifier quantity comparison module, configured to compare the number of the execution machines with the number of the identifiers; and 标识重新获取模块,用于在所述执行机数量大于所述标识数量时,重新获取处于空闲状态的执行机所对应的执行机标识,将获取到的执行机标识存储到所述空闲执行机标识集合中。And an identifier re-acquisition module, configured to: when the number of the execution machines is greater than the number of the identifiers, re-acquire the identifier of the execution machine corresponding to the execution machine in the idle state, and store the acquired execution machine identifier to the idle execution machine identifier. In the collection. 根据权利要求6所述的装置,其特征在于,所述执行机标识查找模块包括:The device according to claim 6, wherein the execution device identification lookup module comprises: 调度请求生成模块,用于根据所述执行机数量生成执行机调度请求;a scheduling request generating module, configured to generate an execution machine scheduling request according to the number of executing machines; 调度请求发送模块,用于将所述执行机调度请求发送至调度服务器;及a scheduling request sending module, configured to send the execution machine scheduling request to a scheduling server; and 执行机标识接收模块,用于接收所述调度服务器返回的空闲执行机标识,所述空闲执行机标识为所述调度服务器根据所述执行机调度请求在空闲执行机标识集合中查找得到。The execution machine identifier receiving module is configured to receive an idle execution machine identifier returned by the scheduling server, where the idle execution machine identifier is obtained by the scheduling server in the idle execution machine identifier set according to the execution machine scheduling request. 根据权利要求6所述的装置,其特征在于,所述测试任务发送模块包括:The device according to claim 6, wherein the test task sending module comprises: 测试任务更新模块,用于根据查找到的空闲执行机标识更新所述测试任务中的执行机标识;及a test task update module, configured to update an executable identifier in the test task according to the found idle executable identifier; and 测试任务同步模块,用于将更新后的测试任务发送至调度服务器,使调度服务器提取所述更新后的测试任务中的空闲执行机标识,为所述更新后的测试任务分配提取到的空闲执行机标识对应的执行机。a test task synchronization module, configured to send the updated test task to the scheduling server, so that the scheduling server extracts the idle execution machine identifier in the updated test task, and allocates the extracted idle execution to the updated test task. The machine corresponds to the actuator. 根据权利要求6所述的装置,其特征在于,还包括:The device according to claim 6, further comprising: 执行机检测模块,用于定期检测各执行机的资源占用率是否小于预设阈值;The machine detection module is configured to periodically check whether the resource occupancy rate of each execution machine is less than a preset threshold; 执行机标识提取模块,用于当检测到执行机的资源占用率小于预设阈值时,提取所述检测到的执行机对应的执行机标识;及The execution machine identifier extraction module is configured to: when detecting that the resource occupancy rate of the execution machine is less than a preset threshold, extract an execution machine identifier corresponding to the detected execution machine; and 执行机标识存储模块,用于将提取到的执行机标识存储到所述空闲执行机标识集合中。The executable identifier storage module is configured to store the extracted executable identifier into the idle executable identifier set. 一种服务器,包括存储器和处理器,所述存储器中存储有计算机可执行指令,所述计算机可执行指令被所述处理器执行时,使得所述处理器执行以下步骤:A server comprising a memory and a processor, the memory storing computer executable instructions, the computer executable instructions being executed by the processor, such that the processor performs the following steps: 获取各终端在测试页面中创建的测试任务;Obtain test tasks created by each terminal in the test page; 按照获取顺序将所述测试任务添加到任务队列中;Add the test task to the task queue in the order of acquisition; 读取所述任务队列中的测试任务;Reading test tasks in the task queue; 从读取到的测试任务中提取执行机数量;Extract the number of execution machines from the read test tasks; 根据所述执行机数量在空闲执行机标识集合中查找空闲执行机标识;及Finding an idle execution machine identifier in the idle execution machine identification set according to the number of execution machines; and 根据查找到的空闲执行机标识为所述读取到的测试任务分配执行机。The execution machine is assigned to the read test task according to the found idle execution machine identifier. 根据权利要求11所述的服务器,其特征在于,所述根据所述执行机数量在空闲执行机标识集合中查找空闲执行机标识之前,所述计算机可执行指令被所述处理器执行时,还使得所述处理器执行以下步骤:The server according to claim 11, wherein said computer executable instructions are executed by said processor before said idle execution machine identification is found in said idle execution machine identification set according to said number of execution machines Having the processor perform the following steps: 统计空闲执行机标识集合中的标识数量;Counting the number of identifiers in the idle executable identifier set; 将所述执行机数量与所述标识数量比较;及Comparing the number of the execution machines with the number of the identifications; and 若所述执行机数量大于所述标识数量,则重新获取处于空闲状态的执行机所对应的执行机标识,将获取到的执行机标识存储到所述空闲执行机标识集合中。If the number of the execution machines is greater than the number of the identifiers, the execution machine identifier corresponding to the execution machine in the idle state is re-acquired, and the obtained execution machine identifier is stored in the idle execution machine identifier set. 根据权利要求11所述的服务器,其特征在于,所述根据所述执行机数量在空闲执行机标识集合中查找空闲执行机标识,包括:The server according to claim 11, wherein the finding an idle execution machine identifier in the idle execution machine identifier set according to the number of execution machines comprises: 根据所述执行机数量生成执行机调度请求;Generating an execution machine scheduling request according to the number of execution machines; 将所述执行机调度请求发送至调度服务器;及Transmitting the execution machine scheduling request to a scheduling server; and 接收所述调度服务器返回的空闲执行机标识,所述空闲执行机标识为所述调度服务器根据所述执行机调度请求在空闲执行机标识集合中查找得到。Receiving an idle execution machine identifier returned by the scheduling server, where the idle execution machine identifier is obtained by the scheduling server in the idle execution machine identifier set according to the execution machine scheduling request. 根据权利要求11所述的服务器,其特征在于,所述根据查找到的空闲执行机标识为所述读取到的测试任务分配执行机,包括:The server according to claim 11, wherein the assigning an execution machine to the read test task according to the found idle execution machine identifier comprises: 根据查找到的空闲执行机标识更新所述读取到的测试任务中的执行机标识;及Updating the executable identifier in the read test task according to the found idle executable identifier; and 将更新后的测试任务发送至调度服务器,使调度服务器提取所述更新后的测试任务中的空闲执行机标识,为所述更新后的测试任务分配提取到的空闲执行机标识对应的执行机。The updated test task is sent to the scheduling server, so that the scheduling server extracts the idle execution machine identifier in the updated test task, and allocates the extracted execution machine corresponding to the idle execution machine identifier to the updated test task. 根据权利要求11所述的服务器,其特征在于,所述计算机可执行指令被所述处理器执行时,还使得所述处理器执行以下步骤:The server of claim 11 wherein said computer executable instructions, when executed by said processor, further cause said processor to perform the steps of: 定期检测各执行机的资源占用率是否小于预设阈值;Regularly check whether the resource occupancy rate of each execution machine is less than a preset threshold; 当检测到执行机的资源占用率小于预设阈值时,提取所述检测到的执行机对应的执行机标识;及Extracting an execution machine identifier corresponding to the detected execution machine when detecting that the resource occupancy rate of the execution machine is less than a preset threshold; and 将提取到的执行机标识存储到所述空闲执行机标识集合中。The extracted execution machine identification is stored in the idle execution machine identification set. 一个或多个存储有计算机可执行指令的非易失性存储介质,所述计算机可执行指令被一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:One or more non-volatile storage media storing computer-executable instructions, when executed by one or more processors, cause the one or more processors to perform the following steps: 获取各终端在测试页面中创建的测试任务;Obtain test tasks created by each terminal in the test page; 按照获取顺序将所述测试任务添加到任务队列中;Add the test task to the task queue in the order of acquisition; 读取所述任务队列中的测试任务;Reading test tasks in the task queue; 从读取到的测试任务中提取执行机数量;Extract the number of execution machines from the read test tasks; 根据所述执行机数量在空闲执行机标识集合中查找空闲执行机标识;及Finding an idle execution machine identifier in the idle execution machine identification set according to the number of execution machines; and 根据查找到的空闲执行机标识为所述读取到的测试任务分配执行机。The execution machine is assigned to the read test task according to the found idle execution machine identifier. 根据权利要求16所述的非易失性存储介质,其特征在于,所述根据所述执行机数量在空闲执行机标识集合中查找空闲执行机标识之前,所述计算机可执行指令被一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:The non-volatile storage medium according to claim 16, wherein said computer executable instructions are one or more prior to finding an idle execution machine identifier in the idle execution machine identification set according to said number of execution machines When the processors are executed, the one or more processors are caused to perform the following steps: 统计空闲执行机标识集合中的标识数量;Counting the number of identifiers in the idle executable identifier set; 将所述执行机数量与所述标识数量比较;及Comparing the number of the execution machines with the number of the identifications; and 若所述执行机数量大于所述标识数量,则重新获取处于空闲状态的执行机所对应的执行机标识,将获取到的执行机标识存储到所述空闲执行机标识集合中。If the number of the execution machines is greater than the number of the identifiers, the execution machine identifier corresponding to the execution machine in the idle state is re-acquired, and the obtained execution machine identifier is stored in the idle execution machine identifier set. 根据权利要求16所述的非易失性存储介质,其特征在于,所述根据所述执行机数量在空闲执行机标识集合中查找空闲执行机标识,包括:The non-volatile storage medium according to claim 16, wherein the finding the idle execution machine identifier in the idle execution machine identifier set according to the number of execution machines comprises: 根据所述执行机数量生成执行机调度请求;Generating an execution machine scheduling request according to the number of execution machines; 将所述执行机调度请求发送至调度服务器;及Transmitting the execution machine scheduling request to a scheduling server; and 接收所述调度服务器返回的空闲执行机标识,所述空闲执行机标识为所述调度服务器根据所述执行机调度请求在空闲执行机标识集合中查找得到。Receiving an idle execution machine identifier returned by the scheduling server, where the idle execution machine identifier is obtained by the scheduling server in the idle execution machine identifier set according to the execution machine scheduling request. 根据权利要求16所述的非易失性存储介质,其特征在于,所述根据查找到的空闲执行机标识为所述读取到的测试任务分配执行机,包括:The non-volatile storage medium according to claim 16, wherein the assigning an execution machine to the read test task according to the found idle execution machine identifier comprises: 根据查找到的空闲执行机标识更新所述读取到的测试任务中的执行机标识;及Updating the executable identifier in the read test task according to the found idle executable identifier; and 将更新后的测试任务发送至调度服务器,使调度服务器提取所述更新后的测试任务中的空闲执行机标识,为所述更新后的测试任务分配提取到的空闲执行机标识对应的执行机。The updated test task is sent to the scheduling server, so that the scheduling server extracts the idle execution machine identifier in the updated test task, and allocates the extracted execution machine corresponding to the idle execution machine identifier to the updated test task. 根据权利要求16所述的非易失性存储介质,其特征在于,所述计算机可执行指令被一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:The non-volatile storage medium of claim 16, wherein the computer-executable instructions are executed by one or more processors such that the one or more processors perform the following steps: 定期检测各执行机的资源占用率是否小于预设阈值;Regularly check whether the resource occupancy rate of each execution machine is less than a preset threshold; 当检测到执行机的资源占用率小于预设阈值时,提取所述检测到的执行机对应的执行机标识;及Extracting an execution machine identifier corresponding to the detected execution machine when detecting that the resource occupancy rate of the execution machine is less than a preset threshold; and 将提取到的执行机标识存储到所述空闲执行机标识集合中。The extracted execution machine identification is stored in the idle execution machine identification set.
PCT/CN2017/079641 2016-08-22 2017-04-07 Test task executor assignment method, device, server and storage medium Ceased WO2018036167A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610704227.3A CN106452830A (en) 2016-08-22 2016-08-22 Test task execution machine distribution method and device
CN201610704227.3 2016-08-22

Publications (1)

Publication Number Publication Date
WO2018036167A1 true WO2018036167A1 (en) 2018-03-01

Family

ID=58182533

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/079641 Ceased WO2018036167A1 (en) 2016-08-22 2017-04-07 Test task executor assignment method, device, server and storage medium

Country Status (2)

Country Link
CN (1) CN106452830A (en)
WO (1) WO2018036167A1 (en)

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110083528A (en) * 2019-03-19 2019-08-02 深圳壹账通智能科技有限公司 Distribution method, device, computer equipment and the storage medium of test assignment
CN110162481A (en) * 2019-05-31 2019-08-23 北京星网锐捷网络技术有限公司 A kind of method for testing software, device, equipment and storage medium
CN110489222A (en) * 2019-08-22 2019-11-22 深圳前海微众银行股份有限公司 Method for scheduling task, system, cluster server and readable storage medium storing program for executing
CN110716876A (en) * 2019-09-30 2020-01-21 国核自仪系统工程有限公司 Test platform and test method for automatically verifying programmable logic code
CN111159046A (en) * 2019-12-31 2020-05-15 斑马网络技术有限公司 Test methods, apparatus, electronic equipment, systems and storage media
CN112579269A (en) * 2020-12-04 2021-03-30 深圳前海微众银行股份有限公司 Timed task processing method and device
CN113722237A (en) * 2021-11-01 2021-11-30 荣耀终端有限公司 Device testing method and electronic device
CN114024735A (en) * 2021-11-02 2022-02-08 北京天融信网络安全技术有限公司 Multi-task parallel feature library testing method and device
CN114064225A (en) * 2020-07-31 2022-02-18 中移(苏州)软件技术有限公司 Self-adaptive scheduling method, device, computer storage medium and system
CN114880235A (en) * 2022-05-20 2022-08-09 统信软件技术有限公司 Test case execution method, computing device and storage medium
CN114900574A (en) * 2022-05-17 2022-08-12 浪潮软件集团有限公司 A daily inspection method and system based on multiple devices and multiple apps
CN115297024A (en) * 2022-08-19 2022-11-04 山石网科通信技术股份有限公司 Performance test method and device of network security equipment and electronic equipment
CN115757152A (en) * 2022-11-23 2023-03-07 五八同城信息技术有限公司 Data processing method and device, electronic equipment and storage medium
CN118331841A (en) * 2023-12-21 2024-07-12 深圳市智慧城市科技发展集团有限公司 Test engine management method, device and readable storage medium

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106452830A (en) * 2016-08-22 2017-02-22 平安科技(深圳)有限公司 Test task execution machine distribution method and device
CN107291621A (en) * 2017-07-07 2017-10-24 恒生电子股份有限公司 Processing method, processing unit, medium and the electronic equipment of test case
CN107943686A (en) * 2017-10-30 2018-04-20 北京奇虎科技有限公司 A kind of test dispatching method, apparatus, server and storage medium
CN108763085A (en) * 2018-05-31 2018-11-06 平安科技(深圳)有限公司 On-line debugging device, method and the computer readable storage medium of test cases
CN109165158B (en) * 2018-08-03 2022-11-04 北京奇虎科技有限公司 Method and device for scheduling test cases, computing equipment and computer storage medium
CN109194538B (en) * 2018-08-03 2022-03-25 平安科技(深圳)有限公司 Testing method, device, server and storage medium based on distributed coordination
CN109032784A (en) * 2018-08-07 2018-12-18 郑州云海信息技术有限公司 A kind of multi-task parallel construction method and device
CN110096416B (en) * 2019-03-13 2022-07-08 中国平安人寿保险股份有限公司 Abnormity warning method and device, computer device and readable storage medium
CN110046081A (en) * 2019-03-18 2019-07-23 平安普惠企业管理有限公司 Performance test methods, performance testing device, electronic equipment and storage medium
CN112597030B (en) * 2020-12-26 2024-09-17 中国农业银行股份有限公司 A task publishing method and device, execution method and device, and system
CN112799953A (en) * 2021-02-08 2021-05-14 北京字节跳动网络技术有限公司 Interface testing method and device, computer equipment and storage medium
CN115796476A (en) * 2022-10-28 2023-03-14 中车工业研究院有限公司 Design task review method and device
CN118585308B (en) * 2024-07-30 2024-11-26 苏州元脑智能科技有限公司 Test method, device, system, electronic device and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101246439A (en) * 2008-03-18 2008-08-20 中兴通讯股份有限公司 A method and system for automated testing based on task scheduling
CN101719097A (en) * 2009-12-24 2010-06-02 深圳市金蝶移动互联技术有限公司 Debug method and system of automation test script and automation application server
CN103425536A (en) * 2013-08-26 2013-12-04 中国科学院软件研究所 Test resource management method oriented towards distributed system performance tests
CN103530231A (en) * 2013-10-12 2014-01-22 北京京东尚科信息技术有限公司 Application program testing method and system based on service process control
US20150180950A1 (en) * 2013-12-19 2015-06-25 International Business Machines Corporation Test management using distributed computing
CN105183564A (en) * 2015-09-30 2015-12-23 北京奇虎科技有限公司 Equipment scheduling method, device and system based on cloud testing platform
CN106452830A (en) * 2016-08-22 2017-02-22 平安科技(深圳)有限公司 Test task execution machine distribution method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9218261B2 (en) * 2013-09-18 2015-12-22 Bank Of America Corporation Test case execution

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101246439A (en) * 2008-03-18 2008-08-20 中兴通讯股份有限公司 A method and system for automated testing based on task scheduling
CN101719097A (en) * 2009-12-24 2010-06-02 深圳市金蝶移动互联技术有限公司 Debug method and system of automation test script and automation application server
CN103425536A (en) * 2013-08-26 2013-12-04 中国科学院软件研究所 Test resource management method oriented towards distributed system performance tests
CN103530231A (en) * 2013-10-12 2014-01-22 北京京东尚科信息技术有限公司 Application program testing method and system based on service process control
US20150180950A1 (en) * 2013-12-19 2015-06-25 International Business Machines Corporation Test management using distributed computing
CN105183564A (en) * 2015-09-30 2015-12-23 北京奇虎科技有限公司 Equipment scheduling method, device and system based on cloud testing platform
CN106452830A (en) * 2016-08-22 2017-02-22 平安科技(深圳)有限公司 Test task execution machine distribution method and device

Cited By (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110083528A (en) * 2019-03-19 2019-08-02 深圳壹账通智能科技有限公司 Distribution method, device, computer equipment and the storage medium of test assignment
CN110162481A (en) * 2019-05-31 2019-08-23 北京星网锐捷网络技术有限公司 A kind of method for testing software, device, equipment and storage medium
CN110489222A (en) * 2019-08-22 2019-11-22 深圳前海微众银行股份有限公司 Method for scheduling task, system, cluster server and readable storage medium storing program for executing
CN110716876A (en) * 2019-09-30 2020-01-21 国核自仪系统工程有限公司 Test platform and test method for automatically verifying programmable logic code
CN111159046B (en) * 2019-12-31 2024-04-09 斑马网络技术有限公司 Test method, test device, electronic equipment, test system and storage medium
CN111159046A (en) * 2019-12-31 2020-05-15 斑马网络技术有限公司 Test methods, apparatus, electronic equipment, systems and storage media
CN114064225A (en) * 2020-07-31 2022-02-18 中移(苏州)软件技术有限公司 Self-adaptive scheduling method, device, computer storage medium and system
CN112579269A (en) * 2020-12-04 2021-03-30 深圳前海微众银行股份有限公司 Timed task processing method and device
CN112579269B (en) * 2020-12-04 2024-07-02 深圳前海微众银行股份有限公司 Timing task processing method and device
CN113722237A (en) * 2021-11-01 2021-11-30 荣耀终端有限公司 Device testing method and electronic device
CN113722237B (en) * 2021-11-01 2022-02-08 荣耀终端有限公司 Device testing method and electronic device
CN114024735A (en) * 2021-11-02 2022-02-08 北京天融信网络安全技术有限公司 Multi-task parallel feature library testing method and device
CN114024735B (en) * 2021-11-02 2024-02-02 北京天融信网络安全技术有限公司 Multi-task parallel feature library testing method and device
CN114900574A (en) * 2022-05-17 2022-08-12 浪潮软件集团有限公司 A daily inspection method and system based on multiple devices and multiple apps
CN114880235A (en) * 2022-05-20 2022-08-09 统信软件技术有限公司 Test case execution method, computing device and storage medium
CN115297024A (en) * 2022-08-19 2022-11-04 山石网科通信技术股份有限公司 Performance test method and device of network security equipment and electronic equipment
CN115297024B (en) * 2022-08-19 2024-02-06 山石网科通信技术股份有限公司 Performance test method and device of network security equipment and electronic equipment
CN115757152A (en) * 2022-11-23 2023-03-07 五八同城信息技术有限公司 Data processing method and device, electronic equipment and storage medium
CN118331841A (en) * 2023-12-21 2024-07-12 深圳市智慧城市科技发展集团有限公司 Test engine management method, device and readable storage medium

Also Published As

Publication number Publication date
CN106452830A (en) 2017-02-22

Similar Documents

Publication Publication Date Title
WO2018036167A1 (en) Test task executor assignment method, device, server and storage medium
WO2018014580A1 (en) Data interface test method and apparatus, and server and storage medium
WO2018036168A1 (en) Method and device for executing data processing task, execution server, and storage medium
WO2020253116A1 (en) Batch data execution method, device, storage medium, and member host in cluster
WO2020224246A1 (en) Block chain-based data management method and apparatus, device and storage medium
WO2020224249A1 (en) Blockchain-based transaction processing method, device and apparatus, and storage medium
WO2018103315A1 (en) Monitoring data processing method, apparatus, server and storage equipment
WO2021034024A1 (en) Electronic apparatus and method for controlling thereof
WO2020186787A1 (en) Intelligent task scheduling method, device and apparatus and storage medium
WO2011105860A2 (en) Method and apparatus for generating minimum boot image
WO2016190476A1 (en) Method for managing encryption key for cloud service and apparatus thereof
WO2015062220A1 (en) Parallel transmission method and system on wireless links of different types
WO2020147264A1 (en) Method, apparatus and device for monitoring multi-system log data, and readable storage medium
WO2021072881A1 (en) Object storage-based request processing method, apparatus and device, and storage medium
WO2014044136A1 (en) Distributed data-based concurrent processing method and system, and computer storage medium
WO2015156596A1 (en) Hardware-based memory management apparatus and memory management method thereof
WO2020237859A1 (en) Data migration method employing nbd device, apparatus, device, and storage medium
WO2018227772A1 (en) Automatic teller machine control updating method and apparatus, computer device and storage medium
WO2018035929A1 (en) Method and apparatus for processing verification code
WO2020224251A1 (en) Block chain transaction processing method, device, apparatus and storage medium
WO2017157125A1 (en) Method and apparatus for deleting cloud host in cloud computing environment, server and storage medium
WO2021051492A1 (en) Database service node switching method, apparatus and device, and computer storage medium
WO2016123898A1 (en) Short message managing method and mobile terminal thereof
WO2023018002A1 (en) Messaging service server capable of transmitting optimal push notification message by reflecting feedback of message receiver in real time, and operation method thereof
WO2020237849A1 (en) Snapshot read-write method for network block device, apparatus, device, and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17842592

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 25.6.19).

122 Ep: pct application non-entry in european phase

Ref document number: 17842592

Country of ref document: EP

Kind code of ref document: A1