A test-based resource scheduling method, device and computer equipment

By parsing scenario information and grouping test scripts in test tasks, test resource scheduling is optimized, solving the problem of unreasonable resource scheduling in existing technologies and improving test efficiency and resource utilization.

CN116954841BActive Publication Date: 2026-07-31TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
TENCENT TECHNOLOGY (SHENZHEN) CO LTD
Filing Date
2022-04-20
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

In existing technologies, unreasonable scheduling of test resources leads to prolonged testing time and low testing efficiency.

Method used

By acquiring the test resources corresponding to the test tasks, parsing the test scenario information of each test script, grouping and filtering the initial test sets based on the scenario information, updating the process to determine the target test set, allocating the target test resources, and optimizing resource scheduling.

Benefits of technology

It reduced the time required for testing and improved testing efficiency, especially in user acceptance testing, where it reduced account login time and improved resource utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116954841B_ABST
    Figure CN116954841B_ABST
Patent Text Reader

Abstract

This application discloses a test-based resource scheduling method, apparatus, and computer device, belonging to the field of computer science. This application can acquire test resources corresponding to a test task, where the test task includes multiple test scripts. Each test script in the test task is parsed to obtain test scenario information corresponding to each test script. Based on the test scenario information, the multiple test scripts are grouped to obtain at least one test group. Based on test resources and preset test indicators, an initial test set is selected from the test groups. Based on the number of test scripts in the initial test set, the initial test set is updated to obtain a target test set. Target test resources that are reused by test scripts in the target test set are determined from the test resources, and these target test resources are allocated to the corresponding target test sets. This allows for reasonable scheduling of test resources, reduces testing time, and improves testing efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and specifically to a test-based resource scheduling method, apparatus, and computer device. Background Technology

[0002] The software development lifecycle is highly complex, and testing is an essential step in ensuring software quality. Completing a single testing task may require running multiple test scripts, each consuming significant testing resources. Through practical application of existing technologies, the inventors of this application have discovered a problem with the unreasonable scheduling of testing resources. This unreasonable resource scheduling in existing technologies prolongs testing time, leading to low testing efficiency. Summary of the Invention

[0003] This application proposes a test-based resource scheduling method, apparatus, and computer device, which can achieve reasonable scheduling of test resources, reduce the time required for testing, and thus improve testing efficiency.

[0004] This application provides a test-based resource scheduling method, including:

[0005] Obtain the test resources corresponding to the test task, wherein the test task includes multiple test scripts;

[0006] Each test script in the test task is parsed to obtain the test scenario information corresponding to each test script;

[0007] Based on the test scenario information, the multiple test scripts are grouped to obtain at least one test group;

[0008] Based on the test resources and the preset test indicators, an initial test set is selected from the test group, wherein the initial test set includes at least two test groups that are merged for testing;

[0009] Based on the number of test scripts in the initial test set, the initial test set is updated to obtain the target test set;

[0010] From the test resources, determine the target test resources that the test scripts in the target test set can reuse, and allocate the target test resources to the corresponding target test set.

[0011] Accordingly, embodiments of this application also provide a test-based resource scheduling device, including:

[0012] An acquisition unit is used to acquire test resources corresponding to a test task, wherein the test task includes multiple test scripts.

[0013] The parsing unit is used to parse each test script in the test task to obtain the test scenario information corresponding to each test script;

[0014] A grouping unit is used to group the multiple test scripts based on the test scenario information to obtain at least one test group;

[0015] A filtering unit is used to filter an initial test set from the test group based on the test resources and the preset test indicators, wherein the initial test set includes at least two test groups that are merged for testing;

[0016] An update unit is used to update the initial test set based on the number of test scripts in the initial test set to obtain the target test set.

[0017] The determining unit is configured to determine the target test resources for test script reuse in the target test set from the test resources, and allocate the target test resources to the corresponding target test set.

[0018] In one embodiment, the filtering unit may include:

[0019] The initial test set discrimination subunit is used to discriminate the number of test scripts in the initial test set and obtain the discrimination result;

[0020] The merging subunit is used to merge the initial test set based on the discrimination result to obtain the target test set.

[0021] In one embodiment, the filtering unit may include:

[0022] The first calculation subunit is used to calculate the number of running scripts for each test device;

[0023] The first determining subunit is used to determine, based on the number of running scripts, the test groups that need to be merged in the at least one test group;

[0024] The first identification subunit is used to identify the initial test set in the test group to be merged based on the number of running scripts and the preset test indicators.

[0025] In one embodiment, the first determining subunit may include:

[0026] The first calculation module is used to calculate the multiple relationship between the number of test scripts and the number of running scripts in each test group;

[0027] The first matching module is used to match the multiple relationship and preset multiple conditions corresponding to each test group;

[0028] The first determining module is used to determine the test group as a test group that needs to be merged when the multiple relationship corresponding to the test group does not meet the preset multiple condition.

[0029] In one embodiment, the first identification subunit may include:

[0030] The second determining module is used to determine the number of test groups in the initial test set according to the preset test indicators;

[0031] The first combination module is used to combine the test groups to be merged according to the number of test groups in the initial test set to obtain a merged test set.

[0032] The first filtering module is used to filter out the initial test set from the merged test set based on the number of running scripts.

[0033] In one embodiment, the first filtering module can be used to:

[0034] Calculate the total number of test scripts in each merged test set;

[0035] Calculate the remainder relationship between the total number of test scripts and the number of run scripts;

[0036] Based on the remainder relationship, the initial test set is selected from the merged test set.

[0037] In one embodiment, the first screening module can also be used for:

[0038] Match the remainder relationships corresponding to the merged test sets with the preset remainder threshold;

[0039] When the remainder relationship corresponding to the merged test set meets the preset remainder threshold, the merged test set is determined as the test set to be cleaned.

[0040] Based on the benchmark test set in the test set to be cleaned, duplicate test sets that have a duplication relationship with the test set to be cleaned are selected from the merged test set.

[0041] The test set to be cleaned and the repeated test set are compared to obtain the comparison results.

[0042] Based on the comparison results, an initial test set is determined from the test set to be cleaned and the repeated test set.

[0043] In one embodiment, the discrimination subunit may include:

[0044] The second identification module is used to identify the number of test scripts corresponding to each test group in the initial test set;

[0045] The second calculation module is used to calculate the number of mergeable scripts in the initial test set based on the number of test scripts corresponding to each test group.

[0046] The discrimination module is used to discriminate the number of scripts that can be merged using preset quantity discrimination conditions, and obtain the discrimination result.

[0047] In one embodiment, the merging subunit may include:

[0048] The test set determination module is used to determine the remaining test set in at least one test group based on the initial test set;

[0049] The partitioning module is used to partition the test set to be updated and the test set to be processed from multiple initial test sets based on the discrimination result.

[0050] The filtering module is used to filter out test sets to be merged from the test set to be processed and the remaining test set based on the number of mergeable scripts in the test set to be updated;

[0051] The merging module is used to merge the test scripts in the test set to be merged into the test set to be updated, so as to obtain the target test set.

[0052] In one embodiment, the filtering module may include:

[0053] The second determination submodule is used to determine the remainder relationship between the test set to be processed and the number of scripts to be run, as well as the remainder relationship between the remaining test set and the number of scripts to be run.

[0054] The sorting submodule is used to sort the remaining test set and the test set to be processed based on the remainder relationship, so as to obtain the sorted test set;

[0055] The second calculation submodule is used to calculate the number of updated scripts in the test set to be updated based on the number of mergeable scripts in the test set to be updated.

[0056] The filtering submodule is used to filter out the test sets to be merged from the sorted test sets based on the number of updated scripts.

[0057] In one embodiment, the filtering submodule can be used to:

[0058] Based on the sorting results of the sorted test sets, at least one test set to be calculated is selected from the sorted test sets.

[0059] Calculate the total number of test scripts in the test set to be calculated;

[0060] When the total number of test scripts matches the updated number of scripts, the test set to be calculated is determined as the test set to be merged.

[0061] In one embodiment, the grouping unit may include:

[0062] The matching subunit is used to match the test scenario information corresponding to each test script and obtain the matching result;

[0063] The script filtering subunit is used to filter out related test scripts with a relationship from the test scripts based on the matching results.

[0064] Add a sub-unit to add the associated test script to a preset storage group to obtain the test group.

[0065] This application also provides a computer program product or computer program that includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in the various alternative embodiments described above.

[0066] Accordingly, embodiments of this application also provide a computer-readable storage medium storing instructions that, when executed by a processor, implement any of the test-based resource scheduling methods provided in embodiments of this application.

[0067] This application embodiment can obtain test resources corresponding to a test task, where the test task includes multiple test scripts; parse each test script in the test task to obtain test scenario information corresponding to each test script; group the multiple test scripts based on the test scenario information to obtain at least one test group; based on test resources and preset test indicators, select an initial test set from the test groups, wherein the initial test set includes at least two test groups for merging tests; update the initial test set based on the number of test scripts in the initial test set to obtain a target test set; determine the target test resources for test script reuse in the target test set from the test resources, and allocate the target test resources to the corresponding target test set. This can achieve reasonable scheduling of test resources, reduce the time required for testing, and thus improve testing efficiency. Attached Figure Description

[0068] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0069] Figure 1This is a schematic diagram of a scenario for the test-based resource scheduling method provided in an embodiment of this application;

[0070] Figure 2 This is a flowchart illustrating the test-based resource scheduling method provided in an embodiment of this application;

[0071] Figure 3 This is a schematic diagram of a scenario for the test-based resource scheduling method provided in an embodiment of this application;

[0072] Figure 4 This is another scenario illustration of the test-based resource scheduling method provided in the embodiments of this application;

[0073] Figure 5 This is another scenario illustration of the test-based resource scheduling method provided in the embodiments of this application;

[0074] Figure 6 This is another scenario illustration of the test-based resource scheduling method provided in the embodiments of this application;

[0075] Figure 7 This is another scenario illustration of the test-based resource scheduling method provided in the embodiments of this application;

[0076] Figure 8 This is another flowchart illustrating the test-based resource scheduling method provided in the embodiments of this application;

[0077] Figure 9 This is another scenario illustration of the test-based resource scheduling method provided in the embodiments of this application;

[0078] Figure 10 This is a schematic diagram of the structure of the test-based resource scheduling device provided in the embodiments of this application;

[0079] Figure 11 This is a schematic diagram of the structure of the computer device provided in the embodiments of this application. Detailed Implementation

[0080] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. However, the described embodiments are only some embodiments of this application, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.

[0081] This application proposes a test-based resource scheduling method, which can be executed by a test-based resource scheduling device integrated into a computer device. The computer device may include at least one of a terminal and a server. That is, the test-based resource scheduling method proposed in this application can be executed by a terminal, a server, or jointly by a terminal and a server capable of communicating with each other.

[0082] The terminal may include, but is not limited to, smartphones, tablets, laptops, personal computers (PCs), smart home appliances, wearable electronic devices, VR / AR devices, in-vehicle terminals, intelligent voice interaction devices, aircraft, and other terminal devices.

[0083] Servers can include, but are not limited to, servers that enable communication between multiple heterogeneous systems or backend servers. They can also be independent physical servers, server clusters or distributed systems composed of multiple physical servers, or cloud servers that provide basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, and big data and artificial intelligence platforms.

[0084] Terminals and servers can be connected directly or indirectly via wired or wireless communication, and this application does not impose any restrictions on this.

[0085] In one embodiment, such as Figure 1 The above example illustrates a content transmission method jointly executed by a terminal and a server. The resource scheduling system provided in this application includes a terminal 10 and a server 11, etc.; the terminal 10 and the server 11 are connected via a network, such as a wired or wireless network, etc., wherein the resource scheduling device can be integrated into the server.

[0086] Server 11 can be used to: acquire test resources corresponding to a test task, wherein the test task includes multiple test scripts; parse each test script in the test task to obtain test scenario information corresponding to each test script; group the multiple test scripts based on the test scenario information to obtain at least one test group; select a target test set from the test groups based on test resources and preset test indicators, wherein the target test set includes at least two test groups for merging tests; determine the target test resources reused by the test scripts in the target test set from the test resources, and allocate the target test resources to the corresponding target test set.

[0087] Terminal 10 can execute test tasks based on the target test resources allocated by the server, that is, run the test scripts in the test tasks.

[0088] In addition, the steps of scheduling test resources by server 11 can also be performed by terminal 10.

[0089] The following will provide a detailed description of each example. It should be noted that the order of description of the following embodiments is not intended to limit the preferred order of the embodiments.

[0090] This application will describe the embodiments from the perspective of a test-based resource scheduling device, which can be integrated into a computer device, such as a server or a terminal.

[0091] like Figure 2 The present invention provides a test-based resource scheduling method, the specific process of which includes:

[0092] 101. Obtain the test resources corresponding to the test task. The test task includes multiple test scripts.

[0093] Test resources can include the resources assigned to the test task. For example, test resources can include the equipment needed for the test, the test accounts needed for the test, and so on.

[0094] In general, a test script refers to a series of instructions for a specific test, which can be executed by automated testing tools. A test script is a computer-readable instruction that automates the testing process (or parts of the testing process). Test scripts can be created (recorded), automatically generated using test automation tools, or programmed using a programming language, and so on.

[0095] In one embodiment, software testing is the process of running or measuring a software system using manual or automated means, with the aim of verifying whether it meets specified requirements or clarifying the difference between expected and actual results. The software development cycle may involve multiple software tests, each of which may be the same or different. For example, the software development cycle may involve unit testing, integration testing, system testing, and acceptance testing, etc.

[0096] Acceptance testing is the final testing operation before software deployment. It's the software testing activity conducted after unit testing, integration testing, and system testing, and before product release. It's the final stage of technical testing, also known as delivery testing. The purpose of acceptance testing is to ensure that the software is ready and can be used by end users to perform its intended functions and tasks.

[0097] Acceptance testing demonstrates to future users that the system functions as intended. After integration testing, all modules have been assembled into a complete software system according to the design, and interface errors have been largely eliminated. The next step is to further verify the software's effectiveness; this is the task of acceptance testing—to ensure that the software's functionality and performance meet the reasonable expectations of users.

[0098] User Acceptance Testing (UAT) is a method for automatically generating test cases based on product requirement documents described in natural language.

[0099] During user acceptance testing, a product requirements document is generated. This document is a formatted description of the test requirements. It is a structured document with a defined format and syntax. For example, it may describe test tasks, test requirements, and test objectives.

[0100] In one embodiment, the test-based resource scheduling method proposed in this application can be for user acceptance testing.

[0101] In one embodiment, the testing process may include multiple test tasks, each containing a large number of test scripts. With limited testing resources, without proper scheduling, system resources cannot be effectively utilized, significantly impacting the operational efficiency of individual test tasks.

[0102] In existing technologies, the process of performing user acceptance tests may involve executing test scripts sequentially in order, without controlling the script execution process. Furthermore, some user acceptance tests may involve account switching, and existing technologies do not consider account login issues during the testing process.

[0103] For example, the current user acceptance test is for a social media application. Test script A requires test account A, while test script B requires test account B. If test script A and test script B are run on the same test device, after test script A is completed, the test device needs to switch from test account A to test account B before running test script B again.

[0104] For example, in most test tasks, the average runtime of each test script is between 6 and 7 minutes, while sequential account login takes 45 to 60 seconds. In extreme cases, account login can account for more than one-sixth of the script's execution time, severely impacting the efficiency of the test script in executing the test task. Ignoring the account login issue during testing will also significantly affect testing efficiency.

[0105] Therefore, the method proposed in this application embodiment can schedule test resources within a single test task, thereby improving the running efficiency of a single test task.

[0106] In one embodiment, there are multiple ways to obtain the test resources corresponding to the test task, and the test task includes multiple test scripts.

[0107] For example, the testing process includes multiple test tasks. Then, based on the workload of each test task, the total testing resources can be allocated to each test task, thus obtaining the corresponding testing resources for each test task. For instance, there are 5 test tasks in the testing process, with a total testing resource of 1000 test devices. Among these 5 test tasks, the first test task includes 50 test scripts, the second test task includes 100 test scripts, the third test task includes 25 test scripts, the fourth test task includes 200 test scripts, and the fifth test task includes 25 test scripts. Therefore, the first test task can obtain 125 test devices, the second test task can obtain 250 test devices, the third test task can obtain 63 test devices, the fourth test task can obtain 500 test devices, and the fifth test task can obtain 62 test devices.

[0108] For example, the testing process may include multiple test tasks. The total testing resources can then be evenly distributed among each test task, thus obtaining the corresponding testing resources for each task. For instance, if there are 5 test tasks and a total of 1000 test devices, based on the principle of even distribution, each test task can obtain 200 test devices.

[0109] 102. Parse each test script in the test task to obtain the test scenario information corresponding to each test script.

[0110] In one embodiment, the purpose of acceptance testing is to ensure that the software is ready and can be used by end users to perform its intended functions and tasks. Therefore, each test script can carry test scenario information, which specifies which application scenario within the software the test script is testing.

[0111] For example, when the software being tested is a payment application, the test scenario information may include whether the payment account is registered with a real name, whether the payment account has the payment function enabled, whether the payment function can be implemented correctly, whether the transfer function can be implemented correctly, and whether the account and bank card can be linked correctly, etc.

[0112] For example, when the software being tested is a video application, the test scenario information may include whether the video can be watched normally, whether the video search function can be implemented, and whether the video account is logged in, etc.

[0113] In one embodiment, the test scenario information corresponding to each test script can be recorded in the test requirement document. Therefore, the test requirement document can be traversed, and the test scenario information corresponding to each test script recorded in the test requirement document can be read to obtain the test scenario information corresponding to each test script.

[0114] In one embodiment, each test script has different test logic during its execution. For example, when the software being tested is a payment application, the test logic might involve binding a card or paying an order that reduces the account balance, and so on.

[0115] 103. Based on the test scenario information, group multiple test scripts to obtain at least one test group.

[0116] In one embodiment, the test scenario information between different test scripts may or may not be related.

[0117] In this context, when the test scenario information between different test scripts is related, it indicates that the test scripts can share test resources. For example, when the test scenario information between test script A and test script B is related, it means that test script A and test script B can share the information of a single test account for testing. For instance, the test scenario information for test script A is a decrease in the balance of a payment account, and its test logic is to change the balance of the payment account from 1000 yuan to 990 yuan. The test scenario for test script B is an increase in the balance of the payment account, and its test logic is to change the balance of the payment account from 990 yuan back to 1000 yuan. In this case, test script A and test script B are related, and they can share a single payment account. After test script A changes the balance of the payment account from 1000 yuan to 990 yuan, test script B can change the balance of the payment account from 990 yuan back to 1000 yuan.

[0118] When the test scenario information between different test scripts is not related, it means that the test scripts cannot share test resources. For example, if the test scenario information between test script A and test script C is not related, it means that test script A and test script C cannot share the same test account information for testing. For instance, if test script A's test scenario information is a mobile phone number login account, while test script C's test scenario information is an email login account, then test script A and test script C cannot share the same account information for testing.

[0119] Therefore, each test script in the test task can be parsed to obtain the test scenario information corresponding to each test script. Then, based on the test scenario information, the multiple test scripts are grouped to obtain at least one test group.

[0120] In one embodiment, the test scenario information corresponding to each test script can be matched to obtain a matching result. Then, the test scripts are grouped according to the matching result to obtain a test group. Specifically, the step "grouping multiple test scripts based on test scenario information to obtain at least one test group" may include:

[0121] The test scenario information corresponding to each test script is matched to obtain the matching results;

[0122] Based on the matching results, filter out the related test scripts that have a relationship in the test scripts;

[0123] Add the associated test scripts to the preset storage group to obtain the test group.

[0124] In one embodiment, the requirements document may record the relationships between each test script. Therefore, the requirements document can be used to match the test scenario information corresponding to each test script to obtain the matching result.

[0125] For example, testers can establish relationships between test scripts by writing requirements documents. Then, the resource scheduling device can read the information in the requirements documents to determine which test scripts have related test scenario information, and thus filter out the related test scripts.

[0126] Then, the resource scheduling device can add the associated test scripts to the preset storage group to obtain the test group.

[0127] For example, such as Figure 3 As shown, test scripts can be divided into multiple test groups based on their test scenario information. The number of test scripts contained in each test group may be the same or different. For example, ... Figure 3 As shown, test group 4800000 contains 279 test scripts, test group 4802817 contains 46 test scripts, and so on.

[0128] During testing, test scripts within the same test group can share the same test resources, thereby improving resource utilization. For example, test scripts within the same test group can share the same test account, increasing account utilization. Furthermore, since testing can be conducted using the same account, frequent account switching is unnecessary, saving testing time and improving overall efficiency.

[0129] 104. Based on test resources and preset test indicators, select an initial test set from the test groups. The initial test set includes at least two test groups that will be merged for testing.

[0130] In one embodiment, the initial test set can be selected from the test group based on test resources and preset test metrics.

[0131] The preset test metrics can include conditions that the test set must meet when merging test groups to obtain a test set. For example, the preset test metric could be that a maximum of one test account switch can be added on the same test device, and so on. By setting preset test metrics, the testing process can be restricted, thereby avoiding resource waste in extreme situations during the testing process, and so on. For example, when the preset test metric is that a maximum of one test account switch can be added on the same test device, the idle waiting mobile device resources can be utilized to the greatest extent.

[0132] For example, when the test resource is a test device, and the preset test metric is that at most one account switch can be added on the same test device, in order to make full use of the test device, one of the optimal ways is to make the initial test set utilize the test device evenly and in parallel, so as to avoid the occurrence of idle test devices or unrunn test scripts.

[0133] For example, if there are 4 test devices and 100 test scripts, and assuming that each test script has the same execution time, one optimal way to ensure that the 4 test devices can quickly complete the test scripts is to distribute the 100 test scripts evenly among the 4 test devices, thereby making full use of the test devices.

[0134] In this embodiment, running different test groups on the same test device involves account login, which consumes a significant amount of testing time. For example, during user acceptance testing, the average runtime of each test script in most test tasks is 6 to 7 minutes. A single account login takes 45 to 60 seconds, and in extreme cases, it can account for more than one-sixth of the script's execution time, severely impacting the efficiency of test script execution. Therefore, when merging test groups, it is necessary to set preset test metrics to limit the number of account switching attempts on the same test device, thereby saving testing time and improving the efficiency of test script execution.

[0135] In one embodiment, when the test resource is a test device, the preset test metric can be that a maximum of one test account switch can be added on the same test device. Therefore, an initial test set can be selected from the test group based on the test device and the preset test metric. Specifically, the step "selecting an initial test set from the test group based on the test resource and the preset test metric" can include:

[0136] Calculate the number of scripts to run for each test device;

[0137] Based on the number of scripts run, determine which test groups need to be merged from at least one test group;

[0138] Based on the number of running scripts and preset test metrics, the initial test set is identified in the test groups that need to be merged.

[0139] In one embodiment, the average number of running scripts that each test device can run can be calculated. For example, if the total number of test scripts for a test task is *s*, and there are *y* test devices, then the number of running scripts corresponding to each test device is *x* = *s* ÷ *y*. Where *s* ÷ *y* has a remainder, it can be rounded up to obtain the number of running scripts. For example, if the total number of test scripts for a test task is 700, and there are 100 test devices, then the number of running scripts corresponding to each test device is 7.

[0140] In one embodiment, after calculating the number of running scripts for each test device, if the number of test scripts in some test groups matches the calculated number of running scripts, then these test groups can temporarily avoid merging with other test groups. For example, if the number of running scripts is 7, and some test groups have a multiple of 7, then these test groups can be left unmerged with other test groups, thus eliminating the need for account switching during the execution of these test groups and improving testing efficiency. Conversely, if the number of test scripts in some test groups does not match the calculated number of running scripts, then these test groups are considered to need to be merged with other test groups.

[0141] Specifically, the step "Based on the number of run scripts, determine the test groups that need to be merged in at least one test group" may include:

[0142] Calculate the ratio between the number of test scripts and the number of run scripts in each test group;

[0143] Match the multiple relationships and preset multiple conditions corresponding to each test group;

[0144] When the multiple relationship of the test group does not meet the preset multiple conditions, the test group will be identified as a test group that needs to be merged.

[0145] Among them, the test groups that need to be merged can include test groups that need to be merged during the initial merge.

[0146] The multiple relationship indicates how many times the number of test scripts is greater than the number of run scripts. This multiple relationship can be an integer, a decimal, etc.

[0147] For example, such as Figure 3 The image shows the test scripts included in each test group within a test task. For example, in... Figure 3 In the test group 4800000, there are 279 test scripts, and in the test group 4802817, there are 46 test scripts, and so on.

[0148] Then, the ratio between the number of test scripts and the number of run scripts in each test group can be calculated; the ratio of each test group can be matched with the preset ratio conditions; when the ratio of a test group does not meet the preset ratio conditions, the test group is determined to be a test group that needs to be merged.

[0149] For example, the number of test scripts and the number of run scripts in each test group can be divided to obtain the multiple relationship between the number of test scripts and the total number of scripts. If the multiple relationship for a test group does not meet the preset condition of an integer multiple, then the test group is determined to be a test group that needs to be merged.

[0150] For example, the number of scripts to run is 7. According to Figure 3 Based on the number of test scripts for each test group, test groups 4802977, 4802793, 4802883, and 48028255 are not test groups that need to be merged because their number of test scripts is a multiple of 7. However, test groups 4800000, 4802817, and 4802874 are test groups that need to be merged because their number of test scripts is not a multiple of 7.

[0151] In one embodiment, after determining the test groups to be merged, an initial test set can be identified within the test groups based on the number of run scripts and preset test metrics. Specifically, the step "identifying the initial test set within the test groups to be merged based on the number of run scripts and preset test metrics" may include:

[0152] The number of test groups in the initial test set is determined based on the preset test indicators;

[0153] Based on the number of test groups in the initial test set, the test groups that need to be merged are combined to obtain the merged test set;

[0154] Based on the number of scripts run, an initial test set is selected from the merged test set.

[0155] In one embodiment, the number of test groups in the initial test set can be determined based on preset test metrics. For example, when the preset test metric is that a maximum of one account switch can be added on the same test device, the number of test groups in the initial test set is 2. As another example, when the preset test metric is that a maximum of two account switches can be added on the same test device, the number of test groups in the initial test set is 3.

[0156] In one embodiment, after determining the number of test groups in the initial test set, the test groups to be merged can be combined according to the number of test groups in the initial test set to obtain a merged test set.

[0157] There are several ways to combine test groups that need to be merged to obtain a merged test set.

[0158] For example, an exhaustive approach can be used to combine the test groups that need to be merged, resulting in a merged test set. For instance, the test groups to be merged might include test group A, test group B, and test group C, with an initial set containing two test groups. Then, by using an exhaustive approach to combine the test groups, test group A and test group B can be combined into one merged test set; test group A and test group C can be combined into another merged test set; and test group B and test group C can be combined into yet another merged test set.

[0159] For example, when combining test sets that need to be merged, the test sets can be sorted. For instance, they can be sorted according to the number of test scripts in each test set. Then, the test sets can be combined according to their sorted order. For example, test sets with higher sorting order can be combined with test sets with lower sorting order to obtain a merged test set.

[0160] In one embodiment, after obtaining the merged tests, an initial test set can be selected from the merged test set based on the number of run scripts. Specifically, the step "selecting an initial test set from the merged test set based on the number of run scripts" may include:

[0161] Calculate the total number of test scripts in each merged test set;

[0162] Calculate the remainder relationship between the total number of test scripts and the number of run scripts;

[0163] Based on the remainder relationship, an initial test set is selected from the merged test set.

[0164] In one embodiment, the total number of test scripts in each merged test set can be calculated. For example, the total number of test scripts can be obtained by adding up the number of test scripts in each test group of the merged test set.

[0165] Then, the remainder relationship between the total number of test scripts and the number of run scripts can be calculated. This involves taking the remainder between the total number of test scripts and the number of run scripts. For example, the remainder between the total number of test scripts and the number of run scripts can be 0, meaning the total number of test scripts is an integer multiple of the number of run scripts. Another example is that the remainder between the total number of test scripts and the number of run scripts can be 1, and so on.

[0166] In one embodiment, an initial test set can be selected from the merged test set based on the remainder relationship. Specifically, when selecting the initial test set, merged test sets whose remainder relationships meet a preset remainder threshold can be selected first. Since duplicate relationships may exist within the merged test sets—for example, the same test group may be merged into different merged test sets—the selected merged test sets must be cleaned to obtain the initial test set.

[0167] Specifically, the step "based on the remainder relationship, select the initial test set from the merged test set" may include:

[0168] Match the remainder relationships corresponding to the merged test sets with the preset remainder threshold;

[0169] When the remainder relationship corresponding to the merged test set meets the preset remainder threshold, the merged test set is determined as the test set to be cleaned.

[0170] Based on the benchmark test set in the test set to be cleaned, duplicate test sets that have a duplication relationship with the test set to be cleaned are screened out in the merged test set;

[0171] The test set to be cleaned and the repeated test set are compared and processed to obtain the comparison results;

[0172] Based on the comparison results, an initial test set is determined from the test set to be cleaned and the repeated test set.

[0173] In one embodiment, when combining test groups to be merged to obtain a merged test set, there may be instances where test groups are merged repeatedly. For example, test group A and test group B are merged to obtain one merged test set; then, test group A and test group C are merged to obtain another merged test set. Therefore, when selecting the initial test set, the merged test set needs to be cleaned to prevent repeated merging of test groups.

[0174] The test set to be cleaned may include test sets that may require determining whether there are duplicate merges.

[0175] The benchmark test set can include test sets in the test set to be cleaned. For example, if the test set to be cleaned includes test set A and test set B, then test set A can be used as the benchmark test set, or test set B can be used as the benchmark test set.

[0176] In one embodiment, the preset remainder threshold can be set based on the number of running scripts on the test device. For example, when the number of running scripts is 7, the preset remainder threshold can be set to 3, 4, or so on. The preset remainder threshold is used to restrict the remainder relationship. When the remainder relationship corresponding to the merged test set meets the preset remainder threshold, the merged test set can be identified as the test set to be cleaned. Conversely, when the remainder relationship corresponding to the merged test set does not meet the preset remainder threshold, the merged test set can be filtered out, and the next step is temporarily suspended.

[0177] For example, when the preset remainder threshold can be set to 3, if the remainder relationship corresponding to the merged test set is less than or equal to 3, it means that the remainder relationship corresponding to the merged test set meets the preset remainder threshold, and the merged test set can be identified as the test set to be cleaned. Conversely, if the remainder relationship corresponding to the merged test set is greater than 3, it means that the remainder relationship corresponding to the merged test set does not meet the preset remainder threshold, and the merged test set can be filtered out, and the next step can be temporarily suspended. For example, the test groups that failed to merge can be grouped together to form a remaining test set.

[0178] In one embodiment, duplicate test sets that have a duplication relationship with the test sets to be cleaned can be screened out from the merged test set based on the benchmark test set in the test set to be cleaned.

[0179] For example, if the test set 'a' to be cleaned includes test group A and test group B, test group A or test group B can be used as the benchmark test group. For instance, if test group A is used as the benchmark test group, duplicate test sets that also include test group A can be filtered out from the merged test set. For example, duplicate test sets 'b' and 'c' can be filtered out. Duplicate test set 'b' includes test group A and test group C, and duplicate test set 'c' includes test group A and test group D.

[0180] Then, the test set to be cleaned and the duplicate test set can be compared to obtain the comparison result. Based on the comparison result, an initial test set can then be determined from the test set to be cleaned and the duplicate test set.

[0181] For example, we can first select the test set with the lowest remainder relationship between the total number of test scripts and the number of run scripts in the test set to be cleaned, and the same remainder relationship between the total number of test scripts and the number of run scripts in the repeated test set, as the initial test set. For instance, in the test set to be cleaned, test group A has 8 test scripts, test group B has 2 test scripts, and the remainder relationship is 3. In the repeated test set b, test group A has 8 test scripts, test group C has 6 test scripts, and the remainder relationship is 0. Since the remainder relationship in the repeated test set b is less than that in the test set to be cleaned, the repeated test set b can be selected as the initial test set.

[0182] If there are cases where the remainder relationships of the test sets are the same, the initial test set can be determined based on the multiple relationship. For example, the test set with the lowest multiple relationship between the test set to be cleaned and the repeated test sets can be selected as the initial test set.

[0183] For example, in the test set to be cleaned, test group A has 8 test scripts, test group B has 2 test scripts, the remainder is 3, and the multiple relationship is 1. In the repeated test set b, test group A has 8 test scripts, test group C has 9 test scripts, the remainder is 3, and the multiple relationship is 2. Since the multiple relationship of the test set to be cleaned, test set a, is less than that of the repeated test set b, it can be determined as the initial test set.

[0184] In one embodiment, the above steps can be used to first select an initial test set. For example, as shown in the figure, test group 4800000 and test group 4802997 can be merged into one initial test set; test group 4802817 and test group 4802991 can be merged into another initial test set; test group 4802874 and test group 4802203 can be merged into another initial test set, and so on.

[0185] 105. Based on the number of test scripts in the initial test set, update the initial test set to obtain the target test set.

[0186] In one embodiment, after the initial test set is selected, some of the initial test sets may have idle resources.

[0187] For example, such as Figure 4 As shown, the initial test set includes test group 4800000 and test group 4802997. Test group 4800000 contains 279 scripts, while test group 4802997 contains only 1 script. When merging test groups 4800000 and 4802997 for testing, only one test device requires account switching, while a large number of test devices do not. Therefore, this initial test set can still provide a large number of additional test devices to ensure that only one account switch occurs when running the scripts. Thus, after obtaining the initial test set, it can be processed for discrimination to obtain the results. If it is determined that the initial test set can be further merged, it can be updated, i.e., further merged, to obtain the target test set.

[0188] For example, such as Figure 4 As shown, the initial test set includes test group 4802774 and test group 4802816, with each group containing two scripts, for a total of four test scripts in the initial test set. If the test equipment is directly allocated to this initial test set, the total number of scripts required for the initial test set (four scripts) is equivalent to seven scripts running on the test equipment, which does not fully utilize the equipment. Therefore, the initial test set can be updated to obtain the target test set, thereby improving the utilization rate of test resources.

[0189] The target test set includes at least two test groups that will be used for merged testing. By selecting the target test set from the test groups, test scripts from different test groups within the target test set can reuse test resources during the testing process, thereby improving the utilization rate of test resources. Specifically, merged test groups refer to test scripts from different test groups within the target test set that can reuse the same test equipment, reducing the occurrence of idle test equipment, thus improving resource utilization, reducing testing time, and ultimately improving testing efficiency.

[0190] In one embodiment, in order to further improve the rationality of resource scheduling, this application embodiment will update the initial test set based on the number of test scripts in the initial test set, taking into account test resources and preset test indicators, to obtain a target test set, so that the merged target test set can maximize the use of test resources.

[0191] Before updating the initial test set, a discrimination process can be performed on the initial test set to obtain a discrimination result. This discrimination process determines whether the initial test set can be merged again. If it can be merged again, the initial test set can be updated to obtain the target test set. Specifically, the step "based on test resources and preset test metrics, select the target test set from the test group" can include:

[0192] The initial test set is processed to determine the number of test scripts in the initial test set, and the determination result is obtained;

[0193] Based on the discrimination results, the initial test set is updated to obtain the target test set.

[0194] In one embodiment, the number of mergeable scripts corresponding to the initial test set can be calculated based on the number of test scripts in the initial test set. Then, based on the number of mergeable scripts in the initial test set, it can be determined whether the initial test set can be merged with other test sets.

[0195] Specifically, the step "to perform discrimination processing on the initial test set and obtain the discrimination result" may include:

[0196] Identify the number of test scripts corresponding to each test group in the initial test set;

[0197] Based on the number of test scripts corresponding to each test group, calculate the number of scripts that can be merged in the initial test set;

[0198] The number of scripts that can be merged is determined using preset quantity discrimination conditions, and the discrimination result is obtained.

[0199] The number of mergeable scripts in the initial test set refers to the number of test scripts in the initial test set that can be merged with test scripts from other test groups.

[0200] In one embodiment, the number of scripts that can be merged in the initial test set can be calculated according to the following formula:

[0201] L=ij×(x-1)

[0202] Where L can represent the number of scripts that can be merged, i can represent the number of test scripts with the largest number in the initial test set, j can represent the number of test scripts with the smallest number in the initial test set, and x can represent the number of running scripts on the test device.

[0203] The principle behind the above formula can be explained as follows: When running the test scripts in the initial test set, in order to improve the running efficiency, the test scripts can be evenly distributed to the test devices for running, so that the test scripts can be run simultaneously in parallel.

[0204] For example, such as Figure 5 As shown, the initial test set includes test group 4802817 and test group 4802991. Test group 4802817 has 46 test scripts, and test group 4802991 has 3 test scripts. Assuming the average number of scripts run per test device is 7, calculations show that this initial test set requires 7 test devices. To improve the efficiency of test script execution, the allocation method for distributing test scripts to these 7 test devices can be as follows: Figure 5 As shown. Therefore, for this initial test set, the number of scripts that can be merged is 46 - 3*(7-1) = 28.

[0205] In one embodiment, the number of scripts that can be merged can be determined using preset quantity discrimination conditions to obtain the discrimination result.

[0206] For example, if the number of mergeable scripts in the initial test set is less than or equal to zero, it means that there are no remaining scripts in the initial test set that can be merged for testing. Therefore, no new test scripts will be merged into this initial test set. However, it is possible to merge the test scripts in this initial test set into other initial test sets.

[0207] If the number of mergeable scripts in the initial test set is greater than zero, it means that the initial test set can continue to be merged, and the initial test set will be updated.

[0208] In one embodiment, after the initial test set is processed for discrimination, a test set to be updated can be divided from the initial test set according to the discrimination result, and then the test set to be updated can be updated.

[0209] Specifically, the step "updating the initial test set based on the discrimination result to obtain the target test set" may include:

[0210] Based on the initial test set, determine the remaining test set in at least one test group;

[0211] Based on the discrimination results, test sets to be updated and test sets to be processed are divided from multiple initial test sets.

[0212] Based on the test set to be updated, select the test set to be merged from the test set to be processed and the remaining test set;

[0213] The test scripts in the test set to be merged are merged into the test set to be updated to obtain the target test set.

[0214] The test set to be updated can include test sets where the number of mergeable scripts meets the remainder count criterion. The test set to be processed can include test sets where the number of mergeable scripts does not meet the remainder count criterion. For example, ... Figure 4 As shown, the initial test set including test group 4800000 and test group 4802997 can be the test set to be updated. The initial test set including test group 4802998 and test group 4802815 can be the test set to be processed.

[0215] The remaining test set may include test groups that were not successfully merged. For example, such as... Figure 4 As shown, the remaining test set may include test group 4802775 to test group 4802988.

[0216] In one embodiment, based on the discrimination results, a test set to be updated and a test set to be processed can be divided from multiple initial test sets.

[0217] For example, if the determination result indicates that the number of mergeable scripts in the initial test set meets the remainder count determination condition, the initial test set is designated as a test set to be updated. If the determination result indicates that the number of mergeable scripts in the initial test set does not meet the remainder count determination condition, the initial test set is designated as a test set to be processed.

[0218] In one embodiment, the test set to be merged can be selected from the test set to be processed and the remaining test set based on the number of mergeable scripts in the test set to be updated. Specifically, the step "selecting the test set to be merged from the test set to be processed and the remaining test set based on the number of mergeable scripts in the test set to be updated" may include:

[0219] Determine the remainder relationship between the number of test sets to be processed and the number of scripts to be run, as well as the remainder relationship between the remaining test sets and the number of scripts to be run;

[0220] Based on the remainder relationship, the remaining test set and the test set to be processed are sorted to obtain the sorted test set;

[0221] Based on the number of mergeable scripts in the test set to be updated, calculate the number of updated scripts in the test set to be updated.

[0222] Based on the number of updated scripts, select the test sets to be merged from the sorted test sets.

[0223] In one embodiment, since the previous steps calculated the remainder relationship between the number of test sets to be processed and the number of running scripts, the resource scheduling device can determine the remainder relationship between the number of test sets to be processed and the number of running scripts by reading historical data.

[0224] For the remaining test sets, the remainder relationship between the number of test groups and the number of run scripts in each remaining test set can be calculated. For example, ... Figure 4 As shown, the remaining test sets include test group 4802816 and test group 4802988. For test group 4802816, the remainder between its number of run scripts is 5, while for test group 4802988, the remainder between its number of run scripts is 6.

[0225] Then, based on the remainder relationship, the remaining test set and the test set to be processed can be sorted to obtain a sorted test set. For example, the remaining test set and the test set to be processed can be sorted from high to low according to the remainder relationship to obtain a sorted test set. The test groups in the remaining test set can be sorted as independent entities. For example, the sorted test set may include one test group or multiple test groups. When the sorted test set includes multiple test groups, this sorted test set can be the test set to be processed.

[0226] In one embodiment, in order to maximize resource utilization, the number of mergeable scripts in the test set to be updated can be updated to obtain the updated number of scripts.

[0227] The updated script count represents the number of scripts available for merging, assuming the tests to be updated are concentrated in the optimal scenario.

[0228] Specifically, the following formula can be used to filter out the test sets to be merged from the sorted test sets based on the number of updated scripts:

[0229]

[0230] Where n can represent the number of scripts after the update. This can represent the final number of devices that can be added within the test set to be updated, where the symbol " / " can be the modulo operator, rounding the result down. For example, when The result is a fraction, which can be rounded down to the nearest integer. Convert it to an integer.

[0231] For example, such as Figure 4As shown, the test set to be updated includes test group 4800000 and test group 4802997. Based on the number of test scripts in test groups 4800000 and 4802997, the number of scripts that can be merged in the test set to be updated can be calculated as 279 - (7 - 1) = 273. Then, using the formula above, we can calculate 273 / (7 - 1) = 45, 45 / (7 - 1) = 6, meaning that 6 more devices can be added to the test set to be updated. Therefore, the number of scripts after the update can be calculated as 6 * 7 = 42.

[0232] In one embodiment, the test set to be merged can be selected from the sorted test set based on the number of scripts that can be merged. Specifically, the step "selecting the test set to be merged from the sorted test set based on the number of updated scripts" may include:

[0233] Based on the sorting results of the sorted test sets, at least one test set to be calculated is selected from the sorted test sets.

[0234] Calculate the total number of test scripts in the test set to be calculated;

[0235] When the total number of test scripts matches the updated number of scripts, the test set to be calculated is determined as the test set to be merged.

[0236] For example, based on the sorting results, the top-ranked test set can be selected as the test set to be calculated. Then, the total number of test scripts in the test set to be calculated is calculated. When the total number of test scripts matches the updated script count, the test set to be calculated is designated as the test set to be merged. If the total number of test scripts does not match the updated script count, test sets from the sorted test set are added to the test set to be calculated, until the total number of test scripts in the test set to be calculated matches the updated script count.

[0237] For example, through the above steps, the test sets to be merged corresponding to the test sets to be updated, including test set 4800000 and test set 4802997, can be calculated as follows: Figure 5 As shown.

[0238] Then, the test scripts in the test set to be merged can be merged into the test set to be updated to obtain the target test set.

[0239] 106. Identify the target test resources that the test scripts in the target test set can reuse from the test resources, and allocate the target test resources to the corresponding target test set.

[0240] In one embodiment, target resources for test script reuse in the target test set can be determined from the test resources, and the target test resources can be allocated to the corresponding target test set.

[0241] For example, the number of test devices required for the target test set can be calculated based on the total number of test scripts in the target test set. After matching the target test set with the assigned test devices one by one, test tasks can be initiated to the test devices so that the test devices can run the test scripts.

[0242] For example, for a target test set including test group 4800000 and test group 4802997, 46 test devices can be allocated, of which 1 test device can be provided for combination with test group 4802997, 42 test devices can be used for combination with other test scripts, and the remaining 3 devices can be used to run the remainder 3 after 273 / (7-1) = 45.

[0243] In one embodiment, the process of testing the resource scheduling method proposed in this application can be as follows: Figure 7 As shown, during the test preparation phase, whenever a new test script is generated, the test script code package is uploaded to the test equipment platform via the script code building platform, and the relevant script code information is recorded in the user acceptance test platform. During the test initiation phase, testers submit script test instructions, which the user acceptance test platform parses, generates and schedules test tasks, initiates a test plan to the test equipment platform, and executes the relevant test scripts on the test equipment. During the test result processing phase, when a script finishes running, the test equipment platform calls back to the user acceptance test platform to parse the results and save the relevant test results. During the test report generation phase, when a task finishes running, the user acceptance test platform completes all test script execution results, automatically analyzes script execution exceptions, and pushes the results to the testers.

[0244] The script code building platform is used to build test scripts. For example, developers and testers can use the script code platform to develop, modify, and debug test scripts.

[0245] The testing equipment platform can be a management platform for testing equipment, capable of remotely controlling multiple testing devices via a control server. For example, when the testing device is a mobile phone, during the testing process, the testing equipment platform can distribute test scripts to each mobile phone for testing based on the merging of test scripts.

[0246] The user acceptance testing platform uses the method proposed in the embodiments of this application to group test scripts to improve the running efficiency of script execution tasks during the scheduling of multiple script tasks, formulate script execution plans, and initiate tests to the test equipment platform.

[0247] This application proposes a test-based resource scheduling method, which may include: acquiring test resources corresponding to a test task, wherein the test task includes multiple test scripts; parsing each test script in the test task to obtain test scenario information corresponding to each test script; grouping the multiple test scripts based on the test scenario information to obtain at least one test group; selecting a target test set from the test groups based on test resources and preset test indicators, wherein the target test set includes at least two test groups for merged testing; determining target test resources reused by test scripts in the target test set from the test resources, and allocating the target test resources to the corresponding target test sets. This application embodiment can classify and group test scripts according to the different test scenario information corresponding to the test scripts to obtain multiple test groups. In this system, different test scripts within the same test group can be tested using the same test account. The account status is reset through account recovery, avoiding the need to log out and log in again each time. For multiple test scripts after grouping, the test groups are merged according to the number of test scripts in different test groups using the method provided in this application embodiment to obtain a target test set. Based on the target test set, the system allocates available test resources in the system, efficiently schedules system resources, and parses script execution reports in parallel to maximize the running efficiency of script execution tasks within available device resources and reduce the construction cost of test resources.

[0248] Based on the method described in the above embodiments, the following examples will provide further detailed explanations.

[0249] This application will use the integration of a test-based resource scheduling method on a server as an example to illustrate the method of this application.

[0250] In one embodiment, such as Figure 8 As shown, a test-based resource scheduling method is described below, with the specific process as follows:

[0251] 201. The server obtains the test resources corresponding to the test task. The test task includes multiple test scripts.

[0252] 202. The server parses each test script in the test task to obtain the test scenario information corresponding to each test script.

[0253] During the test script debugging phase, test scenario information is set for each test script. For example, when testing a payment application, test scenario information may include, but is not limited to, whether the payment account is verified with a real name, whether it has a WeChat Wallet account, its balance, and the number of linked bank cards. It's important to note that the test scenario information set during testing is custom-designed and simulated; it does not involve real user information. Next, scripts can be grouped according to the test scenario information, and account status can be reset via account recovery, avoiding the need to log out and log back in each time.

[0254] During the execution of test scripts, each script contains different test logic, such as binding a card to an account or reducing the account balance by making an order. Account recovery can be achieved by backing up the test account data and repeatedly overwriting it, resetting the account to its initial state before the test script's logic begins to run. During user acceptance testing, in most tasks, the average execution time of each script is within 6 to 7 minutes, while a single account login takes 45 to 60 seconds. In extreme cases, account login accounts for more than one-sixth of the test script's execution time, severely impacting the efficiency of the test script execution tasks. For example, as... Figure 9 As shown, Figure 9 To access the application's operation interface 002 from the application's login screen 001. (This is done via...) Figure 9 As can be seen, the time required to navigate from the application's login interface 001 to the application's operation interface 002 is 52 seconds, severely impacting the efficiency of test script execution. Therefore, test scripts that can use the same account group can be assigned to the same test device for execution. This allows these scripts to share the same account information, avoiding frequent account switching and significantly improving script execution efficiency. Furthermore, assuming no scheduling is implemented for scripts within a group, and all scripts are run in a completely random manner, in extreme cases, all devices might run scripts from different groups each time, requiring account switching. Therefore, effective scheduling is necessary to ensure all test tasks run in an orderly and high-quality manner.

[0255] 203. Based on the test scenario information, the server groups multiple test scripts to obtain at least one test group.

[0256] First, the required set of test scripts can be obtained based on the filtering criteria of the test tasks. These filtering criteria can include the test scenarios required by the testers. In one embodiment, different testers require different test scenarios, and therefore different test scripts. Therefore, the required set of test scripts can be selected from all the test scripts based on the filtering criteria of the test tasks.

[0257] Then, the test scripts can be grouped according to their test scenario information. For example, such as Figure 3 As shown, the test group represents the code of the test group, and the number of test scripts represents the total number of test scripts in that test group. For example, as... Figure 3 As shown, test group 4800000 covered a total of 279 test scripts in the test task, and test group 4802817 covered a total of 46 scripts.

[0258] 204. Based on test resources and preset test indicators, the server selects a target test set from the test groups. The target test set includes at least two test groups that will be merged for testing.

[0259] For example, assuming each test script has a runtime of 1 unit, the server can calculate the number of test devices allocated to the current test task based on system resources, and then calculate the average number of test scripts that can be run on each test device.

[0260] For example, there are 10,000 test devices on the testing platform. Currently, there are 10 test tasks that need to be processed in parallel. Therefore, 1,000 test devices can be allocated to each test task. Then, the average number of test scripts that each test device can run in the current test task can be calculated. For example, we can assume the number of test scripts is x, where x is greater than 1. When x equals 1, all test scripts can be assigned to one test device, without involving account switching issues. If each test group runs independently, then each test group must be allocated at least one test device. When test device resources are limited, this can lead to a large number of test groups with single scripts (or other scripts far from meeting the average number of test scripts that can run on one test device) monopolizing a single machine. For example, ... Figure 3 Test groups such as 4802997 and 4802988 are included. When the script of the test group to which it belongs finishes running, the test device will be idle and waiting.

[0261] Grouped test scripts need to be merged to ensure that at most one account switch occurs on the same mobile device, maximizing the utilization of idle mobile device resources. First, filter out the groups whose number of scripts in the same test group is an integer multiple of x. Assuming that the average number of test scripts running per mobile device is 7, then 4802977 and 4802793, 4802883 and 48028255, etc., belong to the group set that does not need to be merged.

[0262] For the remaining groups, merge two complementary test groups that can form an integer multiple of x, then merge two test groups that are one script short of an integer multiple of x, and so on. When multiple combinations exist, prioritize the group with lower integer multiples. For example, when 8 and 3 scripts combine to form 11, and 15 and 3 combine to form 18, and there are still 3 scripts short of a multiple of 7, prioritize combining 8 and 3. Figure 4 As shown, arrows of the same color indicate merging into a group, such as merging 4800000 and 4802997 into a group, merging 4802817 and 4802203 into a group, etc., all of which are multiples of 7; while the sum of the groups merged from 4802827 and 4802993 is 11, which is 3 scripts away from being a multiple of 7; in addition, most of the remaining groups are also far from being a multiple of 7 after merging, and are suitable for the next group merging method.

[0263] Take the user group with the most scripts and its corresponding group Y. After the initial grouping and merging, it can still provide a large number of mobile devices to ensure that only one account switch is required when running scripts. For example, the difference can be taken from the user group with the fewest scripts and the largest difference from the integer multiple of x after merging, and used to merge with group Y to form a new group until group Y can no longer guarantee that only one account switch is required when other user groups are tested. Assuming that the number of scripts in group Y is a and b, where a represents the user group with more scripts, the formula for calculating the number of scripts required to ensure that only one account switch is required when other user groups are tested is as follows: (((ab*(x-1)) / (x-1)) / x)*x(ax*((ab*(x-1))%(x-1))) / (x-1), and the result is rounded down. Where " / " is the modulo operator, (ab*(x-1)) represents the remaining number w of scripts 'a' that can be merged with other test groups, (ab*(x-1)) / (x-1) represents the final number m of scripts that can be merged with its test group, rounded down, and ((ab*(x-1)) / (x-1)) / x represents the final number of devices that can be added within the test group, rounded down to n. This is because m may be a multiple of x, while in the original group of 'a' and 'b', it is already a multiple of x. Only n integer devices can be added to this group; any excess cannot be added. For example, as... Figure 4 As shown, test group 4800000 actually only has one device that needs to switch to user group 4802997. Therefore, w is 279 - (7 - 1) = 273. This merged initial test set can still provide 273 devices to be merged with other groups, thus ensuring that only one device switch occurs after the addition of a new test script. Through calculation, m is 273 / (7 - 1) = 45, meaning that the initial test set can be merged with a maximum of 45 new test scripts to ensure one switch. In addition, n is 45 / (7 - 1) = 6. By merging with 45 new scripts, a maximum of 6 devices can be added to this group, resulting in a final total of 46 devices in the group. Of these 46 devices, 1 device can be used for the combination of test groups 4800000 and 4802997, 42 devices can be used for combinations with other scripts, and the remaining 3 devices can be used to run the remainder 3 after 273 / (7-1)=45. All remaining devices can still guarantee that after user group 4800000 finishes running, only one account switch will be added among the remaining 42 machines (a total of 43 devices). A total of 301 scripts were actually run in the group. For example... Figure 6As shown, the initial test set with a gray background represents the original group, while the others are test sets that can be provided to ensure that other devices only need to switch accounts once. There are two termination conditions. The merging of test sets ends when either one is not met: 1. When all initial test sets that are not multiples of x after merging have been further merged, the merging in step 6 ends; 2. When ab*(x-1)<=0 or (ax*((ab*(x-1))%(x-1))) / (x-1)<=0, the merging ends.

[0264] 205. The server determines the target test resources that the test scripts in the target test set can reuse from the test resources, and allocates the target test resources to the corresponding target test set.

[0265] Based on the total number of test scripts in each target test set, the number of mobile devices in each target test set is calculated. Each target test set is then matched with mobile device resources, and test tasks are initiated to the test device platform. The test groups with the largest number of test scripts in each target test set are run sequentially on the mobile devices within the target test set, followed by the test groups with the smallest number of test scripts. This ensures that at most one account switch occurs on the same mobile device within the target test set.

[0266] The test script is sent to the test equipment platform, which then distributes the matching test script associated with the scheduled script execution task to the test equipment for execution. A callback is configured in the test script code to indicate when the script execution is complete. The callback triggers the system to receive the script execution result returned by the test equipment platform. At the same time, the system completes the script execution result that was not received normally by periodically polling and checking the results. This maximizes the running efficiency of script execution tasks within available equipment resources and reduces the construction cost of test resources.

[0267] This application proposes a test-based resource scheduling method, which may include: a server acquiring test resources corresponding to a test task, wherein the test task includes multiple test scripts; the server parsing each test script in the test task to obtain test scenario information corresponding to each test script; the server grouping the multiple test scripts based on the test scenario information to obtain at least one test group; the server selecting a target test set from the test groups based on the test resources and preset test indicators, wherein the target test set includes at least two test groups for merging tests; the server determining the target test resources reused by the test scripts in the target test set from the test resources, and allocating the target test resources to the corresponding target test sets, which can achieve reasonable scheduling of test resources, reduce the time required for testing, and thus improve testing efficiency.

[0268] To better implement the test-based resource scheduling method provided in this application, one embodiment also provides a test-based resource scheduling device, which can be integrated into a computer device. The meanings of the terms used are the same as in the test-based resource scheduling method described above, and specific implementation details can be found in the descriptions in the method embodiments.

[0269] In one embodiment, a test-based resource scheduling device is provided, which can be integrated into a computer device, such as... Figure 10 As shown, the test-based resource scheduling device includes: an acquisition unit 601, a parsing unit 602, a grouping unit 603, a filtering unit 604, an update unit 605, and a determination unit 606, as detailed below:

[0270] The acquisition unit 601 is used to acquire the test resources corresponding to the test task, wherein the test task includes multiple test scripts;

[0271] The parsing unit 602 is used to parse each test script in the test task to obtain the test scenario information corresponding to each test script;

[0272] Grouping unit 603 is used to group the plurality of test scripts based on the test scenario information to obtain at least one test group;

[0273] The filtering unit 604 is used to filter out an initial test set from the test group based on the test resources and the preset test indicators, wherein the initial test set includes at least two test groups that are merged for testing.

[0274] The update unit 605 is used to update the initial test set based on the number of test scripts in the initial test set to obtain the target test set;

[0275] The determining unit 606 is used to determine the target test resources for test script reuse in the target test set from the test resources, and to allocate the target test resources to the corresponding target test set.

[0276] In one embodiment, the filtering unit 604 may include:

[0277] The discrimination subunit is used to discriminate the number of test scripts in the initial test set and obtain the discrimination result;

[0278] The merging subunit is used to merge the initial test set based on the discrimination result to obtain the target test set.

[0279] In one embodiment, the initial test set, the filtering unit may include:

[0280] The first calculation subunit is used to calculate the number of running scripts for each test device;

[0281] The first determining subunit is used to determine, based on the number of running scripts, the test groups that need to be merged in the at least one test group;

[0282] The first identification subunit is used to identify the initial test set in the test group to be merged based on the number of running scripts and the preset test indicators.

[0283] In one embodiment, the first determining subunit may include:

[0284] The first calculation module is used to calculate the multiple relationship between the number of test scripts and the number of running scripts in each test group;

[0285] The first matching module is used to match the multiple relationship and preset multiple conditions corresponding to each test group;

[0286] The first determining module is used to determine the test group as a test group that needs to be merged when the multiple relationship corresponding to the test group does not meet the preset multiple condition.

[0287] In one embodiment, the first identification subunit may include:

[0288] The second determining module is used to determine the number of test groups in the initial test set according to the preset test indicators;

[0289] The first combination module is used to combine the test groups to be merged according to the number of test groups in the initial test set to obtain a merged test set.

[0290] The first filtering module is used to filter out the initial test set from the merged test set based on the number of running scripts.

[0291] In one embodiment, the first filtering module can be used to:

[0292] Calculate the total number of test scripts in each merged test set;

[0293] Calculate the remainder relationship between the total number of test scripts and the number of run scripts;

[0294] Based on the remainder relationship, the initial test set is selected from the merged test set.

[0295] In one embodiment, the first screening module can also be used for:

[0296] Match the remainder relationships corresponding to the merged test sets with the preset remainder threshold;

[0297] When the remainder relationship corresponding to the merged test set meets the preset remainder threshold, the merged test set is determined as the test set to be cleaned.

[0298] Based on the benchmark test set in the test set to be cleaned, duplicate test sets that have a duplication relationship with the test set to be cleaned are selected from the merged test set.

[0299] The test set to be cleaned and the repeated test set are compared to obtain the comparison results.

[0300] Based on the comparison results, an initial test set is determined from the test set to be cleaned and the repeated test set.

[0301] In one embodiment, the discrimination subunit may include:

[0302] The second identification module is used to identify the number of test scripts corresponding to each test group in the initial test set;

[0303] The second calculation module is used to calculate the number of mergeable scripts in the initial test set based on the number of test scripts corresponding to each test group.

[0304] The discrimination module is used to discriminate the number of scripts that can be merged using preset quantity discrimination conditions, and obtain the discrimination result.

[0305] In one embodiment, the merging subunit may include:

[0306] The test set determination module is used to determine the remaining test set in at least one test group based on the initial test set;

[0307] The partitioning module is used to partition the test set to be updated and the test set to be processed from multiple initial test sets based on the discrimination result.

[0308] The filtering module is used to filter out test sets to be merged from the test set to be processed and the remaining test set based on the number of mergeable scripts in the test set to be updated;

[0309] The merging module is used to merge the test scripts in the test set to be merged into the test set to be updated, so as to obtain the target test set.

[0310] In one embodiment, the filtering module may include:

[0311] The second determination submodule is used to determine the remainder relationship between the test set to be processed and the number of scripts to be run, as well as the remainder relationship between the remaining test set and the number of scripts to be run.

[0312] The sorting submodule is used to sort the remaining test set and the test set to be processed based on the remainder relationship, so as to obtain the sorted test set;

[0313] The second calculation submodule is used to calculate the number of updated scripts in the test set to be updated based on the number of mergeable scripts in the test set to be updated.

[0314] The filtering submodule is used to filter out the test sets to be merged from the sorted test sets based on the number of updated scripts.

[0315] In one embodiment, the filtering submodule can be used to:

[0316] Based on the sorting results of the sorted test sets, at least one test set to be calculated is selected from the sorted test sets.

[0317] Calculate the total number of test scripts in the test set to be calculated;

[0318] When the total number of test scripts matches the updated number of scripts, the test set to be calculated is determined as the test set to be merged.

[0319] In one embodiment, the grouping unit 603 may include:

[0320] The matching subunit is used to match the test scenario information corresponding to each test script and obtain the matching result;

[0321] The script filtering subunit is used to filter out related test scripts with a relationship from the test scripts based on the matching results.

[0322] Add a sub-unit to add the associated test script to a preset storage group to obtain the test group.

[0323] In practice, each of the above units can be implemented as an independent entity or can be arbitrarily combined to be implemented as the same or several entities. For the specific implementation of each of the above units, please refer to the previous method embodiments, which will not be repeated here.

[0324] The aforementioned test-based resource scheduling device can achieve reasonable scheduling of test resources, reduce the time required for testing, and thus improve testing efficiency.

[0325] This application also provides a computer device, which may include a terminal or a server. For example, the computer device may serve as a test-based resource scheduling terminal, such as a mobile phone, tablet computer, etc.; or the computer device may serve as a server, such as a test-based resource scheduling server. Figure 11 As shown, it illustrates the structural diagram of the terminal involved in the embodiments of this application, specifically:

[0326] The computer device may include components such as a processor 801 with one or more processing cores, a memory 802 with one or more computer-readable storage media, a power supply 803, and an input unit 804. Those skilled in the art will understand that... Figure 11 The computer device structure shown does not constitute a limitation on the computer device and may include more or fewer components than shown, or combine certain components, or have different component arrangements. Wherein:

[0327] The processor 801 is the control center of the computer device, connecting various parts of the computer device through various interfaces and lines. It performs various functions and processes data by running or executing software programs and / or modules stored in the memory 802, and by calling data stored in the memory 802. Optionally, the processor 801 may include one or more processing cores; preferably, the processor 801 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user page, and application programs, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 801.

[0328] The memory 802 can be used to store software programs and modules. The processor 801 executes various functional applications and data processing by running the software programs and modules stored in the memory 802. The memory 802 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 802 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 802 may also include a memory controller to provide the processor 801 with access to the memory 802.

[0329] The computer device also includes a power supply 803 that supplies power to the various components. Preferably, the power supply 803 can be logically connected to the processor 801 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. The power supply 803 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.

[0330] The computer device may also include an input unit 804, which can be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.

[0331] Although not shown, the computer device may also include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 801 in the computer device loads the executable files corresponding to the processes of one or more application programs into the memory 802 according to the following instructions, and the processor 801 runs the application programs stored in the memory 802 to realize various functions, as follows:

[0332] Obtain the test resources corresponding to the test task, wherein the test task includes multiple test scripts;

[0333] Each test script in the test task is parsed to obtain the test scenario information corresponding to each test script;

[0334] Based on the test scenario information, the multiple test scripts are grouped to obtain at least one test group;

[0335] Based on the test resources and the preset test indicators, an initial test set is selected from the test group, wherein the initial test set includes at least two test groups that are merged for testing;

[0336] Based on the number of test scripts in the initial test set, the initial test set is updated to obtain the target test set;

[0337] From the test resources, determine the target test resources that the test scripts in the target test set can reuse, and allocate the target test resources to the corresponding target test set.

[0338] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.

[0339] According to one aspect of this application, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in the various optional implementations of the above embodiments.

[0340] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by a computer program, or by a computer program controlling related hardware. The computer program can be stored in a computer-readable storage medium and loaded and executed by a processor.

[0341] Therefore, embodiments of this application also provide a storage medium storing a computer program that can be loaded by a processor to execute steps in any of the test-based resource scheduling methods provided in embodiments of this application. For example, the computer program can execute the following steps:

[0342] Obtain the test resources corresponding to the test task, wherein the test task includes multiple test scripts;

[0343] Each test script in the test task is parsed to obtain the test scenario information corresponding to each test script;

[0344] Based on the test scenario information, the multiple test scripts are grouped to obtain at least one test group;

[0345] Based on the test resources and the preset test indicators, an initial test set is selected from the test group, wherein the initial test set includes at least two test groups that are merged for testing;

[0346] Based on the number of test scripts in the initial test set, the initial test set is updated to obtain the target test set;

[0347] From the test resources, determine the target test resources that the test scripts in the target test set can reuse, and allocate the target test resources to the corresponding target test set.

[0348] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.

[0349] Since the computer program stored in the storage medium can execute the steps in any of the test-based resource scheduling methods provided in the embodiments of this application, the beneficial effects that any of the test-based resource scheduling methods provided in the embodiments of this application can achieve can be realized. For details, please refer to the previous embodiments, which will not be repeated here.

[0350] The above provides a detailed description of a test-based resource scheduling method, apparatus, computer device, and storage medium provided in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A test-based resource scheduling method, characterized in that, include: Obtain the test resources corresponding to the test task, wherein the test task includes multiple test scripts; and wherein the test resources include at least one test device. Each test script in the test task is parsed to obtain the test scenario information corresponding to each test script; Based on the test scenario information, the multiple test scripts are grouped to obtain at least one test group; Based on the test resources and preset test indicators, an initial test set is selected from the test groups, including: calculating the number of running scripts for each test device; determining the test groups to be merged from the at least one test group based on the number of running scripts; determining the number of test groups in the initial test set according to the preset test indicators; combining the test groups to be merged according to the number of test groups in the initial test set to obtain a merged test set; calculating the total number of test scripts in each merged test set; calculating the remainder relationship between the total number of test scripts and the number of running scripts; and selecting the initial test set from the merged test set based on the remainder relationship; wherein the initial test set includes at least two test groups for merged testing; Based on the number of test scripts in the initial test set, the initial test set is updated to obtain the target test set; From the test resources, determine the target test resources that the test scripts in the target test set can reuse, and allocate the target test resources to the corresponding target test set.

2. The method according to claim 1, characterized in that, The step of determining which test groups need to be merged from the at least one test group based on the number of running scripts includes: Calculate the ratio between the number of test scripts in each test group and the number of run scripts; Match the multiple relationships and preset multiple conditions corresponding to each test group; When the multiple relationship corresponding to a test group does not meet the preset multiple condition, the test group is determined to be a test group that needs to be merged.

3. The method according to claim 1, characterized in that, The step of selecting the initial test set from the merged test set based on the remainder relationship includes: Match the remainder relationships corresponding to the current merged test set with the preset remainder threshold; When the remainder relationship corresponding to the current merged test set meets the preset remainder threshold, the merged test set is determined as the test set to be cleaned. Based on the benchmark test set in the test set to be cleaned, duplicate test sets that have a duplication relationship with the test set to be cleaned are selected from the remaining merged test sets. The test set to be cleaned and the repeated test set are compared to obtain the comparison results. Based on the comparison results, an initial test set is determined from the test set to be cleaned and the repeated test set.

4. The method according to claim 1, characterized in that, The step of updating the initial test set based on the number of test scripts in the initial test set to obtain the target test set includes: The number of test scripts in the initial test set is determined to obtain the determination result; Based on the discrimination result, the initial test set is merged to obtain the target test set.

5. The method according to claim 4, characterized in that, The process of determining the number of test scripts in the initial test set to obtain a determination result includes: Identify the number of test scripts corresponding to each test group in the initial test set; Based on the number of test scripts corresponding to each test group, calculate the number of scripts that can be merged in the initial test set; The number of scripts that can be merged is determined using preset quantity discrimination conditions to obtain the discrimination result.

6. The method according to claim 4, characterized in that, The process of merging the initial test set based on the discrimination result to obtain the target test set includes: Based on the initial test set, determine the remaining test set in at least one test group; Based on the discrimination results, test sets to be updated and test sets to be processed are divided into multiple initial test sets; Based on the number of mergeable scripts in the test set to be updated, a test set to be merged is selected from the test set to be processed and the remaining test set; The test scripts in the test set to be merged are merged into the test set to be updated to obtain the target test set.

7. The method according to claim 6, characterized in that, The step of selecting test sets to be merged from the unprocessed test set and the remaining test set based on the number of mergeable scripts in the test set to be updated includes: Determine the remainder relationship between the number of test sets to be processed and the number of scripts to be run, as well as the remainder relationship between the remaining test sets and the number of scripts to be run; Based on the remainder relationship, the remaining test set and the test set to be processed are sorted to obtain the sorted test set; Based on the number of mergeable scripts in the test set to be updated, calculate the number of updated scripts in the test set to be updated. Based on the number of updated scripts, select the test sets to be merged from the sorted test sets.

8. The method according to claim 7, characterized in that, The step of selecting the test set to be merged from the sorted test set based on the updated number of scripts includes: Based on the sorting results of the sorted test sets, at least one test set to be calculated is selected from the sorted test sets. Calculate the total number of test scripts in the test set to be calculated; When the total number of test scripts matches the updated number of scripts, the test set to be calculated is determined as the test set to be merged.

9. The method according to claim 1, characterized in that, Based on the test scenario information, the multiple test scripts are grouped to obtain at least one test group, including: The test scenario information corresponding to each test script is matched to obtain the matching results; Based on the matching results, related test scripts with a correlation relationship are selected from the test scripts; The associated test script is added to a preset storage group to obtain the test group.

10. A test-based resource scheduling device, characterized in that, include: An acquisition unit is used to acquire test resources corresponding to a test task, wherein the test task includes multiple test scripts; and the test resources include at least one test device. The parsing unit is used to parse each test script in the test task to obtain the test scenario information corresponding to each test script; A grouping unit is used to group the multiple test scripts based on the test scenario information to obtain at least one test group; A filtering unit is used to filter an initial test set from the test group based on the test resources and preset test indicators, wherein the initial test set includes at least two test groups that are merged for testing; An update unit is used to update the initial test set based on the number of test scripts in the initial test set to obtain a target test set. The determining unit is configured to determine, from the test resources, the target test resources that are reused by the test scripts in the target test set, and allocate the target test resources to the corresponding target test set; The filtering unit includes: The first calculation subunit is used to calculate the number of running scripts for each test device; The first determining subunit is used to determine, based on the number of running scripts, the test groups that need to be merged in the at least one test group; The first identification subunit is used to identify the initial test set in the test group to be merged based on the number of running scripts and the preset test indicators. The first identification subunit includes: The second determining module is used to determine the number of test groups in the initial test set according to the preset test indicators; The first combination module is used to combine the test groups to be merged according to the number of test groups in the initial test set to obtain a merged test set. The first filtering module is used to calculate the total number of test scripts in each merged test set; calculate the remainder relationship between the total number of test scripts and the number of running scripts; and filter out the initial test set from the merged test set based on the remainder relationship.

11. The apparatus according to claim 10, characterized in that, The filtering unit includes: The initial test set discrimination subunit is used to discriminate the number of test scripts in the initial test set and obtain the discrimination result; The merging subunit is used to merge the initial test set based on the discrimination result to obtain the target test set.

12. The apparatus according to claim 10, characterized in that, The first determining subunit includes: The first calculation module is used to calculate the multiple relationship between the number of test scripts and the number of running scripts in each test group; The first matching module is used to match the multiple relationship and preset multiple conditions corresponding to each test group; The first determining module is used to determine the test group as a test group that needs to be merged when the multiple relationship corresponding to the test group does not meet the preset multiple condition.

13. The apparatus according to claim 10, characterized in that, The first filtering module is further configured to: Match the remainder relationships corresponding to the merged test sets with the preset remainder threshold; When the remainder relationship corresponding to the merged test set meets the preset remainder threshold, the merged test set is determined as the test set to be cleaned. Based on the benchmark test set in the test set to be cleaned, duplicate test sets that have a duplication relationship with the test set to be cleaned are selected from the merged test set. The test set to be cleaned and the repeated test set are compared to obtain the comparison results. Based on the comparison results, an initial test set is determined from the test set to be cleaned and the repeated test set.

14. The apparatus according to claim 11, characterized in that, The initial test set discrimination subunit includes: The second identification module is used to identify the number of test scripts corresponding to each test group in the initial test set; The second calculation module is used to calculate the number of mergeable scripts in the initial test set based on the number of test scripts corresponding to each test group. The discrimination module is used to discriminate the number of scripts that can be merged using preset discrimination conditions, and obtain the discrimination result.

15. The apparatus according to claim 14, characterized in that, The merging subunit includes: The test set determination module is used to determine the remaining test set in at least one test group based on the initial test set; The partitioning module is used to partition the test set to be updated and the test set to be processed from multiple initial test sets based on the discrimination result. The filtering module is used to filter out test sets to be merged from the test set to be processed and the remaining test set based on the number of mergeable scripts in the test set to be updated; The merging module is used to merge the test scripts in the test set to be merged into the test set to be updated, so as to obtain the target test set.

16. The apparatus according to claim 15, characterized in that, The filtering module includes: The second determination submodule is used to determine the remainder relationship between the test set to be processed and the number of scripts to be run, as well as the remainder relationship between the remaining test set and the number of scripts to be run. The sorting submodule is used to sort the remaining test set and the test set to be processed based on the remainder relationship, so as to obtain the sorted test set; The second calculation submodule is used to calculate the number of updated scripts in the test set to be updated based on the number of mergeable scripts in the test set to be updated. The filtering submodule is used to filter out the test sets to be merged from the sorted test sets based on the number of updated scripts.

17. The apparatus according to claim 16, characterized in that, The filtering submodule is used for: Based on the sorting results of the sorted test sets, at least one test set to be calculated is selected from the sorted test sets. Calculate the total number of test scripts in the test set to be calculated; When the total number of test scripts matches the updated number of scripts, the test set to be calculated is determined as the test set to be merged.

18. The apparatus according to claim 10, characterized in that, The grouping unit includes: The matching subunit is used to match the test scenario information corresponding to each test script and obtain the matching result; The script filtering subunit is used to filter out related test scripts with a relationship from the test scripts based on the matching results. Add a sub-unit to add the associated test script to a preset storage group to obtain the test group.

19. A computer device, characterized in that, It includes a memory and a processor; the memory stores an application program, and the processor runs the application program within the memory to perform the operations in the test-based resource scheduling method according to any one of claims 1 to 9.

20. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a plurality of instructions adapted for loading by a processor to perform the steps of the test-based resource scheduling method according to any one of claims 1 to 9.

21. A computer program product, comprising a computer program or instructions, characterized in that, When the computer program or instructions are executed by the processor, they implement the steps of the test-based resource scheduling method according to any one of claims 1 to 9.