[go: up one dir, main page]

CN116303084A - Scheduling method and system for test cases of multi-terminal interaction - Google Patents

Scheduling method and system for test cases of multi-terminal interaction Download PDF

Info

Publication number
CN116303084A
CN116303084A CN202310362683.4A CN202310362683A CN116303084A CN 116303084 A CN116303084 A CN 116303084A CN 202310362683 A CN202310362683 A CN 202310362683A CN 116303084 A CN116303084 A CN 116303084A
Authority
CN
China
Prior art keywords
agent
queue
test case
test cases
executed
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310362683.4A
Other languages
Chinese (zh)
Inventor
曹立品
白剑
黄海亮
梁瑛玮
张海林
鲁和平
李长杰
陈焕然
李乐
王浩
洪行健
冷冬
丁一
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yifang Information Technology Co ltd
Original Assignee
Yifang Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Yifang Information Technology Co ltd filed Critical Yifang Information Technology Co ltd
Priority to CN202310362683.4A priority Critical patent/CN116303084A/en
Publication of CN116303084A publication Critical patent/CN116303084A/en
Pending legal-status Critical Current

Links

Images

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
    • G06F11/3668Testing of software
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • 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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

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 And Data Communications (AREA)

Abstract

The invention provides a scheduling method and a scheduling system for test cases with multi-terminal interaction, which relate to the field of automatic testing and comprise the following steps: sequentially setting corresponding priority weights for the analyzed test cases and adding the corresponding priority weights into a queue to be executed; the test cases in the queue to be executed are arranged in descending order according to the priority weight; after the arrangement is completed, sequentially popping up the test cases from the head of the queue to be executed and inquiring the matching agent machine, and executing the test cases in the selected agent after the matching agent machine is matched with the acceptable agent machine according to the dependent terminal of the test cases until all the test cases in the queue to be executed are executed; the execution efficiency of the agent machine in scheduling the test cases in the multi-terminal mode can be improved.

Description

一种多终端交互的测试用例的调度方法及其系统A scheduling method and system for multi-terminal interactive test cases

技术领域technical field

本发明涉及自动化测试领域,具体涉及一种多终端交互的测试用例的调度方法及其系统。The invention relates to the field of automated testing, in particular to a scheduling method and system for multi-terminal interactive test cases.

背景技术Background technique

现在直播行业如火如荼,如直播课堂,其中涉及多端交互的场景,而实现多端交互,通常需要进行多角色多终端形态的U l自动化测试,通常自动化测试涉及多种终端设备,如浏览器、i0S设备、Androi d设备、客户端,这些设备扮演的角色配合着完成一个或多个测试用例,如果要保证用于执行用例的agent机器上能同时具备四种终端,那么agent机器需要挂载多个对应的外接设备,但是并非所有用例都涉及四种不同终端形态的角色,也并不是所有agent机器上都配备了用于支撑全部终端的全套设备,所以根据测试用例对于设备的依赖,进而选择最合适的agent机器来执行用例,高效的调度方案就显得尤为重要。Now the live broadcast industry is in full swing, such as the live broadcast classroom, which involves multi-terminal interaction scenarios. To achieve multi-terminal interaction, U l automation testing in the form of multi-role and multi-terminal forms is usually required. Usually, automated testing involves multiple terminal devices, such as browsers and iOS devices. , Android device, and client. These devices play roles to complete one or more test cases. If you want to ensure that the agent machine used to execute the test case can have four types of terminals at the same time, then the agent machine needs to mount multiple corresponding external devices, but not all use cases involve the role of four different terminal forms, and not all agent machines are equipped with a full set of equipment to support all terminals, so according to the dependence of the test case on the device, and then choose the most suitable An efficient scheduling scheme is particularly important for agent machines to execute use cases.

因此,本发明提出一种多终端交互的测试用例的调度方法及其系统。Therefore, the present invention proposes a method and system for scheduling test cases of multi-terminal interaction.

发明内容Contents of the invention

针对现有技术的不足,本发明提出一种多终端交互的测试用例的调度方法及其系统,可以提高agent机器在调度多终端形态的测试用例时的执行效率。Aiming at the deficiencies of the prior art, the present invention proposes a multi-terminal interactive test case scheduling method and its system, which can improve the execution efficiency of an agent machine when scheduling multi-terminal test cases.

本发明的技术方案是这样实现的:Technical scheme of the present invention is realized like this:

一种多终端交互的测试用例的调度方法,包括如下步骤:A method for dispatching test cases of multi-terminal interaction, comprising the steps of:

将经过解析所需依赖终端的多个测试用例,依次加入待执行队列,并设置相应的优先级权重,所述优先级权重是轮询匹配无适配agent时可递减的配置;每有测试用例入队时,根据优先级权重对待执行队列中的测试用例进行降序排列;Add multiple test cases that need to rely on the terminal after analysis, and add them to the queue to be executed in turn, and set the corresponding priority weight. The priority weight is a configuration that can be decremented when there is no matching agent for polling and matching; each test case When entering the queue, the test cases in the queue to be executed are sorted in descending order according to the priority weight;

排列完成后,测试用例从待执行队列的队首开始依次弹出并查询匹配agent机器,根据其依赖终端匹配可承接的agent机器后在选中的agent中执行,所述agent机器可进行拓展及注册;所述队列待执行队列供测试用例入队,并处于轮询状态;After the arrangement is completed, the test cases pop up sequentially from the head of the queue to be executed and query the matching agent machines, match the acceptable agent machines according to their dependent terminals and execute them in the selected agent, and the agent machines can be expanded and registered; The queue to be executed is used for enqueuing test cases and is in a polling state;

其中,所述测试用例从待执行队列的队首开始依次弹出并查询匹配agent机器,进一步包括:Wherein, the test case pops up sequentially from the head of the queue to be executed and queries the matching agent machine, further comprising:

队首的测试用例弹出后对已注册的agent机器的状态进行查询,若查询到无处于空闲agent机器,将对应的测试用例优先级权重进行降重,并将降重后的测试用例重入待执行队列并进行在待执行队列中降序排列;若查询到有处于空闲的agent机器,需进一步对当前测试用例根据其依赖端寻找能承载执行的agent机器;After the test case at the head of the team pops up, query the state of the registered agent machine. If no agent machine is idle, the priority weight of the corresponding test case will be lowered, and the weighted test case will be re-entered into the waiting list. Execute the queue and arrange it in descending order in the queue to be executed; if there is an idle agent machine found in the query, it is necessary to further search for an agent machine that can carry the execution of the current test case according to its dependent side;

经查询,若所有空闲的agent机器均无承接当前测试用例的能力,将对应的测试用例优先级权重进行降重,并将降重后的测试用例再次入待执行队列并在待执行队列中进行降序排列;若存在空闲的agent机器具有承接当前测试用例的能力,则对满足条件的agent机器根据其承载能力进行升序排列,测试用例将选择经排列后的首个agent机器承接后开始执行,已选中的agent机器被设置为占用状态即无空闲状态;After querying, if all idle agent machines have no ability to undertake the current test case, the priority weight of the corresponding test case will be reduced, and the reduced test case will be put into the queue to be executed again and executed in the queue to be executed. Arrange in descending order; if there is an idle agent machine with the ability to undertake the current test case, then the agent machine that satisfies the conditions will be arranged in ascending order according to its carrying capacity, and the test case will be executed after selecting the first agent machine after the arrangement. The selected agent machine is set to an occupied state, that is, there is no idle state;

测试用例执行完成后,承接其的agent机器被释放并设置为空闲状态,待下一次查询匹配。After the execution of the test case is completed, the agent machine that undertakes it is released and set to an idle state, waiting for the next query to match.

优选的,所述测试用例文件从gitlab代码库中获取并解析后,将测试用例所对应的关键信息入库调度系统。Preferably, after the test case file is acquired and parsed from the gitlab code base, the key information corresponding to the test case is stored into the database scheduling system.

优选的,所述关键信息包括测试用例文件名、描述、作者、测试用例依赖端。Preferably, the key information includes the test case file name, description, author, and test case dependent end.

优选的,所述agent机器在执行前在调度系统注册,并进行承接能力的登记,所述agent机器的承接能力包括web端、android端、iOS端、客户端。Preferably, the agent machine is registered in the dispatching system before execution, and registers the carrying capacity, and the carrying capacity of the agent machine includes a web end, an android end, an iOS end, and a client end.

本发明还提出一种多终端交互的测试用例的调度系统,包括套件管理模块、agent机器管理模块、任务队列模块、环境模块、执行记录模块,所述套件管理模块用于从gitlab代码库中获取并解析多个测试用例;所述agent机器管理模块用于注册agent机器并登记其承接能力;任务队列模块用于所有从套件管理模块中解析的测试用例依次设置相应的优先级权重并加入待执行队列进行排列,同时用于测试用例查询和匹配agent机器后在选中的agent机器执行;所述环境模块用于对agent机器的执行环境进行管理;所述执行记录模块用于记录测试用例在任务队列模块中的执行过程的log和执行完成的报告。The present invention also proposes a scheduling system for multi-terminal interactive test cases, including a suite management module, an agent machine management module, a task queue module, an environment module, and an execution record module, and the suite management module is used to obtain from the gitlab code base And analyze multiple test cases; the agent machine management module is used to register the agent machine and register its ability to undertake; the task queue module is used to set corresponding priority weights in turn for all test cases parsed from the suite management module and add them to be executed The queue is arranged, and is used for test case query and matching agent machines to execute on the selected agent machine; the environment module is used to manage the execution environment of the agent machine; the execution recording module is used to record test cases in the task queue The log of the execution process in the module and the report of the execution completion.

与现有技术相比,本发明具有以下优点:Compared with the prior art, the present invention has the following advantages:

采用本方案,在应对多终端交互的测试用例的调度时,无需对测试用例与执行机间的承接关系进行提前匹配,每条测试用例在执行时再匹配,即根据实际的agent机器的承接情况选择当下满足条件的最优agent机器,避免造成提前分配造成多队列内的任务匹配数量分布不均,资源利用无法最大化,进而实现agent机器在调度多终端形态的测试用例时的执行效率的提高。With this scheme, when dealing with the scheduling of multi-terminal interactive test cases, there is no need to match the succession relationship between the test case and the execution machine in advance, and each test case is matched when it is executed, that is, according to the actual situation of the agent machine. Select the optimal agent machine that satisfies the conditions at the moment to avoid the uneven distribution of task matching numbers in multiple queues caused by early allocation, and resource utilization cannot be maximized, thereby improving the execution efficiency of the agent machine when scheduling multi-terminal test cases .

附图说明Description of drawings

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

图1为本发明一种多终端交互的测试用例的调度方法的流程图;Fig. 1 is the flow chart of the scheduling method of a kind of multi-terminal interactive test case of the present invention;

图2为本发明一种多终端交互的测试用例的调度系统的系统框图。FIG. 2 is a system block diagram of a scheduling system for multi-terminal interactive test cases according to the present invention.

具体实施方式Detailed ways

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.

在本发明的描述中,需要说明的是,术语“中心”、“上”、“下”、“左”、“右”、“竖直”、“水平”、“内”、“外”等指示的方位或位置关系为基于附图所示的方位或位置关系,仅是为了便于描述本发明和简化描述,而不是指示或暗示所指的装置或元件必须具有特定的方位、以特定的方位构造和操作,因此不能理解为对本发明的限制。此外,术语“第一”、“第二”、“第三”、“第四”等仅用于描述目的,而不能理解为指示或暗示相对重要性。In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer" etc. The indicated orientation or positional relationship is based on the orientation or positional relationship shown in the drawings, and is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the referred device or element must have a specific orientation, or in a specific orientation. construction and operation, therefore, should not be construed as limiting the invention. In addition, the terms "first", "second", "third", "fourth", etc. are used for descriptive purposes only and should not be construed as indicating or implying relative importance.

在本发明的描述中,需要说明的是,除非另有明确的规定和限定,术语“安装”、“相连”、“连接”应做广义理解,例如,可以是固定连接,也可以是可拆卸连接,或一体地连接;可以是机械连接,也可以是电连接;可以是直接相连,也可以通过中间媒介间接相连,可以是两个元件内部的连通。对于本领域的普通技术人员而言,可以具体情况理解上述术语在本发明中的具体含义。In the description of the present invention, it should be noted that unless otherwise specified and limited, the terms "installation", "connection" and "connection" should be understood in a broad sense, for example, it can be a fixed connection or a detachable connection. Connected, or integrally connected; it may be mechanically connected or electrically connected; it may be directly connected or indirectly connected through an intermediary, and it may be the internal communication of two components. Those of ordinary skill in the art can understand the specific meanings of the above terms in the present invention in specific situations.

实施例1Example 1

本实施例提出一种多终端交互的测试用例的调度方法,如图1所示,包括如下步骤:This embodiment proposes a scheduling method for a multi-terminal interactive test case, as shown in FIG. 1 , including the following steps:

将经过解析所需依赖终端的多个测试用例,依次加入待执行队列,并设置相应的优先级权重,所述优先级权重是轮询匹配无适配agent时可递减的配置;每有测试用例入队时,根据优先级权重对待执行队列中的测试用例进行降序排列;Add multiple test cases that need to rely on the terminal after analysis, and add them to the queue to be executed in turn, and set the corresponding priority weight. The priority weight is a configuration that can be decremented when there is no matching agent for polling and matching; each test case When entering the queue, the test cases in the queue to be executed are sorted in descending order according to the priority weight;

排列完成后,测试用例从待执行队列的队首开始依次弹出并查询匹配agent机器,根据其依赖终端匹配可承接的agent机器后在选中的agent中执行,所述agent机器可进行随时拓展及注册,且是分布式执行的;所述队列待执行队列随时供测试用例入队,并处于随时轮询状态;无需对测试用例与执行机间的承接关系进行提前匹配,并不需要考虑实施例之间是否存在并发关系;After the arrangement is completed, the test cases pop up sequentially from the head of the queue to be executed and query the matching agent machines, match the acceptable agent machines according to their dependent terminals, and then execute them in the selected agent. The agent machines can be expanded and registered at any time , and is executed in a distributed manner; the queue to be executed is ready for test cases to enter the queue at any time, and is in the state of polling at any time; there is no need to match the succession relationship between the test case and the execution machine in advance, and it is not necessary to consider the differences in the embodiment Whether there is a concurrent relationship between;

其中,所述测试用例从待执行队列的队首开始依次弹出并查询匹配agent机器,进一步包括:Wherein, the test case pops up sequentially from the head of the queue to be executed and queries the matching agent machine, further comprising:

队首的测试用例弹出后对已注册的agent机器的状态进行查询,若查询到无处于空闲agent机器,将对应的测试用例优先级权重进行降重,并将降重后的测试用例重入待执行队列并进行在待执行队列中降序排列;若查询到有处于空闲的agent机器,需进一步对当前测试用例根据其依赖端寻找能承载执行的agent机器;After the test case at the head of the team pops up, query the state of the registered agent machine. If no agent machine is idle, the priority weight of the corresponding test case will be lowered, and the weighted test case will be re-entered into the waiting list. Execute the queue and arrange it in descending order in the queue to be executed; if there is an idle agent machine found in the query, it is necessary to further search for an agent machine that can carry the execution of the current test case according to its dependent side;

经查询,若所有空闲的agent机器均无承接当前测试用例的能力,将对应的测试用例优先级权重进行降重,并将降重后的测试用例再次入待执行队列并在待执行队列中进行降序排列;若存在空闲的agent机器具有承接当前测试用例的能力,则对满足条件的agent机器根据其承载能力进行升序排列,测试用例将选择经排列后的首个agent机器承接后开始执行,已选中的agent机器被设置为占用状态即无空闲状态;After querying, if all idle agent machines have no ability to undertake the current test case, the priority weight of the corresponding test case will be reduced, and the reduced test case will be put into the queue to be executed again and executed in the queue to be executed. Arrange in descending order; if there is an idle agent machine with the ability to undertake the current test case, then the agent machine that satisfies the conditions will be arranged in ascending order according to its carrying capacity, and the test case will be executed after selecting the first agent machine after the arrangement. The selected agent machine is set to an occupied state, that is, there is no idle state;

测试用例执行完成后,承接其的agent机器被释放并设置为空闲状态,待下一次查询匹配。After the execution of the test case is completed, the agent machine that undertakes it is released and set to an idle state, waiting for the next query to match.

在本实施例中,所述agent机器在执行前需要在调度系统注册,并进行承接能力的登记,所述agent机器的承接能力包括web端、android端、iOS端、客户端。In this embodiment, the agent machine needs to be registered in the dispatching system before execution, and register the undertaking capability. The undertaking capability of the agent machine includes a web terminal, an android terminal, an iOS terminal, and a client terminal.

本实施例还提出一种多终端交互的测试用例的调度系统,包括套件管理模块、agent机器管理模块、任务队列模块、环境模块、执行记录模块,所述套件管理模块用于从gitlab代码库中获取并解析多个测试用例;This embodiment also proposes a scheduling system for multi-terminal interactive test cases, including a suite management module, an agent machine management module, a task queue module, an environment module, and an execution record module, and the suite management module is used to extract from the gitlab code base Get and parse multiple test cases;

所述agent机器管理模块用于注册agent机器并登记其承接能力;The agent machine management module is used to register the agent machine and register its ability to undertake;

任务队列模块用于所有从套件管理模块中解析的测试用例依次设置相应的优先级权重并加入待执行队列进行排列,同时用于测试用例查询和匹配agent机器后在选中的agent机器执行;The task queue module is used for all test cases parsed from the suite management module to set corresponding priority weights in turn and join the queue to be executed for arrangement, and is also used for test case query and matching agent machines to be executed on the selected agent machine;

所述环境模块用于对agent机器的执行环境进行管理;The environment module is used to manage the execution environment of the agent machine;

所述执行记录模块用于记录测试用例在任务队列模块中的执行过程的log和执行完成的报告。The execution recording module is used for recording the log of the execution process of the test case in the task queue module and the report of the execution completion.

实施例2Example 2

本实施例同时将互动课堂的3个典型用例加入执行,调度过程如下In this embodiment, three typical use cases of the interactive classroom are added to the execution at the same time, and the scheduling process is as follows

1.用例场景1. Use Case Scenario

Figure BDA0004165591280000061
Figure BDA0004165591280000061

Figure BDA0004165591280000071
Figure BDA0004165591280000071

2.agent列表2. Agent list

Figure BDA0004165591280000072
Figure BDA0004165591280000072

Figure BDA0004165591280000081
Figure BDA0004165591280000081

背景如上,调度过程如下:The background is as above, and the scheduling process is as follows:

1.三条用例点击执行,加入待执行队列时,根据数字权重,优先级排序分别为:课堂答题、课堂签到、课堂倒计时;1. Click to execute the three use cases, and when they are added to the queue to be executed, according to the numerical weight, the priority order is: classroom answer, classroom sign-in, and classroom countdown;

2.将队首的用例课堂答题弹出队列,寻找承接agent机器,查找出空闲的agent为:agent1、agent2、agent3;2. Pop out the use case classroom answering queue of the team leader, look for the agent machine, and find out the idle agents are: agent1, agent2, agent3;

3.根据课堂答题用例的依赖终端为web/Android/iOS和agent承接能力,过滤出可承接执行的agent机器为agent1、agent2;3. According to the dependent terminal of the classroom answering use case as web/Android/iOS and the ability to undertake the agent, filter out the agent machines that can undertake the execution as agent1 and agent2;

4.将步骤3过滤的机器按照能力大小正序排序后为:agent1、agent2;4. Sort the machines filtered in step 3 according to the positive order of capacity: agent1, agent2;

5.将课堂答题用例交给agent1执行、并置agent1状态为占用;5. Give the classroom answering use case to agent1 for execution, and set the status of agent1 as occupied;

6.重复步骤2,此时队首的用例是课堂签到,依赖端为web/Android/iOS空闲的设备是agent2、agent3;6. Repeat step 2. At this time, the use case of the leader of the team is classroom sign-in, and the idle devices that rely on web/Android/iOS are agent2 and agent3;

7.根据能力匹配后,可承接的设备为agent2,将用例交由agent2执行,并置agent2状态为占用;7. After capability matching, the device that can be accepted is agent2, and the use case is handed over to agent2 for execution, and the status of agent2 is set to occupied;

8.重复步骤2此时队首的用例是课堂倒计时,依赖端为client,空闲的设备是agent3;8. Repeat step 2. At this time, the use case of the team leader is classroom countdown, the dependent end is client, and the idle device is agent3;

9.根据能力匹配后,暂无可承接的agent机器,将课堂倒计时权重-10后重新加入队列,进行权重排序,若在此过程中还有其他用例加入队列,将依次重复上述步骤,弹出队首用例寻找机器,如此时没有加入其他用例,课堂倒计时用例将一直轮询至agent2(只有agent2可承接client端)执行完当前任务释放出空闲状态,交由agent执行用例,直至队列所有用例全部执行完毕。9. According to the ability matching, there is no agent machine that can take over for the time being. After the class countdown weight is -10, re-join the queue and sort the weight. The first use case looks for a machine. If no other use cases are added at this time, the classroom countdown use case will poll until agent2 (only agent2 can take over the client side) and release the idle state after executing the current task, and hand over the use case to the agent until all the use cases in the queue are executed. complete.

即当有很多个单一UI自动化测试用例涉及不确定个数的多终端的时候,在拥有不一的执行能力的服务是动态可拓展的情况下,采用多终端交互的测试用例的调度方法提高agent在测试用例的执行效率。That is, when there are many single UI automation test cases involving an uncertain number of multiple terminals, in the case that the services with different execution capabilities are dynamically scalable, the scheduling method of the test cases for multi-terminal interaction is used to improve the agent Efficiency in the execution of test cases.

以上所述仅为本发明的较佳实施例而已,并不用以限制本发明,凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included in the scope of the present invention. within the scope of protection.

Claims (5)

1. A scheduling method of test cases of multi-terminal interaction is characterized by comprising the following steps: the method comprises the following steps:
sequentially adding a plurality of test cases of the analyzed dependent terminal into a queue to be executed, and setting corresponding priority weights, wherein the priority weights are configured in a manner that the polling matching is descending when no adaptive agent exists; when each test case is enqueued, the test cases in the queue to be executed are arranged in descending order according to the priority weight;
after the arrangement is completed, sequentially popping up the test cases from the head of the queue to be executed, inquiring the matched agent machines, and executing the test cases in the selected agent machines after the matched agent machines are matched with the acceptable agent machines according to the dependent terminals of the test cases, wherein the agent machines can be expanded and registered; the queue to be executed is used for enqueuing the test cases and is in a polling state;
the test case sequentially pops up and inquires the matching agent machine from the head of the queue to be executed, and the method further comprises the following steps:
after the test case at the head of the queue pops up, inquiring the state of the registered agent machine, if no idle agent machine is inquired, reducing the weight of the priority of the corresponding test case, and re-entering the test case after the weight reduction into a queue to be executed and performing descending arrangement in the queue to be executed; if the idle agent machine is inquired, the agent machine capable of bearing and executing is further required to be searched for the current test case according to the dependent end;
through inquiry, if all the idle agent machines do not have the capability of accepting the current test case, the priority weight of the corresponding test case is reduced, and the test case after the weight reduction is put into the queue to be executed again and is arranged in the queue to be executed in a descending order; if the spare agent machines have the capability of accepting the current test case, the agent machines meeting the conditions are arranged in an ascending order according to the bearing capability, the test case starts to execute after the first agent machine after the test case is selected to be arranged is accepted, and the selected agent machines are set to be in an occupied state, namely in a non-idle state;
after the test case is executed, the agent machine adapting to the test case is released and set to be in an idle state, and the next query is matched.
2. The method for scheduling test cases for multi-terminal interaction according to claim 1, wherein the method comprises the following steps:
and after the test case file is acquired and analyzed from the gitlab code base, the key information corresponding to the test case is put into a scheduling system.
3. The method for scheduling test cases with multi-terminal interaction according to claim 2, wherein the key information comprises a test case file name, a description, an author and a test case dependent end.
4. The method for scheduling test cases for multi-terminal interaction of claim 1, wherein the agent machine is registered in a scheduling system before execution, and performs registration of a receiving capability, wherein the receiving capability of the agent machine comprises a web side, an android side, an iOS side and a client side.
5. The scheduling system applying the scheduling method of the multi-terminal interactive test cases according to any one of claims 1-4 is characterized by comprising a suite management module, a reagent machine management module, a task queue module, an environment module and an execution record module, wherein the suite management module is used for acquiring and analyzing a plurality of test cases from a gitlab code base;
the agent machine management module is used for registering the agent machine and registering the carrying capacity of the agent machine;
the task queue module is used for arranging the digital priority weights of all the test cases analyzed from the suite management module, adding the test cases into a queue to be executed, and executing the test cases in the selected agent machine after inquiring and matching the agent machine;
the environment module is used for managing the execution environment of the agent machine;
the execution recording module is used for recording log of the execution process of the test case in the task queue module and a report of execution completion.
CN202310362683.4A 2023-04-07 2023-04-07 Scheduling method and system for test cases of multi-terminal interaction Pending CN116303084A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310362683.4A CN116303084A (en) 2023-04-07 2023-04-07 Scheduling method and system for test cases of multi-terminal interaction

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310362683.4A CN116303084A (en) 2023-04-07 2023-04-07 Scheduling method and system for test cases of multi-terminal interaction

Publications (1)

Publication Number Publication Date
CN116303084A true CN116303084A (en) 2023-06-23

Family

ID=86837948

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310362683.4A Pending CN116303084A (en) 2023-04-07 2023-04-07 Scheduling method and system for test cases of multi-terminal interaction

Country Status (1)

Country Link
CN (1) CN116303084A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102915254A (en) * 2011-08-02 2013-02-06 中兴通讯股份有限公司 Task management method and device
US20160034375A1 (en) * 2014-08-01 2016-02-04 Vmware, Inc. Determining test case priorities based on tagged execution paths
CN106991044A (en) * 2017-03-22 2017-07-28 记忆科技(深圳)有限公司 A kind of test case scheduling and distribution method suitable for distributed test system
CN110096353A (en) * 2019-05-14 2019-08-06 厦门美图之家科技有限公司 Method for scheduling task and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102915254A (en) * 2011-08-02 2013-02-06 中兴通讯股份有限公司 Task management method and device
US20160034375A1 (en) * 2014-08-01 2016-02-04 Vmware, Inc. Determining test case priorities based on tagged execution paths
CN106991044A (en) * 2017-03-22 2017-07-28 记忆科技(深圳)有限公司 A kind of test case scheduling and distribution method suitable for distributed test system
CN110096353A (en) * 2019-05-14 2019-08-06 厦门美图之家科技有限公司 Method for scheduling task and device

Similar Documents

Publication Publication Date Title
US9069903B2 (en) Multi-platform test automation enhancement
CN104750469B (en) Source code statistical analysis technique and system
CN111447102B (en) SDN network device access method and device, computer device and storage medium
CN111221793A (en) Data mining method, platform, computer equipment and storage medium
CN113407511A (en) Log aggregation method, log aggregation equipment and computer program product
CN107800565A (en) Method for inspecting, device, system, computer equipment and storage medium
CN113301049B (en) Auditing method, device, equipment and readable storage medium for industrial control equipment
WO2023169097A1 (en) 5g message terminal identification method, service platform and storage medium
CN111078688A (en) Method for micro-service health check and storage medium
CN110581893A (en) data transmission method and device, routing equipment, server and storage medium
CN109981795B (en) Resource request scheduling method and device
CN110248030B (en) Test method, device, equipment and storage medium for short message compensation mechanism
CN117156010A (en) Task processing methods, devices, storage media and electronic equipment
CN109559121B (en) Transaction path call exception analysis method, apparatus, device and readable storage medium
CN116303084A (en) Scheduling method and system for test cases of multi-terminal interaction
CN111258940B (en) Configuration method, business auditing system, business auditing equipment and storage medium
CN119829238A (en) Task execution method, task execution device, storage medium, electronic device, and program product
CN112597216A (en) Method and device for adapting micro-service of multiple time sequence databases
CN112181929A (en) Cloud management platform log processing method and device, electronic device and storage medium
CN118760484A (en) Scanning task processing method and device
CN115134167B (en) A vulnerability scanning method, device, equipment and storage medium
CN111831394B (en) Method and device for deploying stateful pod by kubernetes
CN112448854B (en) Kubernetes complex network policy system and implementation method thereof
CN116010388A (en) Data verification method, data collection server and data verification system
CN111385249B (en) A Vulnerability Detection Method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination