WO2021013124A1 - Method and device for managing automated testing resources - Google Patents

Method and device for managing automated testing resources Download PDF

Info

Publication number
WO2021013124A1
WO2021013124A1 PCT/CN2020/103017 CN2020103017W WO2021013124A1 WO 2021013124 A1 WO2021013124 A1 WO 2021013124A1 CN 2020103017 W CN2020103017 W CN 2020103017W WO 2021013124 A1 WO2021013124 A1 WO 2021013124A1
Authority
WO
WIPO (PCT)
Prior art keywords
resources
task
subtask
tasks
allocated
Prior art date
Application number
PCT/CN2020/103017
Other languages
French (fr)
Chinese (zh)
Inventor
胡文萍
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2021013124A1 publication Critical patent/WO2021013124A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/5038Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the execution order of a plurality of tasks, e.g. taking priority or time dependency constraints into consideration

Definitions

  • the embodiments of the present disclosure relate to, but are not limited to, automated testing technology.
  • test resource allocation is to manually occupy resources according to the task level, first come first served, this strategy will not cause imbalance problems when the task execution time is relatively short, but now the time to execute a task may be It lasts for more than 10 to 20 hours. In this process, resources cannot be released, and other tasks can only be in a long waiting process.
  • the embodiment of the present disclosure provides a method for automatic test resource management, which includes: regularly checking whether there are idle resources; when there are idle resources, sorting tasks of the resources to be allocated according to weights; and calculating whether the idle resources have the highest weight And when matching, allocate resources to the subtask with the highest priority among the tasks with the highest weight.
  • the embodiment of the present disclosure also provides a device for automatic test resource management, including: a checking unit, used to periodically check whether there are idle resources; a sorting unit, when there are idle resources, tasks to be allocated resources are performed according to weights Sorting; a calculation unit for calculating whether the idle resource matches the task with the highest weight; and an allocation unit for allocating resources to the subtask with the highest priority in the task with the highest weight when matching.
  • a checking unit used to periodically check whether there are idle resources
  • a sorting unit when there are idle resources, tasks to be allocated resources are performed according to weights Sorting
  • a calculation unit for calculating whether the idle resource matches the task with the highest weight
  • an allocation unit for allocating resources to the subtask with the highest priority in the task with the highest weight when matching.
  • the embodiment of the present disclosure also provides a device for automated test resource management, including a memory, a processor, and a computer program stored on the memory and capable of running on the processor, and the computer program is executed by the processor. Implement the above-mentioned resource management method during execution.
  • the embodiments of the present disclosure also provide a computer-readable storage medium on which an information processing program is stored, and when the information processing program is executed by a processor, the steps of the above resource management method are implemented.
  • FIG. 1 is a schematic flowchart of a method for automated test resource management according to an embodiment of the present disclosure
  • FIG. 2 is another schematic flowchart of a method for automated test resource management according to an embodiment of the present disclosure
  • FIG. 3 is a schematic diagram of the architecture of an automated test resource management system according to an embodiment of the present disclosure.
  • Fig. 4 is a schematic structural diagram of an apparatus for automatic test resource management according to an embodiment of the present disclosure.
  • FIG. 1 is a schematic flowchart of a method for automated test resource management according to an embodiment of the present disclosure. As shown in FIG. 1, the method includes steps 101 to 104.
  • step 101 it is periodically checked whether there are free resources.
  • step 102 when there are idle resources, the tasks to be allocated resources are sorted according to their weights.
  • step 103 it is calculated whether the idle resource matches the task with the highest weight.
  • step 104 when there is a match, resources are allocated to the subtask with the highest priority among the tasks with the highest weight.
  • the method further includes: reducing the weight of the task with the highest weight according to a preset ratio; if there are remaining free resources, waiting again Tasks that allocate resources are sorted by weight; calculate whether the remaining idle resources match the task with the highest weight; when matching, allocate resources to the subtask with the highest priority among the tasks with the highest weight; and so on, until There are no free resources.
  • the method further includes: executing the subtask with the highest priority according to the allocated resources; and releasing the allocated resources when the execution of the subtask with the highest priority is completed or fails.
  • the method further includes: when there is no match, allocating resources to the subtask with the highest priority among the tasks with the second highest weight.
  • the method further includes: when there is no subtask that needs to be allocated resources in any task to be allocated resources, deleting the task to be allocated resources.
  • the method further includes: when the execution of the subtask with the highest priority is completed, saving the execution result; checking whether the task in which the subtask with the highest priority is located is all completed; and when all are completed, collecting all the tasks in the task The execution result of the subtask.
  • the method further includes: receiving tasks of resources to be allocated; and splitting each task of resources to be allocated into one or more subtasks according to business attributes.
  • Fig. 2 is another schematic flowchart of a method for automated test resource management according to an embodiment of the present disclosure.
  • the system includes: task module, resource module, message queue (MQ), database (database, DB) and resource pool.
  • MQ message queue
  • database database, DB
  • Each module entity uses MQ to complete message transmission. This system needs to have multiple MQ channels, using Queue mode.
  • the message queue MQ includes the following queues.
  • the task queue task.queue which transfers tasks to be allocated resources.
  • the subtask queue subTask.queue which is used to deliver resource messages to the subtask execution module. After the subtask execution module listens to the message, it will extract the corresponding resource and perform a test operation on the resource.
  • the resource release queue release.resource.queue which is used to transfer the resource information that needs to be released to the resource management module through the message queue after the execution of the subtask is completed.
  • the execution failed subtask queue subTaskFailed.queue which is used to inform the resource management module that a certain subtask has failed to execute and resources need to be released.
  • the task module includes a task management module, which is used to receive tasks for resources to be allocated, and split each task for resources to be allocated into one or more subtasks according to business attributes.
  • the resource module includes a task collection unit to be assigned and a resource management module.
  • the resource management module monitors the MQ message, and if it receives the task of the resource to be allocated, it puts it into the local Task List (TL) of the resource to be allocated.
  • TL Task List
  • the task management module determines all subtasks and the priority order of the subtasks in the task according to user needs, and at the same time assigns an initial weight W to the task, and also needs to specify the environmental conditions (for example, machine Frame, main control, line card, number of boards, etc.).
  • the way to split subtasks needs to be determined according to specific business attributes.
  • the principle is that subtasks must be executable entities, for example, a testable module or a testable group.
  • the task management module is also used to trigger task execution and generate task queue messages.
  • the task management module issues the task to the task-to-be-allocated collection unit (also called a resource allocation unit) to apply for appropriate resources.
  • the resource allocation unit manages a task queue of resources to be allocated currently, and adds tasks to the resource queue to be allocated after listening to the task queue message.
  • the distribution engine maintained in the background is a timing worker (for example, it can be processed once a minute, and it can also be modified as appropriate).
  • the distribution engine first sorts the task queue according to the weight, and the highest weight is the first. The low-weight ones are ranked last, and then the resource allocation services are accepted according to the weight in turn. After the subtask matches the resource, the subtask resource message is released to the subtask queue.
  • the resource module first checks whether there are idle resources in the current resource pool, and if there are idle resources, the idle resources are processed in turn.
  • the processing process each time is as follows: The tasks in the list TL are sorted according to the weight W; and the task T1 with the highest weight is obtained, and the idle resource is calculated whether the idle resource matches the task T1. If it matches, the resource is allocated to the highest priority subtask ST1 of the task T1; if it does not match, Then get the task T2 with the second highest weight, and do the same calculation, and so on.
  • Another situation is that if the task has no subtasks that need to be allocated, the task needs to be deleted from the local task list TL of resources to be allocated.
  • the matching work can be completed by the entity of the matching module (not shown in the figure, the matching module can be set in the resource module).
  • the matching module obtains the resource requirements of the task, that is, the resource requirements of the task.
  • the resource requirements of the task are: at least one device, a line card of a coil detector (visual leak detector, VLD), and a master control of the T1042, and no attention is paid to other attributes.
  • the resources of the resource pool are matched one by one. If it can be matched, the subtask assigned to the resource is returned to the subtask execution module, and if it does not match, the next resource is replaced.
  • the task module also includes a subtask execution module, which is used to occupy resources for test execution.
  • the execution process is done at the granularity of subtasks. Therefore, each subtask will occupy different test resources, and the results of the execution will be written into the database.
  • the task module When the subtask is completed, the task module will check whether the parent task of the subtask is completed, and if it is completed, it will collect the results of all the subtasks and send emails to notify the relevant parties.
  • a resource release message will be generated to the resource release queue release.resource.queue.
  • the resource pool management module reads the resource release message, it releases the resource and reclaims the resource into the resource pool.
  • the method includes the following steps.
  • the system user creates a task with a version number in the task module, and then executes step 1.1 to write to the database.
  • Step 2 Query task.
  • step 2.1 query the database
  • step 2.2 the database returns the query result (with execution status);
  • step 2.3 return the result.
  • Step 3 Start the task.
  • Step 4 The task module adds tasks to the task queue.
  • the resource management module executes step 0, that is, after monitoring the task queue message, executes step 4.1 to add the task to the task list (Task List).
  • the priority (weight) of a task is 100 by default, and the weight of a subtask is reduced by 1.
  • Step 5 Find the task after matching the resource.
  • the resource management module executes step 0, that is, starts the worker every minute to determine whether there are idle resources. After matching the resource (that is, there is an idle resource), sort the tasks to be allocated resources according to the weight; calculate whether the idle resource matches the task with the highest weight; when it matches, it is the priority among the tasks with the highest weight The highest subtask allocates resources.
  • Step 6 When the resource meets the subtask execution condition, add the subtask to the subtask queue.
  • the execution module proceeds to step 0, that is, monitoring.
  • Step 7 Execution step.
  • Step 0 in Figure 2 indicates that this step is the following worker task thread, which is similar to a daemon thread, which always exists and will be executed once every minute, and has no relationship with other steps.
  • the resource management module is a big module name, which is used to manage all resources.
  • the local resource management module is a module that records the current task resources and resource information in the resource management module. It can be said that the local resource management module is resource management The most important part of the module.
  • the technical solution provided by this embodiment can realize fine-grained execution and scheduling of task execution, overcome the extensive scheduling dimension of using tasks as the scheduling unit in resource scheduling in the prior art, and can complete dynamic and intelligent allocation of resources And management, through intelligent resource occupation and release solutions to solve the problem of inefficient resource occupation caused by manual occupation. It solves the problem of dynamic resource allocation of automated tasks in the distributed environment of hardware automated testing, and can effectively avoid long-term occupation of resources by large tasks with a long execution time in the non-discriminatory mode, leading to "starvation" of other tasks with higher priority .
  • Fig. 4 is a schematic structural diagram of an apparatus for automatic test resource management according to an embodiment of the present disclosure.
  • the device includes: a checking unit for checking whether there are idle resources at regular intervals; a sorting unit for sorting tasks to be allocated resources according to weights when there are idle resources; a calculation unit for calculating Whether the idle resource matches the task with the highest weight; and an allocation unit configured to allocate resources to the subtask with the highest priority among the tasks with the highest weight when matching.
  • the device also includes: a weight management unit, configured to reduce the weight of the task with the highest weight according to a preset ratio after allocating resources to the subtask with the highest priority among the tasks with the highest weight; the ranking unit also uses If there are remaining free resources, the tasks to be allocated are again sorted according to their weights; the calculation unit is also used to calculate whether the remaining free resources match the task with the highest weight; the allocation unit also uses When matching, resources are allocated to the subtask with the highest priority among the tasks with the highest weight. And so on, until there are no free resources.
  • a weight management unit configured to reduce the weight of the task with the highest weight according to a preset ratio after allocating resources to the subtask with the highest priority among the tasks with the highest weight
  • the ranking unit also uses If there are remaining free resources, the tasks to be allocated are again sorted according to their weights; the calculation unit is also used to calculate whether the remaining free resources match the task with the highest weight; the allocation unit also uses When matching, resources are allocated to the subtask with the highest priority among the tasks
  • the device also includes: an execution unit for executing the subtask with the highest priority according to the allocated resources; and a release unit for releasing the subtask when the execution of the subtask with the highest priority is completed or fails.
  • the resources allocated are allocated.
  • the matching unit is further configured to allocate resources to the subtask with the highest priority among the tasks with the second highest weight when there is no match.
  • the matching unit is further configured to delete any task to be allocated when there is no subtask that needs to be allocated in any task to be allocated.
  • the device also includes: a saving unit for saving the execution result when the execution of the subtask with the highest priority is completed; a checking unit for checking whether the task of the subtask with the highest priority is all completed; and collecting The unit is used to collect the execution results of all subtasks in the task when all are completed.
  • the device also includes: a task management unit for receiving tasks of resources to be allocated; and splitting each task of resources to be allocated into one or more subtasks according to business attributes.
  • the checking unit, sorting unit, calculating unit, allocation unit, releasing unit, checking unit, and collecting unit in this embodiment can be set in the resource module shown in FIG. 3.
  • the weight management unit, execution unit, and task management unit in this embodiment can be set in the task module shown in FIG. 3.
  • the embodiment of the present disclosure also provides a device for automated test resource management, including a memory, a processor, and a computer program stored on the memory and capable of running on the processor, and the computer program is executed by the processor.
  • the processor implements the resource management method according to the foregoing embodiment of the present disclosure.
  • the embodiments of the present disclosure also provide a computer-readable storage medium having an information processing program stored on the computer-readable storage medium.
  • the processor implements the foregoing implementation according to the present disclosure. Examples of resource management methods.
  • Such software may be distributed on a computer-readable medium
  • the computer-readable medium may include a computer storage medium (or non-transitory medium) and a communication medium (or transitory medium).
  • the term computer storage medium includes volatile and non-volatile memory implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data).
  • Computer storage media include but are not limited to RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cassette, tape, magnetic disk storage or other magnetic storage device, or Any other medium used to store desired information and that can be accessed by a computer.
  • communication media usually contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as carrier waves or other transmission mechanisms, and may include any information delivery media .

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

Disclosed in the embodiments of the present disclosure are a method and device for managing automated testing resources. The method comprises: regularly checking whether an idle resource exists; if an idle resource exists, sorting tasks of resources to be allocated according to weights; calculating whether the idle resource matches the task having the highest weight; and if yes, allocating resources for the sub-task having the highest priority in the task having the highest weight.

Description

自动化测试资源管理的方法及装置Method and device for automatic test resource management 技术领域Technical field
本公开实施例涉及但不限于自动化测试技术。The embodiments of the present disclosure relate to, but are not limited to, automated testing technology.
背景技术Background technique
自动化测试在硬件设备测试中占据越来越重要的地位,但是测试资源尤其是大型硬件设备、仪表资源的稀缺性导致自动化测试任务抢占资源的问题越来越突出,因此如何为任务公平地分配资源成为了亟待解决的问题。Automated testing occupies an increasingly important position in hardware equipment testing, but the scarcity of test resources, especially large hardware equipment and instrument resources, has led to the problem of automated test tasks occupying resources more and more, so how to allocate resources fairly for tasks Has become an urgent problem to be solved.
目前大部分的测试资源分配是根据任务级别来手动占用资源,先到先得,这种策略在任务执行时间比较短的情况下,不会导致不均衡的问题,但是现在执行一个任务的时间可能长达10到20多个小时,在此过程中资源得不到释放,其他任务只能处于漫长的等待过程中。At present, most of the test resource allocation is to manually occupy resources according to the task level, first come first served, this strategy will not cause imbalance problems when the task execution time is relatively short, but now the time to execute a task may be It lasts for more than 10 to 20 hours. In this process, resources cannot be released, and other tasks can only be in a long waiting process.
另外,如果任务执行完成时间正处于深夜这种无人值守的时间,需要等到第二天测试人员值守的时候才会释放资源,那么就会造成浪费。这种任务先到先得的策略还会导致重要任务的延后甚至饿死。In addition, if the task execution completion time is in the middle of the night, such an unattended time, the resources will not be released until the testers are on duty the next day, which will cause waste. This first-come-first-served strategy can also cause important tasks to be delayed or even starve to death.
发明内容Summary of the invention
本公开实施例提供了一种自动化测试资源管理的方法,包括:定时检查是否存在空闲资源;当存在空闲资源时,将待分配资源的任务按照权重进行排序;计算所述空闲资源是否与权重最高的任务匹配;以及当匹配时,为所述权重最高的任务中优先级最高的子任务分配资源。The embodiment of the present disclosure provides a method for automatic test resource management, which includes: regularly checking whether there are idle resources; when there are idle resources, sorting tasks of the resources to be allocated according to weights; and calculating whether the idle resources have the highest weight And when matching, allocate resources to the subtask with the highest priority among the tasks with the highest weight.
本公开实施例还提供了一种自动化测试资源管理的装置,包括:检查单元,用于定时检查是否存在空闲资源;排序单元,用于当存在空闲资源时,将待分配资源的任务按照权重进行排序;计算单元,用于计算所述空闲资源是否与权重最高的任务匹配;以及分配单元,用于当匹配时,为所述权重最高的任务中优先级最高的子任务分配资源。The embodiment of the present disclosure also provides a device for automatic test resource management, including: a checking unit, used to periodically check whether there are idle resources; a sorting unit, when there are idle resources, tasks to be allocated resources are performed according to weights Sorting; a calculation unit for calculating whether the idle resource matches the task with the highest weight; and an allocation unit for allocating resources to the subtask with the highest priority in the task with the highest weight when matching.
本公开实施例还提供了一种自动化测试资源管理的装置,包括 存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述计算机程序被所述处理器执行时实现上述资源管理的方法。The embodiment of the present disclosure also provides a device for automated test resource management, including a memory, a processor, and a computer program stored on the memory and capable of running on the processor, and the computer program is executed by the processor. Implement the above-mentioned resource management method during execution.
本公开实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质上存储有信息处理程序,所述信息处理程序被处理器执行时实现上述资源管理的方法的步骤。The embodiments of the present disclosure also provide a computer-readable storage medium on which an information processing program is stored, and when the information processing program is executed by a processor, the steps of the above resource management method are implemented.
附图说明Description of the drawings
附图用来提供对本公开技术方案的进一步理解,并且构成说明书的一部分,与本申请的实施例一起用于解释本公开的技术方案,并不构成对本公开技术方案的限制。在附图中,The accompanying drawings are used to provide a further understanding of the technical solution of the present disclosure, and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the technical solution of the present disclosure, and do not constitute a limitation to the technical solution of the present disclosure. In the attached drawing,
图1为根据本公开实施例的自动化测试资源管理的方法的流程示意图;FIG. 1 is a schematic flowchart of a method for automated test resource management according to an embodiment of the present disclosure;
图2为根据本公开实施例的自动化测试资源管理的方法的另一流程示意图;FIG. 2 is another schematic flowchart of a method for automated test resource management according to an embodiment of the present disclosure;
图3为根据本公开实施例的自动化测试资源管理的系统的架构示意图;以及FIG. 3 is a schematic diagram of the architecture of an automated test resource management system according to an embodiment of the present disclosure; and
图4为根据本公开实施例的自动化测试资源管理的装置的结构示意图。Fig. 4 is a schematic structural diagram of an apparatus for automatic test resource management according to an embodiment of the present disclosure.
具体实施方式Detailed ways
为使本公开的目的、技术方案和优点更加清楚明白,下文中将结合附图对本公开的实施例进行详细说明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互任意组合。In order to make the objectives, technical solutions, and advantages of the present disclosure clearer, the embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings. It should be noted that the embodiments in this application and the features in the embodiments can be combined with each other arbitrarily if there is no conflict.
在附图的流程图示出的步骤可以在诸如一组计算机可执行指令的计算机系统中执行。此外,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。The steps shown in the flowchart of the drawings may be executed in a computer system such as a set of computer-executable instructions. In addition, although a logical sequence is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than here.
图1为根据本公开实施例的自动化测试资源管理的方法的流程示意图,如图1所示,该方法包括步骤101至104。FIG. 1 is a schematic flowchart of a method for automated test resource management according to an embodiment of the present disclosure. As shown in FIG. 1, the method includes steps 101 to 104.
在步骤101,定时检查是否存在空闲资源。In step 101, it is periodically checked whether there are free resources.
在步骤102,当存在空闲资源时,将待分配资源的任务按照权重进行排序。In step 102, when there are idle resources, the tasks to be allocated resources are sorted according to their weights.
在步骤103,计算所述空闲资源是否与权重最高的任务匹配。In step 103, it is calculated whether the idle resource matches the task with the highest weight.
在步骤104,当匹配时,为所述权重最高的任务中优先级最高的子任务分配资源。In step 104, when there is a match, resources are allocated to the subtask with the highest priority among the tasks with the highest weight.
在为所述权重最高的任务中优先级最高的子任务分配资源之后,该方法还包括:按照预设比例降低所述权重最高的任务的权重;如果还存在剩余的空闲资源,则再次将待分配资源的任务按照权重进行排序;计算所述剩余的空闲资源是否与权重最高的任务匹配;当匹配时,为所述权重最高的任务中优先级最高的子任务分配资源;以此类推,直至不存在空闲资源。After allocating resources to the subtask with the highest priority among the tasks with the highest weight, the method further includes: reducing the weight of the task with the highest weight according to a preset ratio; if there are remaining free resources, waiting again Tasks that allocate resources are sorted by weight; calculate whether the remaining idle resources match the task with the highest weight; when matching, allocate resources to the subtask with the highest priority among the tasks with the highest weight; and so on, until There are no free resources.
该方法还包括:根据所述分配的资源执行所述优先级最高的子任务;当所述优先级最高的子任务执行完成或者执行失败时,释放所述分配的资源。The method further includes: executing the subtask with the highest priority according to the allocated resources; and releasing the allocated resources when the execution of the subtask with the highest priority is completed or fails.
该方法还包括:当不匹配时,为所述权重第二高的任务中优先级最高的子任务分配资源。The method further includes: when there is no match, allocating resources to the subtask with the highest priority among the tasks with the second highest weight.
该方法还包括:当任一个待分配资源的任务中没有需要分配资源的子任务时,删除所述任一个待分配资源的任务。The method further includes: when there is no subtask that needs to be allocated resources in any task to be allocated resources, deleting the task to be allocated resources.
该方法还包括:当所述优先级最高的子任务执行完成时,保存执行结果;检查所述优先级最高的子任务所在的任务是否全部完成;以及当全部完成时,收集所述任务中所有子任务的执行结果。The method further includes: when the execution of the subtask with the highest priority is completed, saving the execution result; checking whether the task in which the subtask with the highest priority is located is all completed; and when all are completed, collecting all the tasks in the task The execution result of the subtask.
该方法还包括:接收待分配资源的任务;以及根据业务属性将每一个待分配资源的任务拆分为一个或多个子任务。The method further includes: receiving tasks of resources to be allocated; and splitting each task of resources to be allocated into one or more subtasks according to business attributes.
图2为根据本公开实施例的自动化测试资源管理的方法的另一流程示意图。Fig. 2 is another schematic flowchart of a method for automated test resource management according to an embodiment of the present disclosure.
本实施例应用于图3所示的系统。如图3所示,该系统包括:任务模块、资源模块、消息队列(MQ)、数据库(database,DB)和资源池。This embodiment is applied to the system shown in FIG. 3. As shown in Figure 3, the system includes: task module, resource module, message queue (MQ), database (database, DB) and resource pool.
各模块实体间使用MQ来完成消息传递,本系统中需要有多个MQ通道,使用队列(Queue)模式。Each module entity uses MQ to complete message transmission. This system needs to have multiple MQ channels, using Queue mode.
具体而言,消息队列MQ包括以下队列。Specifically, the message queue MQ includes the following queues.
1、任务队列task.queue,该队列传递的是待分配资源的任务。1. The task queue task.queue, which transfers tasks to be allocated resources.
2、子任务队列subTask.queue,该队列用来为子任务执行模块传递资源消息,子任务执行模块监听到该消息后,会提取相应的资源,并在该资源上进行测试操作。2. The subtask queue subTask.queue, which is used to deliver resource messages to the subtask execution module. After the subtask execution module listens to the message, it will extract the corresponding resource and perform a test operation on the resource.
3、资源释放队列release.resource.queue,该队列用来在子任务执行完成后,通过该消息队列来给资源管理模块传递需要释放的资源信息。3. The resource release queue release.resource.queue, which is used to transfer the resource information that needs to be released to the resource management module through the message queue after the execution of the subtask is completed.
4、执行失败子任务队列subTaskFailed.queue,该队列是用来告知资源管理模块,某个子任务执行失败了,需要释放资源。4. The execution failed subtask queue subTaskFailed.queue, which is used to inform the resource management module that a certain subtask has failed to execute and resources need to be released.
任务模块包括任务管理模块,用于接收待分配资源的任务,根据业务属性将每一个待分配资源的任务拆分为一个或多个子任务。The task module includes a task management module, which is used to receive tasks for resources to be allocated, and split each task for resources to be allocated into one or more subtasks according to business attributes.
资源模块包括待分配任务采集单元和资源管理模块。The resource module includes a task collection unit to be assigned and a resource management module.
资源管理模块监听MQ消息,如果接收到待分配资源的任务,就将其放入本地的待分配资源任务列表(Task List,TL)中。The resource management module monitors the MQ message, and if it receives the task of the resource to be allocated, it puts it into the local Task List (TL) of the resource to be allocated.
具体而言,任务管理模块根据用户需求确定所有子任务,以及子任务在任务中的优先级顺序,同时给任务分配初始权重W,还需要指定完成本测试任务所需的环境条件(例如,机框、主控、线卡、单板数量等)。子任务的拆分方式需要根据具体的业务属性来确定,原则是子任务必须是可执行的实体,例如,某个可测试模块或者一个可测试组。Specifically, the task management module determines all subtasks and the priority order of the subtasks in the task according to user needs, and at the same time assigns an initial weight W to the task, and also needs to specify the environmental conditions (for example, machine Frame, main control, line card, number of boards, etc.). The way to split subtasks needs to be determined according to specific business attributes. The principle is that subtasks must be executable entities, for example, a testable module or a testable group.
任务管理模块还用于触发任务执行,生成任务队列消息。The task management module is also used to trigger task execution and generate task queue messages.
具体而言,任务管理模块将任务下发到待分配任务采集单元(也可以称为资源分配单元)来申请合适的资源。资源分配单元管理一个当前待分配资源的任务队列,监听到任务队列消息后将任务加入待分配资源队列。Specifically, the task management module issues the task to the task-to-be-allocated collection unit (also called a resource allocation unit) to apply for appropriate resources. The resource allocation unit manages a task queue of resources to be allocated currently, and adds tasks to the resource queue to be allocated after listening to the task queue message.
后台维护的分配引擎是一个定时worker(例如,1分钟处理一次,也可以酌情修改),当定时时间窗口来临的时候,分配引擎首先将任务队列按照权重做排序,权重高的排在最前面,权重低的排在最后,然后依次按照权重来受理资源分配业务。在子任务匹配到资源后, 释放子任务资源消息到子任务队列中。The distribution engine maintained in the background is a timing worker (for example, it can be processed once a minute, and it can also be modified as appropriate). When the timing window comes, the distribution engine first sorts the task queue according to the weight, and the highest weight is the first. The low-weight ones are ranked last, and then the resource allocation services are accepted according to the weight in turn. After the subtask matches the resource, the subtask resource message is released to the subtask queue.
具体而言,当资源管理模块分配worker的时间窗口到来时,资源模块首先检查当前资源池中是否有空闲资源,如果有则依次处理空闲资源,每次的处理过程为:将本地待分配资源任务列表TL中的任务按照权重W排序;以及获取权重最高的任务T1,计算该空闲资源是否匹配该任务T1,如果匹配,则为任务T1的最高优先级子任务ST1分配该资源;如果不匹配,则获取权重第二高的任务T2,并做同样的计算,依次类推。还有一种情况是,如果该任务没有需要分配的子任务了,则需要将该任务从本地待分配资源任务列表TL中删除。Specifically, when the time window for the resource management module to allocate workers comes, the resource module first checks whether there are idle resources in the current resource pool, and if there are idle resources, the idle resources are processed in turn. The processing process each time is as follows: The tasks in the list TL are sorted according to the weight W; and the task T1 with the highest weight is obtained, and the idle resource is calculated whether the idle resource matches the task T1. If it matches, the resource is allocated to the highest priority subtask ST1 of the task T1; if it does not match, Then get the task T2 with the second highest weight, and do the same calculation, and so on. Another situation is that if the task has no subtasks that need to be allocated, the task needs to be deleted from the local task list TL of resources to be allocated.
重复上述步骤,直至资源池中空闲资源处理完毕为止。Repeat the above steps until the idle resources in the resource pool are processed.
匹配工作可以通过匹配模块(图中没有示出,匹配模块可以设置在资源模块中)的实体来完成。匹配模块获取任务的资源需求,即,任务对资源的要求。例如,任务的资源需求为:至少一个设备、线圈检测器(visual leak detector,VLD)的线卡、T1042的主控,对其他属性不关注。根据任务需求,根据每个属性需求,来逐个匹配资源池的资源,如果能匹配,则将分配到资源的子任务返回给子任务执行模块,如果不匹配则更换下一个资源。The matching work can be completed by the entity of the matching module (not shown in the figure, the matching module can be set in the resource module). The matching module obtains the resource requirements of the task, that is, the resource requirements of the task. For example, the resource requirements of the task are: at least one device, a line card of a coil detector (visual leak detector, VLD), and a master control of the T1042, and no attention is paid to other attributes. According to task requirements and each attribute requirement, the resources of the resource pool are matched one by one. If it can be matched, the subtask assigned to the resource is returned to the subtask execution module, and if it does not match, the next resource is replaced.
任务模块还包括子任务执行模块,用于占用资源进行测试执行,执行过程以子任务的粒度来做,因此每一个子任务都会占用不同的测试资源,执行完成的结果会写入数据库。The task module also includes a subtask execution module, which is used to occupy resources for test execution. The execution process is done at the granularity of subtasks. Therefore, each subtask will occupy different test resources, and the results of the execution will be written into the database.
当子任务完成后,任务模块会去检查该子任务所在的父级任务是否完成,如果完成则收集所有子任务结果并发送邮件通知相关方。When the subtask is completed, the task module will check whether the parent task of the subtask is completed, and if it is completed, it will collect the results of all the subtasks and send emails to notify the relevant parties.
子任务执行完成后,会生成释放资源消息到资源释放队列release.resource.queue中。资源池管理模块读取到该释放资源消息后,进行资源释放,将资源回收到资源池中。After the execution of the subtask is completed, a resource release message will be generated to the resource release queue release.resource.queue. After the resource pool management module reads the resource release message, it releases the resource and reclaims the resource into the resource pool.
如图2所示,该方法包括以下步骤。As shown in Figure 2, the method includes the following steps.
步骤1、任务生成。Step 1. Task generation.
具体而言,系统用户在任务模块创建带版本号任务,然后执行步骤1.1,写入数据库。Specifically, the system user creates a task with a version number in the task module, and then executes step 1.1 to write to the database.
步骤2、查询任务。Step 2. Query task.
具体而言,包括:步骤2.1,查询数据库;步骤2.2,数据库返回查询结果(带执行情况);以及步骤2.3,返回结果。Specifically, it includes: step 2.1, query the database; step 2.2, the database returns the query result (with execution status); and step 2.3, return the result.
步骤3、启动任务。Step 3. Start the task.
步骤4、任务模块添加任务到任务队列。Step 4. The task module adds tasks to the task queue.
资源管理模块执行步骤0,即,监听任务队列消息后执行步骤4.1,将任务添加到任务列表(Task List)。例如,一个任务的优先级(权重)默认为100,减少一个子任务权重减1。The resource management module executes step 0, that is, after monitoring the task queue message, executes step 4.1 to add the task to the task list (Task List). For example, the priority (weight) of a task is 100 by default, and the weight of a subtask is reduced by 1.
步骤5、匹配到资源后查找任务。Step 5. Find the task after matching the resource.
资源管理模块执行步骤0,即,每分钟启动一次worker,判断是否存在空闲资源。匹配到资源(即,存在空闲资源)后,将待分配资源的任务按照权重进行排序;计算所述空闲资源是否与权重最高的任务匹配;当匹配时,为所述权重最高的任务中优先级最高的子任务分配资源。The resource management module executes step 0, that is, starts the worker every minute to determine whether there are idle resources. After matching the resource (that is, there is an idle resource), sort the tasks to be allocated resources according to the weight; calculate whether the idle resource matches the task with the highest weight; when it matches, it is the priority among the tasks with the highest weight The highest subtask allocates resources.
步骤6、当资源满足子任务执行条件时,将子任务添加到子任务队列。Step 6. When the resource meets the subtask execution condition, add the subtask to the subtask queue.
执行步骤6.1,修改子任务状态。Perform step 6.1 to modify the status of the subtask.
执行模块进行步骤0,即,监听。The execution module proceeds to step 0, that is, monitoring.
即监听到子任务队列消息后,进行步骤7。That is, after listening to the subtask queue message, proceed to step 7.
步骤7、执行步。Step 7. Execution step.
图2中的步骤0表示,该步骤是后面的worker任务线程,类似守护线程,一直存在,每分钟会触发执行一次,与其他步骤没有先后关系。Step 0 in Figure 2 indicates that this step is the following worker task thread, which is similar to a daemon thread, which always exists and will be executed once every minute, and has no relationship with other steps.
另外,资源管理模块是大的模块名称,它是用来管理所有资源的,本地资源管理模块是在资源管理模块中记录当前任务资源,以及资源信息的模块,可以说本地资源管理模块是资源管理模块中最重要的一个部分。In addition, the resource management module is a big module name, which is used to manage all resources. The local resource management module is a module that records the current task resources and resource information in the resource management module. It can be said that the local resource management module is resource management The most important part of the module.
本实施例提供的技术方案,可以实现对任务执行的细粒度的执行及调度,克服现有技术对资源调度时使用任务作为调度单元这种粗放的调度维度,并且能完成资源的动态智能化分配及管理,通过智能资源占用及释放的方案来解决手动占用导致的资源占用效率低下的 问题。解决了硬件自动化测试分布式环境下,自动化任务动态资源分配问题以及能有效避免无差别模式下执行时间较长的大任务长期占用资源,导致其他优先级较高的任务发生“饿死”的情况。The technical solution provided by this embodiment can realize fine-grained execution and scheduling of task execution, overcome the extensive scheduling dimension of using tasks as the scheduling unit in resource scheduling in the prior art, and can complete dynamic and intelligent allocation of resources And management, through intelligent resource occupation and release solutions to solve the problem of inefficient resource occupation caused by manual occupation. It solves the problem of dynamic resource allocation of automated tasks in the distributed environment of hardware automated testing, and can effectively avoid long-term occupation of resources by large tasks with a long execution time in the non-discriminatory mode, leading to "starvation" of other tasks with higher priority .
图4为根据本公开实施例的自动化测试资源管理的装置的结构示意图。如图4所示,该装置包括:检查单元,用于定时检查是否存在空闲资源;排序单元,用于当存在空闲资源时,将待分配资源的任务按照权重进行排序;计算单元,用于计算所述空闲资源是否与权重最高的任务匹配;以及分配单元,用于当匹配时,为所述权重最高的任务中优先级最高的子任务分配资源。Fig. 4 is a schematic structural diagram of an apparatus for automatic test resource management according to an embodiment of the present disclosure. As shown in FIG. 4, the device includes: a checking unit for checking whether there are idle resources at regular intervals; a sorting unit for sorting tasks to be allocated resources according to weights when there are idle resources; a calculation unit for calculating Whether the idle resource matches the task with the highest weight; and an allocation unit configured to allocate resources to the subtask with the highest priority among the tasks with the highest weight when matching.
该装置还包括:权重管理单元,用于在为所述权重最高的任务中优先级最高的子任务分配资源之后,按照预设比例降低所述权重最高的任务的权重;所述排序单元还用于如果还存在剩余的空闲资源,则再次将待分配资源的任务按照权重进行排序;所述计算单元还用于计算所述剩余的空闲资源是否与权重最高的任务匹配;所述分配单元还用于当匹配时,为所述权重最高的任务中优先级最高的子任务分配资源。以此类推,直至不存在空闲资源。The device also includes: a weight management unit, configured to reduce the weight of the task with the highest weight according to a preset ratio after allocating resources to the subtask with the highest priority among the tasks with the highest weight; the ranking unit also uses If there are remaining free resources, the tasks to be allocated are again sorted according to their weights; the calculation unit is also used to calculate whether the remaining free resources match the task with the highest weight; the allocation unit also uses When matching, resources are allocated to the subtask with the highest priority among the tasks with the highest weight. And so on, until there are no free resources.
该装置还包括:执行单元,用于根据所述分配的资源执行所述优先级最高的子任务;以及释放单元,用于当所述优先级最高的子任务执行完成或者执行失败时,释放所述分配的资源。The device also includes: an execution unit for executing the subtask with the highest priority according to the allocated resources; and a release unit for releasing the subtask when the execution of the subtask with the highest priority is completed or fails. The resources allocated.
所述匹配单元还用于当不匹配时,为所述权重第二高的任务中优先级最高的子任务分配资源。The matching unit is further configured to allocate resources to the subtask with the highest priority among the tasks with the second highest weight when there is no match.
所述匹配单元还用于当任一个待分配资源的任务中没有需要分配资源的子任务时,删除所述任一个待分配资源的任务。The matching unit is further configured to delete any task to be allocated when there is no subtask that needs to be allocated in any task to be allocated.
该装置还包括:保存单元,用于当所述优先级最高的子任务执行完成时,保存执行结果;检查单元,用于检查所述优先级最高的子任务所在的任务是否全部完成;以及收集单元,用于当全部完成时,收集所述任务中所有子任务的执行结果。The device also includes: a saving unit for saving the execution result when the execution of the subtask with the highest priority is completed; a checking unit for checking whether the task of the subtask with the highest priority is all completed; and collecting The unit is used to collect the execution results of all subtasks in the task when all are completed.
该装置还包括:任务管理单元,用于接收待分配资源的任务;以及根据业务属性将每一个待分配资源的任务拆分为一个或多个子任务。The device also includes: a task management unit for receiving tasks of resources to be allocated; and splitting each task of resources to be allocated into one or more subtasks according to business attributes.
本实施例中的检查单元、排序单元、计算单元、分配单元、释放单元、检查单元、收集单元可以设置在图3所示的资源模块中。The checking unit, sorting unit, calculating unit, allocation unit, releasing unit, checking unit, and collecting unit in this embodiment can be set in the resource module shown in FIG. 3.
本实施例中的权重管理单元、执行单元、任务管理单元可以设置在图3所示的任务模块中。The weight management unit, execution unit, and task management unit in this embodiment can be set in the task module shown in FIG. 3.
本公开实施例还提供了一种自动化测试资源管理的装置,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述计算机程序被所述处理器执行时,所述处理器实现根据本公开上述实施例的资源管理的方法。The embodiment of the present disclosure also provides a device for automated test resource management, including a memory, a processor, and a computer program stored on the memory and capable of running on the processor, and the computer program is executed by the processor. When executed, the processor implements the resource management method according to the foregoing embodiment of the present disclosure.
本公开实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质上存储有信息处理程序,所述信息处理程序被处理器执行时,所述处理器实现根据本公开上述实施例的资源管理的方法。The embodiments of the present disclosure also provide a computer-readable storage medium having an information processing program stored on the computer-readable storage medium. When the information processing program is executed by a processor, the processor implements the foregoing implementation according to the present disclosure. Examples of resource management methods.
本领域普通技术人员可以理解,上文中所公开方法中的全部或某些步骤、系统、装置中的功能模块/单元可以被实施为软件、固件、硬件及其适当的组合。在硬件实施方式中,在以上描述中提及的功能模块/单元之间的划分不一定对应于物理组件的划分;例如,一个物理组件可以具有多个功能,或者一个功能或步骤可以由若干物理组件合作执行。某些组件或所有组件可以被实施为由处理器,如数字信号处理器或微处理器执行的软件,或者被实施为硬件,或者被实施为集成电路,如专用集成电路。这样的软件可以分布在计算机可读介质上,计算机可读介质可以包括计算机存储介质(或非暂时性介质)和通信介质(或暂时性介质)。如本领域普通技术人员公知的,术语计算机存储介质包括在用于存储信息(诸如计算机可读指令、数据结构、程序模块或其他数据)的任何方法或技术中实施的易失性和非易失性、可移除和不可移除介质。计算机存储介质包括但不限于RAM、ROM、EEPROM、闪存或其他存储器技术、CD-ROM、数字多功能盘(DVD)或其他光盘存储、磁盒、磁带、磁盘存储或其他磁存储装置、或者可以用于存储期望的信息并且可以被计算机访问的任何其他的介质。此外,本领域普通技术人员公知的是,通信介质通常包含计算机可读指令、数据结构、程序模块或者诸如载波或其他传输机制之类的调制数据信号中的其他数据,并且可包括任何信息递送介质。A person of ordinary skill in the art can understand that all or some of the steps, functional modules/units in the system, and apparatus in the methods disclosed above can be implemented as software, firmware, hardware, and appropriate combinations thereof. In hardware implementations, the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may consist of several physical components. The components are executed cooperatively. Some or all components may be implemented as software executed by a processor, such as a digital signal processor or a microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on a computer-readable medium, and the computer-readable medium may include a computer storage medium (or non-transitory medium) and a communication medium (or transitory medium). As is well known to those of ordinary skill in the art, the term computer storage medium includes volatile and non-volatile memory implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Flexible, removable and non-removable media. Computer storage media include but are not limited to RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cassette, tape, magnetic disk storage or other magnetic storage device, or Any other medium used to store desired information and that can be accessed by a computer. In addition, as is well known to those of ordinary skill in the art, communication media usually contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as carrier waves or other transmission mechanisms, and may include any information delivery media .

Claims (10)

  1. 一种自动化测试资源管理的方法,包括:A method for automated test resource management, including:
    定时检查是否存在空闲资源;Regularly check whether there are idle resources;
    响应于存在空闲资源,将待分配资源的任务按照权重进行排序;In response to the existence of idle resources, sort the tasks to be allocated resources according to their weights;
    计算所述空闲资源是否与权重最高的任务匹配;以及Calculate whether the idle resource matches the task with the highest weight; and
    响应于匹配,为所述权重最高的任务中优先级最高的子任务分配资源。In response to the match, resources are allocated to the subtask with the highest priority among the tasks with the highest weight.
  2. 根据权利要求1所述的方法,其中,在为所述权重最高的任务中优先级最高的子任务分配资源的步骤之后,该方法还包括:The method according to claim 1, wherein after the step of allocating resources to the subtask with the highest priority among the tasks with the highest weight, the method further comprises:
    按照预设比例降低所述权重最高的任务的权重;Reduce the weight of the task with the highest weight according to a preset ratio;
    响应于还存在剩余的空闲资源,再次将待分配资源的任务按照权重进行排序;In response to remaining idle resources, the tasks to be allocated resources are again sorted according to their weights;
    计算所述剩余的空闲资源是否与权重最高的任务匹配;Calculating whether the remaining idle resources match the task with the highest weight;
    响应于匹配,为所述权重最高的任务中优先级最高的子任务分配资源,In response to matching, resources are allocated to the subtask with the highest priority among the tasks with the highest weight,
    以此类推,直至不存在空闲资源。And so on, until there are no free resources.
  3. 根据权利要求1所述的方法,还包括:The method according to claim 1, further comprising:
    根据所述分配的资源执行所述优先级最高的子任务;以及Execute the subtask with the highest priority according to the allocated resources; and
    响应于所述优先级最高的子任务执行完成或者执行失败,释放所述分配的资源。In response to the completion or failure of the execution of the subtask with the highest priority, the allocated resources are released.
  4. 根据权利要求1所述的方法,还包括:The method according to claim 1, further comprising:
    响应于不匹配,为权重第二高的任务中优先级最高的子任务分配资源。In response to the mismatch, resources are allocated to the subtask with the highest priority among the tasks with the second highest weight.
  5. 根据权利要求1所述的方法,还包括:The method according to claim 1, further comprising:
    响应于待分配资源的任务中没有需要分配资源的子任务,删除 所述待分配资源的任务。In response to that there is no subtask requiring resource allocation among the tasks to be allocated resources, the task to be allocated resources is deleted.
  6. 根据权利要求3所述的方法,还包括:The method according to claim 3, further comprising:
    响应于所述优先级最高的子任务执行完成,保存执行结果;In response to the completion of the execution of the subtask with the highest priority, save the execution result;
    检查所述优先级最高的子任务所在的任务是否全部完成;以及Check whether the tasks of the subtasks with the highest priority are all completed; and
    响应于全部完成,收集所述任务中所有子任务的执行结果。In response to all completion, the execution results of all subtasks in the task are collected.
  7. 根据权利要求1所述的方法,还包括:The method according to claim 1, further comprising:
    接收所述待分配资源的任务;Receiving the task of the resource to be allocated;
    根据业务属性将所述待分配资源的任务拆分为一个或多个子任务。Split the task of the resource to be allocated into one or more subtasks according to the business attributes.
  8. 一种自动化测试资源管理的装置,包括:An automatic test resource management device, including:
    检查单元,用于定时检查是否存在空闲资源;The checking unit is used to periodically check whether there are idle resources;
    排序单元,用于当存在空闲资源时,将待分配资源的任务按照权重进行排序;The sorting unit is used to sort tasks to be allocated resources according to their weights when there are idle resources;
    计算单元,用于计算所述空闲资源是否与权重最高的任务匹配;以及A calculation unit for calculating whether the idle resource matches the task with the highest weight; and
    分配单元,用于当匹配时,为所述权重最高的任务中优先级最高的子任务分配资源。The allocation unit is configured to allocate resources to the subtask with the highest priority among the tasks with the highest weight when matching.
  9. 一种自动化测试资源管理的装置,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述计算机程序被所述处理器执行时,所述处理器实现根据权利要求1-7中任一项所述资源管理的方法。A device for automatic test resource management includes a memory, a processor, and a computer program stored on the memory and capable of running on the processor. When the computer program is executed by the processor, the processor A method for implementing resource management according to any one of claims 1-7.
  10. 一种计算机可读存储介质,其上存储有信息处理程序,所述信息处理程序被处理器执行时,所述处理器实现根据权利要求1-7中任一项所述资源管理的方法。A computer-readable storage medium having an information processing program stored thereon, and when the information processing program is executed by a processor, the processor implements the resource management method according to any one of claims 1-7.
PCT/CN2020/103017 2019-07-24 2020-07-20 Method and device for managing automated testing resources WO2021013124A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910672201.9 2019-07-24
CN201910672201.9A CN112286651A (en) 2019-07-24 2019-07-24 Method and device for automatically testing resource management

Publications (1)

Publication Number Publication Date
WO2021013124A1 true WO2021013124A1 (en) 2021-01-28

Family

ID=74192823

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/103017 WO2021013124A1 (en) 2019-07-24 2020-07-20 Method and device for managing automated testing resources

Country Status (2)

Country Link
CN (1) CN112286651A (en)
WO (1) WO2021013124A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20230318918A1 (en) * 2022-03-31 2023-10-05 Lenovo (United States) Inc. Unused device repurposing system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102932279A (en) * 2012-10-30 2013-02-13 北京邮电大学 Multidimensional resource scheduling system and method for cloud environment data center
CN104268018A (en) * 2014-09-22 2015-01-07 浪潮(北京)电子信息产业有限公司 Job scheduling method in Hadoop cluster and job scheduler
US9158591B2 (en) * 2012-10-24 2015-10-13 Metric Holdings, Llc System and method for controlled sharing of consumable resources in a computer cluster
CN110019487A (en) * 2018-08-16 2019-07-16 联动优势电子商务有限公司 A kind of database connection management method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9158591B2 (en) * 2012-10-24 2015-10-13 Metric Holdings, Llc System and method for controlled sharing of consumable resources in a computer cluster
CN102932279A (en) * 2012-10-30 2013-02-13 北京邮电大学 Multidimensional resource scheduling system and method for cloud environment data center
CN104268018A (en) * 2014-09-22 2015-01-07 浪潮(北京)电子信息产业有限公司 Job scheduling method in Hadoop cluster and job scheduler
CN110019487A (en) * 2018-08-16 2019-07-16 联动优势电子商务有限公司 A kind of database connection management method and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20230318918A1 (en) * 2022-03-31 2023-10-05 Lenovo (United States) Inc. Unused device repurposing system
US11968087B2 (en) * 2022-03-31 2024-04-23 Lenovo (Singapore) Pte. Ltd. Unused device repurposing system

Also Published As

Publication number Publication date
CN112286651A (en) 2021-01-29

Similar Documents

Publication Publication Date Title
WO2020181813A1 (en) Task scheduling method based on data processing and related device
WO2020147330A1 (en) Data stream processing method and system
CN107992359B (en) Task scheduling method for cost perception in cloud environment
US20170357531A1 (en) Priority-based resource allocation
US8458712B2 (en) System and method for multi-level preemption scheduling in high performance processing
US8006003B2 (en) Apparatus, system, and method for enqueue prioritization
CN106293893B (en) Job scheduling method and device and distributed system
US20060070072A1 (en) Information processing apparatus, memory area management method, and computer program
CN107515781B (en) Deterministic task scheduling and load balancing system based on multiple processors
CN111190691A (en) Automatic migration method, system, device and storage medium suitable for virtual machine
CN111427670A (en) Task scheduling method and system
WO2024082584A1 (en) Resource allocation method, container management assembly and resource allocation system
CN113032125A (en) Job scheduling method, device, computer system and computer-readable storage medium
WO2021013124A1 (en) Method and device for managing automated testing resources
US8108573B2 (en) Apparatus, system, and method for enqueue prioritization
CN112699098A (en) Index data migration method, device and equipment
CN111580951A (en) Task allocation method and resource management platform
US20070174836A1 (en) System for controlling computer and method therefor
CN110912949B (en) Method and device for submitting sites
US7680921B2 (en) Management system, management computer, managed computer, management method and program
CN115454718A (en) Automatic database backup file validity detection method
CN115878910A (en) Line query method, device and storage medium
US11348656B2 (en) Efficient resource sharing
CN111352710B (en) Process management method and device, computing equipment and storage medium
Chen et al. Speculative slot reservation: Enforcing service isolation for dependent data-parallel computations

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: 20844286

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20844286

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 20844286

Country of ref document: EP

Kind code of ref document: A1

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 21/09/2022)

122 Ep: pct application non-entry in european phase

Ref document number: 20844286

Country of ref document: EP

Kind code of ref document: A1