Resource allocation method, device and system for acceptance test

Through the collaboration between the acceptance test platform and the test platform, the index value of the test script is used to select idle resources in the pre-configured resource center, which solves the problems of high correlation cost and difficult reuse in the acceptance test, and realizes efficient sharing of resources and Reuse.

CN119473866APending Publication Date: 2025-02-18TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310980552.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-04
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

In the acceptance test of the existing technology, the new demand script construction and testing resources are related to high costs, and it is difficult to reuse test resources.

Method used

Through the collaboration between the acceptance test platform and the test platform, a test task is generated and when the test task is scheduled, an idle resource is selected as a test resource in the preconfigured resource set based on the index value of the test script, a test environment is built and the test of the test script is completed.

Benefits of technology

Reduces the correlation cost between test scripts and test resources, improves the reuse rate of test resources, reduces resource competition, and realizes resource sharing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119473866A_ABST
    Figure CN119473866A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of software testing, in particular to a resource allocation method, device and system for acceptance testing, which are used for reducing the association cost of test scripts and test resources and improving the repeated utilization rate of the test resources. The method comprises the steps of generating a test task based on respective script information of at least one test script selected by an object; when the test task is scheduled, submitting the test task to a test platform; each time a resource acquisition request returned by a test platform based on a test task is received, aiming at at least one index value carried in the resource acquisition request, the following operations are respectively executed until the test task is executed: in a pre-configured resource set associated with one index value, selecting a resource in an idle state at present as a test resource, and sending the test resource to a test platform, so that the test platform constructs a test environment based on the test resource, and completes the test of the test script corresponding to one index value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of software testing technology, and in particular to a resource allocation method, device and system for acceptance testing. Background Art

[0002] Acceptance testing is a test performed on the client to confirm whether the software can meet the business requirements of the target. During the acceptance process, due to the richness and variety of test scenarios, it is often necessary to construct test scenarios to meet the test conditions of the test script.

[0003] The implementation scheme of the prior art is usually to use manual configuration to set a scheduled task and a list of scripts to be run, specific test resources (such as test accounts, testability application programming interfaces (APIs), input data, etc.) for each client through a configuration file. Once the set time is reached, the server will start the scheduled task (or crontab task, through the crontab command, you can execute specified system instructions or scripts at fixed intervals). The scheduled task reads the server configuration file and runs the scripts to be executed on each client in turn for regression.

[0004] In this way, when testing new requirements, it is necessary to reconfigure the files, set the scheduled tasks and script lists, and reallocate the test resources. The test scripts of the new requirements are associated with high costs for test resources, and it is difficult to reuse test resources.

[0005] It can be seen that under the relevant technology, the script construction of new requirements is associated with high costs of test resources, and it is difficult to reuse test resources. Therefore, it is necessary to redesign a resource allocation method for acceptance testing to overcome the above defects. Summary of the invention

[0006] Embodiments of the present application provide a resource allocation method, device, and system for acceptance testing, which are used to reduce the associated costs of test scripts and test resources and improve the reuse rate of test resources.

[0007] In a first aspect, an embodiment of the present application provides a resource allocation method for acceptance testing, including:

[0008] Generate a test task based on script information of at least one test script selected by the object, wherein the script information includes at least: an index value of the corresponding test script;

[0009] When the test task is scheduled, submitting the test task to the test platform;

[0010] Each time the test platform receives a resource acquisition request returned based on the test task, the following operations are performed for at least one index value carried in the resource acquisition request until the test task is completed:

[0011] In a set of preconfigured resources associated with an index value, resources that are currently in an idle state are selected as test resources, and the test resources are sent to the test platform so that the test platform builds a test environment based on the test resources to complete the test of the test script corresponding to the index value.

[0012] In a second aspect, an embodiment of the present application provides a resource allocation method for acceptance testing, including:

[0013] Acquire a test task submitted by an acceptance test platform, wherein the test task includes script information of at least one test script, and the script information includes at least: an index value of a corresponding test script;

[0014] Sending a resource acquisition request to the acceptance test platform at least once based on the test task until the test task is completed, wherein during one sending process, performing the following operations:

[0015] Sending a resource acquisition request carrying at least one index value to the acceptance test platform;

[0016] For the at least one index value, the following operations are performed respectively: receiving test resources corresponding to an index value returned by the acceptance test platform, using the test resources to build a test environment, and completing the test of the test script corresponding to the index value; wherein the test resources are resources selected by the acceptance test platform from the pre-configured resource set associated with the index value and are currently in an idle state.

[0017] In a third aspect, an embodiment of the present application provides a resource allocation method for acceptance testing, including:

[0018] Generate a test task based on script information of at least one test script selected by the object, wherein the script information includes at least: an index value of the corresponding test script;

[0019] When the test task is scheduled, the following operations are performed respectively for at least one obtained index value until the test task is completed:

[0020] In a set of pre-configured resources associated with an index value, resources that are currently in an idle state are selected as test resources to construct a test environment, and a test of a test script corresponding to the index value is completed.

[0021] In a fourth aspect, an embodiment of the present application provides a resource allocation system for acceptance testing, the system comprising a user acceptance test platform and a test equipment platform in communication connection, wherein:

[0022] The user acceptance platform is used to generate a test task based on the script information of at least one test script selected by the object, wherein the script information at least includes: an index value of the corresponding test script; when the test task is scheduled, the test task is submitted to the test platform; and each time the test platform receives a resource acquisition request returned based on the test task, the following operations are performed for at least one index value carried in the resource acquisition request until the test task is completed: from a set of preconfigured resources associated with an index value, a resource that is currently in an idle state is selected as a test resource, and the test resource is sent to the test platform;

[0023] The test device platform is used to obtain the test task submitted by the acceptance test platform, configure at least one test device, and use the at least one test device to test the test script corresponding to the at least one index value. During the test process, at least one resource acquisition request is sent to the acceptance test platform based on the test task until the test task is completed, wherein, during one sending process, the following operations are performed: a resource acquisition request carrying at least one index value is sent to the acceptance test platform, and for the at least one index value, the following operations are performed respectively: a test resource corresponding to an index value returned by the acceptance test platform is received, a test environment is constructed using the test resource, and the test of the test script corresponding to the index value is completed.

[0024] In a fifth aspect, an embodiment of the present application provides a resource allocation device for acceptance testing, including:

[0025] A task generating unit, configured to generate a test task based on script information of at least one test script selected by the object, wherein the script information includes at least: an index value of the corresponding test script;

[0026] A task scheduling unit, used for submitting the test task to the test platform when the test task is scheduled;

[0027] The resource allocation unit is configured to perform the following operations respectively for at least one index value carried in the resource acquisition request each time the resource acquisition request is received by the test platform based on the test task, until the test task is completed:

[0028] In a set of preconfigured resources associated with an index value, resources that are currently in an idle state are selected as test resources, and the test resources are sent to the test platform so that the test platform builds a test environment based on the test resources to complete the test of the test script corresponding to the index value.

[0029] In a possible implementation manner, the resource allocation unit configures the preconfigured resource set in the following manner:

[0030] Based on the description of the historical test case, generate a historical test script and historical script information of the historical test script, wherein the historical script information includes a historical index value corresponding to the historical test script;

[0031] Extracting and classifying resource features contained in the historical test cases to obtain test resource information, wherein the resource features represent: resource types required by the historical test cases;

[0032] Based on the test resource information, selecting at least one resource for constructing a historical test environment corresponding to the historical test script from the configured platform resources;

[0033] The at least one resource is used as a preconfigured resource set associated with the historical index value.

[0034] In a possible implementation manner, the task scheduling unit determines that the test task is scheduled in the following manner:

[0035] Adding the test task to the task scheduling pool;

[0036] When it is determined that there are idle device resources in the test platform and the scheduling priority of the test task in the task scheduling pool meets a preset priority condition, it is determined that the test task is scheduled.

[0037] In a possible implementation manner, the resource allocation unit is further configured to:

[0038] After the test task is executed, obtaining the test result of each of the at least one test script from the test platform;

[0039] Analyze at least one test result obtained and generate a test report;

[0040] The test report is pushed to the object.

[0041] In a sixth aspect, an embodiment of the present application provides a resource allocation device for acceptance testing, including:

[0042] An acquisition unit is used to acquire a test task submitted by an acceptance test platform, wherein the test task includes script information of at least one test script, and the script information includes at least: an index value of a corresponding test script;

[0043] The acceptance test unit is used to send at least one resource acquisition request to the acceptance test platform based on the test task until the test task is completed, wherein during one sending process, the following operations are performed:

[0044] Sending a resource acquisition request carrying at least one index value to the acceptance test platform;

[0045] For the at least one index value, the following operations are performed respectively: receiving test resources corresponding to an index value returned by the acceptance test platform, using the test resources to build a test environment, and completing the test of the test script corresponding to the index value; wherein the test resources are resources selected by the acceptance test platform from the pre-configured resource set associated with the index value and are currently in an idle state.

[0046] In a possible implementation manner, the acceptance test unit is further used to:

[0047] Before sending at least one resource acquisition request to the acceptance test platform based on the test task, instruct at least one pre-configured test device to call the test script corresponding to the at least one index value for testing, wherein each test device calls a test script that has not been called by other test devices each time, and reports the index value corresponding to the called test script to obtain test resources for building a test environment.

[0048] In a possible implementation manner, the acceptance test unit is further used to:

[0049] After the indication pre-configured at least one test device calls the test script corresponding to the at least one index value for testing, for a target test device among the at least one test device, when the target test device completes the testing of the currently called test script, if it is determined that there is a test script that has not been called by other test devices, the target test device is instructed to continue calling the test script that has not been called by other test devices for testing; if it is determined that the test scripts corresponding to all index values ​​have been called or have completed the testing, the occupation of the target test device by the test task is released.

[0050] In a possible implementation manner, the acceptance test unit is further used to:

[0051] After the test task is executed, obtaining a script running result of at least one test script;

[0052] The acceptance test platform is called to parse at least one script running result obtained to obtain a test result corresponding to at least one test script.

[0053] In a seventh aspect, an embodiment of the present application provides a resource allocation device for acceptance testing, including:

[0054] A task generating unit, configured to generate a test task based on script information of at least one test script selected by the object, wherein the script information includes at least: an index value of the corresponding test script;

[0055] The acceptance test unit is used to perform the following operations respectively for at least one obtained index value when the test task is scheduled, until the test task is completed:

[0056] In a set of pre-configured resources associated with an index value, resources that are currently in an idle state are selected as test resources to construct a test environment, and a test of a test script corresponding to the index value is completed.

[0057] In an eighth aspect, an electronic device provided by an embodiment of the present application comprises a processor and a memory, wherein the memory stores a program code, and when the program code is executed by the processor, the processor executes the steps of the resource allocation method for acceptance testing provided in the first aspect, the second aspect or the third aspect above.

[0058] In a ninth aspect, an embodiment of the present application provides a computer program product or a computer program, the computer program product or the computer program including computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the steps of the resource allocation method for acceptance testing provided in the first aspect, the second aspect, or the third aspect.

[0059] In the tenth aspect, an embodiment of the present application provides a computer-readable storage medium, which includes a program code. When the program product is run on an electronic device, the program code is used to enable the electronic device to execute the steps of the resource allocation method for acceptance testing provided in the first aspect, the second aspect or the third aspect above.

[0060] The beneficial effects of this application are as follows:

[0061] In an embodiment of the present application, the testing of the test task is completed through the collaboration of the acceptance test platform and the test platform. First, in the test preparation stage, the acceptance test platform associates the index value of each test script with the resource set required for building the test environment when testing the test script. In this way, in the test task generation and scheduling stage, after the acceptance test platform generates the test task based on the script information selected by the object, when the test task is scheduled, the test task is submitted to the test platform, and the test platform allocates test equipment and builds a test environment to test the test script included in the test task. When building the test environment, the test platform can directly request the test resources required to build the test environment from the acceptance test platform based on the index value of the test script. That is, by associating the test set with the index value of the test script, the test resources required to build the test environment can be directly obtained through the index value of the test script each time the test script is tested. Compared with each reallocation in the related art, the association cost of the test script and the test resource is reduced.

[0062] At the same time, after the acceptance test platform receives the resource acquisition request containing the index value sent by the test platform, it selects the currently idle resources in the preconfigured resource set associated with the index value as the test resource, and sends the test resource to the test platform. That is, the acceptance test platform performs unified resource allocation based on the existing idle resources in the preconfigured resource set associated with the index value of the test script, thereby reducing resource competition between test scripts, effectively realizing resource sharing, and improving the reuse rate of test resources.

[0063] Other features and advantages of the application will be described in the subsequent description, and partly become apparent from the description, or be understood by practicing the application. The purpose and other advantages of the application can be realized and obtained by the structures particularly pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0064] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0065] Figure 1 A schematic diagram of an application scenario in an embodiment of the present application;

[0066] Figure 2 This is a flowchart of a resource allocation method for acceptance testing in an embodiment of the present application;

[0067] Figure 3 A schematic diagram of an interface for selecting script information for submitting a test task in an embodiment of the present application;

[0068] Figure 4 A schematic diagram of a use case description of a test case in an embodiment of the present application;

[0069] Figure 5 A schematic diagram of extracting resource features from test cases and classifying them in an embodiment of the present application;

[0070] Figure 6 A schematic diagram of associating a test account with an index value of a test script in an embodiment of the present application;

[0071] Figure 7 A schematic diagram of associating a testability API with an index value of a test script in an embodiment of the present application;

[0072] Figure 8 A schematic diagram of associating input data with an index value of a test script in an embodiment of the present application;

[0073] Fig. 9 is an implementation flow chart of another resource allocation method for acceptance testing in an embodiment of the present application;

[0074] Fig.10 A schematic diagram of scheduling a test device to call a test script for testing in an embodiment of the present application;

[0075] Fig.11 A schematic diagram of scheduling for another test device to call a test script to perform a test in an embodiment of the present application;

[0076] Fig.12 This is a schematic diagram of the structure of a resource allocation system for acceptance testing in an embodiment of the present application;

[0077] Fig.13 This is a schematic diagram of the interaction between the acceptance test platform and the test platform in the test task preparation phase in an embodiment of the present application;

[0078] Fig.14 This is a schematic diagram of the interaction between a task generation and scheduling phase acceptance test platform and a test platform in an embodiment of the present application;

[0079] Fig.15 A schematic diagram of the interaction between a task execution phase acceptance test platform and a test platform in an embodiment of the present application;

[0080] Fig.16 A schematic diagram of the interaction between an acceptance test platform and a test platform during the script report parsing phase in an embodiment of the present application;

[0081] Fig.17 A schematic diagram of the interaction between a task execution completion phase acceptance test platform and a test platform in an embodiment of the present application;

[0082] Fig.18 This is a flowchart of another resource allocation method for acceptance testing in an embodiment of the present application;

[0083] Fig.19 It is a structural schematic diagram of a resource allocation device for acceptance testing in an embodiment of the present application;

[0084] Fig. 20 It is a structural schematic diagram of another resource allocation device for acceptance testing in an embodiment of the present application;

[0085] Fig.21 It is a structural schematic diagram of another resource allocation device for acceptance testing in an embodiment of the present application;

[0086] Fig. 22 A schematic diagram of the hardware structure of an electronic device to which an embodiment of the present application is applied. DETAILED DESCRIPTION

[0087] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the technical solution of the present application, rather than all of the embodiments. Based on the embodiments recorded in the application documents, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the technical solution of the present application.

[0088] The following is an introduction to some concepts involved in the embodiments of the present application.

[0089] 1. User Acceptance Testing (UAT), a method of automatically generating test cases based on product requirement documents described in natural language.

[0090] 2. Testability API, which is independent of the business code, is used to modify the environment properties or account behavior during the running of the test script so that the test script can enter the expected page and ensure the normal operation of the test script.

[0091] The following is a brief introduction to the design concept of the embodiment of the present application:

[0092] Acceptance testing is a test performed on the client to confirm whether the software can meet the business requirements of the target. During the acceptance process, due to the richness and variety of test scenarios, it is often necessary to construct test scenarios to meet the test conditions of the test script.

[0093] The implementation scheme of the prior art is usually to use manual configuration to set scheduled tasks and a list of scripts to be run, and specific test resources (such as test accounts, testability APIs, input data, etc.) for each client through configuration files. Once the set time is reached, the server will start the scheduled task (or crontab task, through the crontab command, you can execute specified system instructions or scripts at fixed intervals). The scheduled task reads the server configuration file and runs the scripts to be executed on each client in turn for regression.

[0094] In this way, when testing new requirements, it is necessary to reconfigure the files, set the scheduled tasks and script lists, and reallocate the test resources. The test scripts of the new requirements are associated with high costs for test resources, and it is difficult to reuse test resources.

[0095] It can be seen that under the relevant technology, the script construction of new requirements is associated with high costs of test resources, and it is difficult to reuse test resources. Therefore, it is necessary to redesign a resource allocation method for acceptance testing to overcome the above defects.

[0096] In view of this, the embodiment of the present application provides a resource allocation method, device and system for acceptance testing. In the embodiment of the present application, the test of the test task is completed through the collaboration of the acceptance test platform and the test platform. First, in the test preparation stage, the acceptance test platform associates the resource set required for building the test environment when testing the test script for the index value of each test script. In this way, in the test task generation and scheduling stage, after the acceptance test platform generates the test task based on the script information selected by the object, when the test task is scheduled, the test task is submitted to the test platform, and the test platform allocates the test equipment and builds the test environment to test the test script contained in the test task. When building the test environment, the test platform can directly request the acceptance test platform to build the test resources required for the test environment based on the index value of the test script, that is, by associating the test set with the index value of the test script, each time the test script is tested, the test resources required for building the test environment can be directly obtained through the index value of the test script, which reduces the association cost of the test script and the test resource compared to each reallocation in the related art.

[0097] At the same time, after the acceptance test platform receives the resource acquisition request containing the index value sent by the test platform, it selects the currently idle resources in the preconfigured resource set associated with the index value as the test resource, and sends the test resource to the test platform. That is, the acceptance test platform performs unified resource allocation based on the existing idle resources in the preconfigured resource set associated with the index value of the test script, thereby reducing resource competition between test scripts, effectively realizing resource sharing, and improving the reuse rate of test resources.

[0098] The preferred embodiments of the present application are described below in conjunction with the drawings in the specification. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present application, and are not used to limit the present application. In addition, the embodiments and features in the embodiments of the present application may be combined with each other if there is no conflict.

[0099] See also Figure 1 As shown, it is a schematic diagram of an application scenario of an embodiment of the present application. The application scenario diagram includes: a terminal device 10, a server 11 and a computer device 12.

[0100] The embodiment of the present application can be implemented by a computer device 12, which can obtain a test task from a terminal device 10 used by an object (for example, a test task generated by an acceptance test platform in the terminal device 10 based on the script information of at least one test script selected by the object), call the test platform, test the test task using a pre-configured test device, and return the test result (for example, the test result of each test script) to the terminal device 10, and the acceptance test platform in the terminal device 10 parses the test result, generates a test report, and displays the test report to the object on the terminal device 10. The computer device 12 can exchange data with the terminal device 10 and the server 11, and the computer device 12 can be a server, or can belong to the terminal device 10 (the background of the terminal device 10), etc., which is not limited here.

[0101] The terminal device 10 may be a mobile phone or a laptop computer, or a playback device in a vehicle, etc., and is not limited here. The terminal device 10 may be considered as a playback device in a vehicle, and the terminal device 10 may display an application of an automated test system, etc. Figure 1 The terminal devices in the figure only show some of the devices, and the terminal devices in this disclosure are not limited to the Figure 1 The device shown in .

[0102] It is understandable that the terminal device mentioned in the embodiments of the present disclosure may be a computer device, and the computer device in the embodiments of the present disclosure includes but is not limited to a terminal device or a server. In other words, the computer device may be a server or a terminal device, or a system consisting of a server and a terminal device. Among them, the terminal device mentioned above may be an electronic device, including but not limited to a mobile phone, a tablet computer, a desktop computer, a laptop computer, a PDA, a vehicle-mounted device, an augmented reality / virtual reality (AR / VR) device, a helmet display, a smart TV, a wearable device, a smart speaker, a digital camera, a camera and other mobile Internet devices (Mobile Internet Device, MID) with network access capabilities, or terminal devices in scenarios such as trains, ships, and flights.

[0103] Among them, the server 11 mentioned above can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, vehicle-road collaboration, content delivery networks (Content Delivery Network, CDN), as well as big data and artificial intelligence platforms.

[0104] Optionally, the data involved in the embodiments of the present disclosure may be stored in a computer device, or the data may be stored based on cloud storage technology, which is not limited here.

[0105] The following describes the resource allocation method for acceptance testing provided by the exemplary embodiment of the present application in combination with the application scenario described above and with reference to the accompanying drawings. It should be noted that the above application scenario is only shown to facilitate understanding of the spirit and principles of the present application, and the implementation of the present application is not limited in this respect.

[0106] See also Figure 2 As shown, it is an implementation flow chart of a resource allocation method for acceptance testing in an embodiment of the present application, with the acceptance test platform as the execution subject, and the specific implementation process of the method is as follows:

[0107] S201, generating a test task based on the script information of at least one test script selected by the object, where the script information at least includes: an index value of the corresponding test script.

[0108] In specific implementation, the acceptance test platform records the script information of the test script, which includes but is not limited to: the index value of the test script, the code version of the test script, the client version of the test script, etc. Among them, the index value of the test script is an identifier used to uniquely distinguish each test script. The code version of the test script refers to the version of each test script, for example, 1.0, 2.0, etc.

[0109] The test platform stores the code of the test script. After building the test environment, the test equipment in the test platform can download the test script to execute the test. The test script in the test platform is uploaded by the script code building platform. The information exchange about the test script between the test platform and the acceptance test platform is realized through the script index value.

[0110] The following is a detailed introduction to the test preparation stage to introduce the script information of the test scripts stored in the acceptance test platform and the origin of the test scripts stored in the test platform. Specifically:

[0111] In the test preparation stage, the acceptance test platform generates the index value and test script (i.e., the first version of the test script) of the test script based on the description of the test case. The programmer writes or modifies the test case based on the first version of the test script to generate a new version of the test script, and pushes the new version of the test script to the code repository. When the code building platform in the acceptance test platform detects that the test script in the code repository has changed, it generates a changed version compressed package for the changed test script. The code building platform then uploads the version change compressed package corresponding to the test script to the test platform, and sends the code version of the new version of the test script to the acceptance test platform. The acceptance test platform synchronously records the correspondence between the test script and the code version. At the same time, the acceptance test platform can also associate the resource set of various test resources required to build the test environment with the index value of the test script.

[0112] In addition, it should be noted that the code building platform can also generate the latest client version to be released by means of scheduled construction, every preset time period (for example, every day) all client changes in the previous preset time period (previous day). After the code building platform completes the construction of the client installation file, it uploads it to the test platform. The test platform stores the relevant data in the storage structure and calculates md5 for record. When building the test environment in the subsequent testing process, it performs security verification on the client downloaded from the test device. At the same time, the code building platform synchronously sends the client version information to the acceptance test platform for record.

[0113] In this way, the acceptance test platform records the script information of the test script and the relevant information of the tested client, and the test platform records the code of the test script. When creating a test task, the object can select the script information of one or more test scripts in the acceptance test platform, that is, specify the test of the selected test script. This script information not only includes the index value of the test script, but also includes the version of the tested client running the test script, the version of the test script, etc. In addition, the embodiment of the present application can also provide advanced options, such as requesting the object to select uppercase and lowercase fonts, requesting the object to customize different test contents, etc. After the object selection is completed, the object's selection data is submitted to the acceptance test platform, and the acceptance test platform parses and converts the above object's selection data to generate a test task.

[0114] It should be noted that the test scripts can also be selected by the object in the form of a collection or a test case, such as Figure 3 As shown, when the subject creates a new test task in the acceptance test platform, he can directly select a test case or a test script set (for example: directly connect to the merchant system-collection). This test case contains 1516 test scripts. The subject can also select the client version to be tested, etc. After completing the selection, the subject clicks the "Confirm to initiate" button to submit the test task.

[0115] S202: When a test task is scheduled, submit the test task to the test platform.

[0116] In specific implementation, after the acceptance test platform generates the test task based on the object selection, it can make a comprehensive evaluation of the test task based on the task parameters of the test task, and then set the test task priority for the test task, wherein the task parameters of the test task may include but are not limited to: whether the initiator of the test task is the system (the acceptance test platform itself), the importance of the initiator of the test task, the scale of the test task, etc. For example, the task priority of a test task whose initiator is the system can be set higher than the task priority of a test task whose initiator is other objects.

[0117] The test task is added to the task scheduling pool. When it is determined that there are idle device resources in the test platform and the task priority of the test task in the task scheduling pool meets the preset priority condition, the test task is determined to be scheduled and submitted to the test platform for testing. At the same time, the test acceptance platform can also specify how many test devices the test platform uses to test the test task by providing test parameters. Among them, the preset priority condition can be pre-set, for example, the preset priority condition is the highest priority, or the preset priority condition is the earliest creation time, etc.

[0118] In actual applications, the task scheduler in the acceptance test platform periodically polls whether all scheduled test tasks have been completed. If the scheduled test tasks have been executed and the test is completed, the task scheduler schedules all the test tasks to be executed in the task scheduling pool, and sorts the test tasks to be executed according to the task priority and test task submission time. The task scheduler obtains the script data to be tested through the database and specifies as many full devices as possible to submit the test tasks. Specifically, when the number of test scripts in the test task is less than or equal to the number of test devices, the number of task devices submitted for testing is equal to the number of test scripts. When the number of test scripts in the test task is greater than the number of devices, the number of task devices submitted for testing is equal to the number of available devices. When there are still idle devices, the next high-priority task is submitted for testing in turn until all test tasks are scheduled or there are no idle devices available for testing.

[0119] Of course, in another embodiment of the present invention, when the task priority of the currently submitted test task is higher than the priority of at least one test task currently being executed in the test platform, in order to ensure the delivery efficiency of the test task with a higher task priority, the embodiment of the present application can also obtain the task priority of at least one test task currently being executed in the test platform after submitting the test task to the test platform, and determine that the task priority of the newly generated target test task is higher than the task priority of at least one test task obtained. At this time, regardless of whether there are idle test equipment resources in the test platform, the target test task will be submitted to the test platform, so that the test platform can execute the target test tasks in parallel to ensure the delivery efficiency of the target test tasks.

[0120] During specific implementation, if the acceptance test platform submits a test task with a higher task priority to the test platform, and there is available test equipment in the test platform, the available test equipment will be used to test the test task submitted by the acceptance test platform. If there is currently no available test equipment in the test platform, the test platform will instruct one or more test tasks currently being executed to release some test equipment, and use the released part of the test equipment to test the test task with a higher task priority newly submitted by the acceptance test platform.

[0121] S203: Each time the test platform receives a resource acquisition request returned based on a test task, the following operations are performed for at least one index value carried in the resource acquisition request until the test task is completed: From a set of preconfigured resources associated with an index value, select resources that are currently idle as test resources, and send the test resources to the test platform so that the test platform builds a test environment based on the test resources and completes the test of a test script corresponding to an index value.

[0122] In specific implementation, after the test platform receives the test task submitted by the acceptance test platform, if the acceptance test platform submits the test parameters and specifies the list of available devices and the upper limit of the required devices when submitting the test task, the test platform allocates the test equipment for the test task according to the test parameters submitted by the acceptance test platform. Subsequently, the test platform initializes the test equipment and instructs the test equipment to call the test script corresponding to the index value in the test task for testing. Before testing, the test environment needs to be built. At this time, the test equipment can send a resource acquisition request containing the index value of the test script to the acceptance platform through the test platform to request the test resources required to build the test environment.

[0123] It should be noted that when the test task contains script information of multiple test scripts, that is, when the test task needs to test multiple test scripts, when building the test environment for each test script, the test platform needs to obtain test resources from the acceptance test platform through a resource acquisition request carrying the index value of the test script. Therefore, in the specific implementation, a resource acquisition request can carry the index value of a test script to obtain the test resources of a test script, or a resource acquisition request can carry the index values ​​of multiple test scripts to obtain the test resources of multiple test scripts respectively. The embodiment of the present application is not limited to this.

[0124] In actual applications, when the acceptance test platform receives a resource acquisition request returned by the test platform based on the test task, if the resource acquisition request carries an index value of a test script, the acceptance test platform selects the currently idle resources in the preconfigured resource set associated with the index value as the test resource, and sends the test resource to the test platform, so that the test platform builds a test environment based on the test resource and completes the test of the test script corresponding to the index value; if the resource acquisition request carries the index values ​​of multiple test scripts, the acceptance test platform selects the currently idle resources in the preconfigured resource set associated with each index value as the test resource, and sends the test resource to the test platform, so that the test platform builds a test environment based on the test resource and completes the test of each test script corresponding to the index value.

[0125] The test resources may include but are not limited to: test accounts (for payment scenarios, payer accounts and payee accounts), testability APIs, input data, etc. The resource set pre-configured for the index value of each test script is pre-configured in the test preparation stage, and can be configured in the following ways:

[0126] Based on the description of the historical test case, a historical test script and the historical script information of the historical test script are generated, the historical script information includes the historical index value corresponding to the historical test script, the resource features contained in the historical test case are extracted and classified, and the test resource information is obtained, the resource feature characterizes the resource type required for the historical test case, and based on the test resource information, at least one resource for constructing the historical test environment corresponding to the historical test script is selected from the configured platform resources, and at least one resource is used as a preconfigured resource set associated with the historical index value. Among them, the historical test case, historical test script, historical script information, and historical index value mentioned in the embodiments of the present application are only used to characterize that this test case, test script, script information, and index value can be pre-implemented before the implementation of the embodiments of the present application, and their meanings are the same as the meanings of the test case, test script, script information, and index value.

[0127] In one example, if Figure 4 As shown, Figure 4 The use case description of the "Directly Connect to Merchant System - Payment Collection" test case is shown, such as Figure 5 As shown in the figure, various resource features described in the test case are extracted and classified to obtain test resource information: account-merchant (payee), account-object (payer), scenario-API, etc., and then the test resources are combined, such as Figure 6 The test account shown, such as Figure 7 The testability API shown in Figure 8 The input data shown in the figure. Among them, when some payers, payees, and input attributes are not clearly specified, the default values ​​are used. For example, the order amount to be paid is 0.05 yuan, and the payment method to be verified is a savings card (the test case describes the need to request the bank system to deduct the money).

[0128] In this way, based on the resource characteristics in the test case, the resource set required to build the test environment is combined, and this resource set can be used as a preconfigured resource set and associated with the index value of the test script corresponding to the test case as the preconfigured resource set of the index value.

[0129] It should be noted that the acceptance test platform is based on the integration of different resources and the test equipment resources available on the test platform, evaluates the maximum parallelism of different resource combinations, designs the number of resources to be built, and is manually built in advance based on the number of resource requirements, such as Figure 6 The number of available accounts for payers is 659 to ensure system parallelism.

[0130] In an embodiment of the present application, after the acceptance test platform receives the resource acquisition request from the test platform, it selects the resources that are currently idle as test resources from the pre-configured resource set associated with the index value, and sends the test resources to the test platform. In this way, the test resources sent by the acceptance test platform to the test platform are not fixed, which ensures the dynamic allocation of resources, can reduce manual intervention, and ensure the flexibility of testing.

[0131] It should be noted that in the embodiment of the present application, when there are no available resources, the acceptance test platform notifies the test platform to end the test script in time, and packages the error information into the storage service, parses the error in the report parsing phase and reminds to supplement the test resources.

[0132] In actual applications, after the test task is executed, the acceptance test platform obtains the test results of at least one test script from the test platform, parses the at least one test result obtained, generates a test report, and pushes the test report to the object that submitted the test task.

[0133] In specific implementation, the test platform will actively call back the task scheduler in the acceptance test platform. The acceptance test platform receives the callback, scans the test results of each test script in turn, actively completes the test results of the test script that are lost after the test script runs, and generates a test report. When the test report is generated, the task scheduler will release resources, update the status of the test task to the end status, save the relevant test script runtime information, and push the test report to the object that submitted the test task.

[0134] Accordingly, see Fig. 9 As shown, it is an implementation flow chart of a resource allocation method for acceptance testing in an embodiment of the present application, with the test platform as the execution subject, and the specific implementation process of the method is as follows:

[0135] S901, obtaining a test task submitted by an acceptance test platform, wherein the test task includes script information of at least one test script, and the script information includes at least an index value of a corresponding test script.

[0136] In specific implementation, when a test task is scheduled, the acceptance test platform submits the test task to the test platform. The test platform obtains the test task submitted by the acceptance test platform and tests a test script corresponding to one or script information included in the test task.

[0137] In actual applications, after obtaining the test task submitted by the test platform, the test platform assigns test equipment to perform the test for the test task based on the test parameters submitted by the acceptance test platform, or uses the test equipment pre-assigned to the test task to perform the test, or after obtaining the test task, assigns test equipment to perform the test for the test task. The embodiments of the present application do not limit this.

[0138] After the test platform assigns test equipment to the test task, it instructs the test equipment to call the test script for testing. Each test device calls a test script that has not been called by other test devices at a time, and reports the index value corresponding to the called test script to obtain test resources for building a test environment.

[0139] In order to improve the scheduling efficiency and testing efficiency of test tasks, during the execution of the test task, the embodiment of the present application immediately releases the occupation of the test task on the test device once the test task no longer requires a specific test device. Specifically, for the target test device (one of the test devices assigned to the test task, not specific), when the target test device completes the test of the currently called test script, if it is determined that there are test scripts in the test task that have not been called by other test devices, the target test device is instructed to continue calling the test scripts that have not been called by other test devices for testing; if it is determined that all test scripts in the test task have been called or have completed the test, the occupation of the target test device by the test task is released.

[0140] In one example, if Fig.10 As shown, assuming that there are 8 test scripts 1-8 in total that need to be tested in the test task, the test platform allocates 3 test devices for the test task, namely, test device 1, test device 2 and test device 3.

[0141] At the beginning of the task, all test devices are initialized. Different test devices have different initialization speeds. After test device 1 completes initialization, test script 1 is scheduled for testing. After test device 2 completes initialization, test script 2 is scheduled for testing. Test device 3 is initialized. After test device 2 completes the testing of test script 2, there are test scripts in the test task that have not been called by other test devices. Therefore, test device 2 cleans up the device environment to avoid mutual influence between previous and subsequent tests, and then continues to call test script 3 for testing. At this time, test device 3 is initialized and test script 4 is called for testing.

[0142] The test continues. After test device 1 completes the test of test script 1, there are test scripts in the test task that have not been called by other test devices. Therefore, test device 1 cleans up the device environment to avoid mutual influence between previous and next tests, and then continues to call test script 5 for testing. After test device 3 completes the test of test script 4, there are test scripts in the test task that have not been called by other test devices. Therefore, test device 3 cleans up the device environment to avoid mutual influence between previous and next tests, and then continues to call test script 6 for testing. After test device 1 completes the test of test script 5, there are test scripts in the test task that have not been called by other test devices. Therefore, test device 1 cleans up the device environment to avoid mutual influence between previous and next tests, and then continues to call test script 7 for testing; after test device 2 completes the test of test script 3, there are test scripts in the test task that have not been called by other test devices. Therefore, test device 2 cleans up the device environment to avoid mutual influence between previous and next tests, and then continues to call test script 8 for testing. At this time, test device 3 completes the test of test script 6, and all test scripts in the test task have been called by other test devices or have been tested. The test platform releases the test task's occupation of test device 3 so that test device 3 can execute other test tasks.

[0143] In another example, if Fig.11 As shown, assuming that there are 5 test scripts 1-5 that need to be tested in the test task, the test platform allocates 3 test devices for the test task, namely, test device 4, test device 5 and test device 6.

[0144] At the beginning of the task, all test devices are initialized. Different test devices have different initialization speeds. After test device 4 completes initialization, test script 1 is scheduled for testing. After test device 5 completes initialization, test script 2 is scheduled for testing. Test device 6 is initialized. After test device 4 completes the test of test script 1, there are test scripts in the test task that have not been called by other test devices. Therefore, test device 4 cleans up the device environment to avoid mutual influence between previous and subsequent tests, and then continues to call test script 3 for testing. At this time, test device 6 has completed initialization and calls test script 4 for testing.

[0145] The test continues. After the test device 5 completes the test of test script 2, there are test scripts in the test task that have not been called by other test devices. Therefore, the test device 5 cleans up the device environment to avoid mutual influence between the previous and subsequent tests, and then continues to call the test script 5 for testing; after the test device 4 completes the test of test script 3, all test scripts in the test task have been called by other test devices or have been tested, then the test platform releases the test task's occupation of the test device 4 so that the test device 4 can perform other test tasks; after the test device 6 completes the test of test script 4, all test scripts in the test task have been called by other test devices or have been tested, then the test platform releases the test task's occupation of the test device 6 so that the test device 6 can perform other test tasks.

[0146] In another embodiment of the present application, the test platform may also instruct that during the execution of the test task, the occupation of the test equipment by the test task be released to ensure the delivery of the test task with a higher task priority. Specifically, during the execution of the current test task, if the target test task submitted by the acceptance test platform is obtained, and there is currently no idle test equipment for executing the target test task, then part of the test equipment occupied by the current test task is released, and the target test task is tested using the released test equipment. The task priority of the target test task is higher than the task priority of the current test task.

[0147] Among them, the task priority of the test task can be set by the acceptance test platform based on the comprehensive evaluation of the test task and the task parameters of the test task, wherein the task parameters of the test task may include but are not limited to: whether the initiator of the test task is the system (the acceptance test platform itself), the importance of the initiator of the test task, the scale of the test task, etc.

[0148] In another embodiment of the present application, the test platform may also instruct that during the execution of the test task, the occupation of the test device by the test task be gradually released so as to run more test tasks in parallel. For example, the test platform may allocate more test devices to the test task at the beginning of the execution of the test task, and gradually release some of the test devices as the test task is executed. The occupation of the test device by the test task becomes less and less as the execution progresses.

[0149] S902, based on the test task, send at least one resource acquisition request to the acceptance test platform until the test task is completed, wherein, during one sending process, perform the following operations: send a resource acquisition request carrying at least one index value to the acceptance test platform, and for at least one index value, perform the following operations respectively: receive a test resource corresponding to an index value returned by the acceptance test platform, use the test resource to build a test environment, and complete the test of a test script corresponding to an index value; wherein the test resource is a resource selected by the acceptance test platform from a set of pre-configured resources associated with an index value and is currently in an idle state.

[0150] In specific implementation, when the test device calls the test script corresponding to the script information in the test task for testing, it first sends a resource acquisition request to the acceptance test platform through the test platform based on the index value of the test script to obtain test resources to build a test environment. When there are multiple test scripts that need to be tested in the test task, that is, when the test platform needs to request test resources for multiple test scripts from the acceptance test platform, the test platform can request test resources for one test script in one resource acquisition request, or it can request test resources for multiple test scripts in one resource acquisition request, and the embodiments of the present application do not limit this.

[0151] It should be noted that when the test device calls a test script for testing, a test environment needs to be built. Therefore, after the test device builds the test environment to complete the test of one test script, it needs to clean up the test device when testing the next test script to avoid the impact of the test environment between the previous and next test scripts. That is, when the test device tests the next test script, it needs to first clean up the test device, then request test resources, build the test environment, and then test the next test script.

[0152] In specific implementation, after the test task is executed, the acceptance platform obtains the script running result of at least one test script, and then calls the acceptance test platform to parse the at least one script running result obtained to obtain the test result corresponding to the at least one test script.

[0153] In actual applications, after the test of a single test script is completed, the test platform packages the test script running log and uploads it to the cloud object storage system (cos), and the embodiment of the present application adds an acceptance test platform callback after the script running is completed in the script running code of each test script. At the same time, the acceptance test platform can actively check the order to avoid the callback request being lost due to interference from network factors, etc., to ensure that the script running results of each test script can be parsed in parallel to ensure the parsing efficiency of the script running results.

[0154] In addition, the report parser in the acceptance test platform sends a request to COS to obtain the running log of each test script, parse the running log of the test script, save the script running results of the test script, and persist the script running results (screenshots, log files, etc.), for example, through the cloud file system (CFS), and automatically attribute the test scripts that failed the test and update the test report.

[0155] Next, combine Figure 12-Figure 17 The resource allocation method for acceptance testing provided in the embodiment of the present application is described in detail. Fig.12 The system architecture of the embodiment of the present application is shown as follows: Fig.12 As shown, the system architecture of the embodiment of the present application includes: a code construction platform 1201, an acceptance test platform 1202 and a test platform 1203.

[0156] In phase 1, i.e., the test preparation phase, the client or test script code is constructed in the code construction platform 1201, and the construction is uploaded to the test platform 1203 for storage, and the client or test script information is uploaded to the acceptance test platform 1202 for storage.

[0157] Specifically, Fig.13 As shown, the acceptance test platform generates the index value and test script of the test script (that is, the first version of the test script) based on the description of the test case, constructs the test resource, and writes or modifies the test script based on the first version of the test script for the test case to generate a new version of the test script, that is, a new test script code. Whenever a new test script code is generated, the code construction platform pulls the latest script code from the code repository, uploads the test script code package to the test platform, and reports the version information of the test script to the acceptance test platform for record.

[0158] Similarly, the client is built regularly or triggered by business to generate the latest client version. The code building platform pulls the client code, generates the client installation file, uploads the client installation file to the test platform, and reports the relevant information of the client to the acceptance test platform for recording.

[0159] In addition, during the test preparation stage, the acceptance test platform extracts and classifies the resource features contained in the test case to obtain test resource information, which characterizes the resource type required for the test case. Based on the test resource information, at least one resource for building a test environment corresponding to the test script is selected from the configured platform resources, and the at least one resource is used as a preconfigured resource set associated with the index value of the test script generated based on the test case.

[0160] In phases 2 and 3, i.e., the test task generation and scheduling phases, the acceptance test platform 1202 generates a test task based on the script information of at least one test script selected by the object, or based on a test case containing script information of multiple test scripts selected by the object, and submits the test task to the test platform 1203 when the test task is scheduled.

[0161] Specifically, Fig.14 As shown, the acceptance test platform generates a test task based on the test information selected by the object, such as the script information of at least one test script, or a test case containing script information of multiple test scripts, and adds the test task to the task scheduling pool. The task scheduler in the acceptance test platform polls the test equipment resources in real time, and schedules and initiates the test task according to the task priority. The task scheduler polls in real time whether there are idle test equipment resources, and calculates the test task priority according to the actual situation of the test task. Once there is idle test equipment, the test task in the task scheduling pool can be submitted. The acceptance test platform obtains the list of test scripts in the test task, specifies the full number of test equipment as much as possible, and submits the test task to the test platform.

[0162] In phase 4, the test task execution phase, the test platform 1203 tests the test tasks submitted by the acceptance test platform 1202. Specifically, Fig.15 As shown, after the test device in the test platform obtains the client running the test script and initializes the test device, it requests test resources from the acceptance test platform through the index value of the test script. The acceptance test platform selects the resources that are currently idle as test resources from the pre-configured resource set associated with the index value, and sends the test resources to the test device in the test platform, so that the test device builds a test environment based on the test resources, where the test resources include but are not limited to test accounts, testability APIs, and input data.

[0163] The test equipment recovers the test account to eliminate the impact of the previous use case, then executes the test script according to the test script code and verifies the expected results of the script. When the test of a single test script is completed, the test platform will call back the report parser of the acceptance test platform, parse the script running results, save the relevant test results, and upload the test results to the cloud object storage system.

[0164] At present, a test task usually monopolizes the test equipment during the test period, so the test equipment is in a locked state during the entire test period of the test task and cannot be used by other test tasks, which seriously affects the scheduling method and test efficiency of multiple test tasks. To address this problem, during the test of the test task, once a test equipment is no longer needed in the test task, the embodiment of the present application immediately releases the test equipment so that it can participate in other test tasks, instead of locking the test equipment until the test task is completed.

[0165] When the test device calls the test script for testing, the test device is first initialized, and a docker environment is built to generate an environment in which the test script can run, and the test device operation permission is obtained. Then the client and script code package are downloaded from the storage structure, and the md5 of the downloaded client and code package is checked to see if they are the same as the stored results. A security check is performed. If they are not the same, it means that the resources are damaged or tampered with. A timely alarm is issued and the running of this test script is terminated. After the verification passes, the client to be tested is installed, and the test script code is run in the docker environment.

[0166] Since the initialization time of different test devices is different in each test execution and for each test device, for example, the time to install the client is different due to system freezes, the test devices allocated by the test platform are initialized independently at the beginning of the test task, and the test script is called after the initialization is completed. Specifically, the docker environment applies for a test script from the test platform. In the process of running the test script in the docker environment, the test device environment is cleaned up each time to avoid mutual influence between the previous and subsequent test scripts. Then, based on the index value of the test script, the acceptance platform is requested to allocate test resources. When there are no available resources, the test script is terminated in time, and the error information is packaged into the storage service. In the report parsing stage, the error is parsed and a reminder to replenish resources is given.

[0167] After the test equipment obtains the test resources allocated by the acceptance test platform, the script code running in the docker environment uses the testability API in the test resources to control the test script to modify the account attributes and perform account recovery. By changing the account attributes, the impact of the previous test cases can be eliminated.

[0168] During the running of the test script, the test device is directly linked to the test environment through host file configuration and other methods, and runs on the test environment. The test environment can provide a public basic environment for regression testing, and can also provide a private container to allow objects to verify unpublished background services. Both environments can access the lower-level support environment - the acceptance environment.

[0169] During the test process, the testability API is called according to the runtime set in the test script. The testability API directly calls the acceptance test platform, which schedules the test environment interface and modifies the account attributes or behaviors in the test environment. In this way, the test script is executed until all the steps described in the test script are completed, and the expected results of the script are verified at the exit step.

[0170] After the test script is finished, the test device will package the test information and upload it to the storage service. It should be noted that if the test script cannot continue to execute during the test, it proves that there is a problem in the test script. In this case, the test script will be terminated in time and the error information will be packaged and uploaded to the storage service.

[0171] In stage 5, the script report parsing stage, the acceptance test platform 1202 parses the script running results of each test script in the test platform 1203 to generate test results. Fig.16 As shown, in the embodiment of the present application, an acceptance test platform callback after the script running is completed is added to the script running code of each test script. At the same time, the acceptance test platform can avoid the callback request being lost due to interference from network factors, etc. by actively checking the order, thereby ensuring that the script running results of each test script can be parsed in parallel to ensure the parsing efficiency of the script running results.

[0172] The acceptance test platform sends a request to the cloud object storage system to obtain the running log of each test script, parse the running log of the test script, save the test results of the test script, and persist the test results (screenshots, log files, etc.), for example, through the cloud file system, and automatically attribute the test scripts that failed the test and update the test results.

[0173] like Fig.17 As shown in the figure, after the test task is executed, the test platform will actively call back the task scheduler in the acceptance test platform. The acceptance test platform receives the callback, scans the test results of each test script in turn, actively completes the test results of the test script that was lost after the test script was run, and generates a test report. When the test report is generated, the task scheduler will release resources, update the status of the test task to the end status, save the relevant test script runtime information, and push the test report to the object that submitted the test task.

[0174] In another embodiment of the present application, Fig.18 As shown, an embodiment of the present application provides a resource allocation method for acceptance testing, the execution subject of which may be a computer device, including:

[0175] S1801, generating a test task based on the script information of at least one test script selected by the object, where the script information at least includes: an index value of the corresponding test script.

[0176] S1802, when a test task is scheduled, the following operations are performed for at least one obtained index value until the test task is completed: in a set of preconfigured resources associated with an index value, resources that are currently idle are selected as test resources to build a test environment, and the test of a test script corresponding to an index value is completed.

[0177] Based on the same inventive concept, the embodiment of the present application also provides a resource allocation system for acceptance testing, the system includes a user acceptance test platform and a test equipment platform connected in communication, wherein:

[0178] A user acceptance platform is used to generate a test task based on the script information of at least one test script selected by the object, wherein the script information at least includes: an index value of the corresponding test script; when the test task is scheduled, the test task is submitted to the test platform; and each time a resource acquisition request based on the test task is received from the test platform, the following operations are performed for at least one index value carried in the resource acquisition request until the test task is completed: in a set of preconfigured resources associated with an index value, a resource that is currently in an idle state is selected as a test resource, and the test resource is sent to the test platform;

[0179] A test equipment platform is used to obtain test tasks submitted by an acceptance test platform, configure at least one test device, and use at least one test device to test a test script corresponding to at least one index value. During the test process, at least one resource acquisition request is sent to the acceptance test platform based on the test task until the test task is completed. In one sending process, the following operations are performed: a resource acquisition request carrying at least one index value is sent to the acceptance test platform, and for at least one index value, the following operations are performed respectively: a test resource corresponding to an index value returned by the acceptance test platform is received, a test environment is constructed using the test resources, and a test script corresponding to an index value is completed.

[0180] Based on the same inventive concept, Fig.19 As shown, a resource allocation device 1900 for acceptance testing provided in an embodiment of the present application includes:

[0181] The task generating unit 1901 is used to generate a test task based on the script information of at least one test script selected by the object, where the script information at least includes: an index value of the corresponding test script;

[0182] The task scheduling unit 1902 is used to submit the test task to the test platform when the test task is scheduled;

[0183] The resource allocation unit 1903 is configured to perform the following operations respectively for at least one index value carried in the resource acquisition request each time the resource acquisition request is received based on the test task, until the test task is completed:

[0184] In a set of preconfigured resources associated with an index value, resources that are currently idle are selected as test resources, and the test resources are sent to the test platform so that the test platform builds a test environment based on the test resources to complete the test of a test script corresponding to an index value.

[0185] In a possible implementation manner, the resource allocation unit 1903 configures the preconfigured resource set in the following manner:

[0186] Based on the description of the historical test case, generate a historical test script and historical script information of the historical test script, where the historical script information includes a historical index value corresponding to the historical test script;

[0187] The resource features contained in the historical test cases are extracted and classified to obtain the test resource information. The resource features represent: the resource types required by the historical test cases;

[0188] Based on the test resource information, at least one resource for constructing a historical test environment corresponding to the historical test script is selected from the configured platform resources;

[0189] At least one resource is used as a preconfigured resource set associated with the historical index value.

[0190] In a possible implementation, the task scheduling unit 1902 determines that the test task is scheduled in the following manner:

[0191] Add the test task to the task scheduling pool;

[0192] When it is determined that there are idle device resources in the test platform and the scheduling priority of the test task in the task scheduling pool meets the preset priority condition, it is determined that the test task is scheduled.

[0193] In a possible implementation, the task scheduling unit 1902 is further configured to:

[0194] Presetting a task priority for a test task, and after submitting the test task to the test platform, obtaining a task priority of at least one test task currently being executed in the test platform;

[0195] If it is determined that the task priority of the newly generated target test task is higher than the task priority of at least one acquired test task, the target test task is submitted to the test platform so that the test platform executes the target test task in parallel.

[0196] In a possible implementation manner, the resource allocation unit 1903 is further configured to:

[0197] After the test task is executed, obtaining the test result of at least one test script from the test platform;

[0198] Analyze at least one test result obtained and generate a test report;

[0199] Pushes test reports to an object.

[0200] like Fig. 20 As shown, another resource allocation device 2000 for acceptance testing provided in an embodiment of the present application includes:

[0201] The acquisition unit 2001 is used to acquire the test task submitted by the acceptance test platform, wherein the test task includes script information of at least one test script, and the script information includes at least: an index value of the corresponding test script;

[0202] The acceptance test unit 2002 is used to send at least one resource acquisition request to the acceptance test platform based on the test task until the test task is completed. In one sending process, the following operations are performed:

[0203] Sending a resource acquisition request carrying at least one index value to the acceptance test platform;

[0204] For at least one index value, the following operations are performed respectively: receiving test resources corresponding to an index value returned by the acceptance test platform, using the test resources to build a test environment, and completing the test of a test script corresponding to an index value; wherein the test resources are resources selected by the acceptance test platform from a set of pre-configured resources associated with an index value and are currently in an idle state.

[0205] In a possible implementation, the acceptance test unit 2002 is further configured to:

[0206] Before sending at least one resource acquisition request to the acceptance test platform based on the test task, instruct at least one pre-configured test device to call at least one test script corresponding to an index value for testing, wherein each test device calls a test script that has not been called by other test devices each time, and reports the index value corresponding to the called test script to obtain test resources for building a test environment.

[0207] In a possible implementation, the acceptance test unit 2002 is further configured to:

[0208] Instruct at least one pre-configured test device to call at least one test script corresponding to an index value for testing. For a target test device in at least one test device, when the target test device completes the testing of the currently called test script, if it is determined that there is a test script that has not been called by other test devices, instruct the target test device to continue calling the test script that has not been called by other test devices for testing. If it is determined that all test scripts corresponding to all index values ​​have been called or have completed the testing, the occupation of the target test device by the test task is released.

[0209] In a possible implementation, the acceptance test unit 2002 is further configured to:

[0210] During the execution of the current test task, if the target test task submitted by the acceptance test platform is obtained, and there is currently no idle test equipment to execute the target test task, then some of the test equipment occupied by the current test task will be released, and the target test task will be tested using the released test equipment. The task priority of the target test task is higher than the task priority of the current test task. The task priority of the test task is pre-set by the acceptance test platform.

[0211] In a possible implementation, the acceptance test unit 2002 is further configured to:

[0212] After the test task is executed, a script running result of at least one test script is obtained;

[0213] The acceptance test platform is called to parse the at least one script running result obtained to obtain the test result corresponding to the at least one test script.

[0214] like Fig.21 As shown, another resource allocation device 2100 for acceptance testing provided in an embodiment of the present application includes:

[0215] The task generating unit 2101 is used to generate a test task based on the script information of at least one test script selected by the object, where the script information at least includes: an index value of the corresponding test script;

[0216] The acceptance test unit 2102 is used to perform the following operations respectively for at least one obtained index value when the test task is scheduled, until the test task is executed:

[0217] In a set of pre-configured resources associated with an index value, resources that are currently in an idle state are selected as test resources to build a test environment, and a test script corresponding to an index value is tested.

[0218] Based on the same inventive concept as the above method embodiment, an electronic device is also provided in the embodiment of the present application. In one embodiment, the electronic device may be a computer device or a server, such as Figure 1 In this embodiment, the structure of the electronic device can be as follows: Fig. 22 As shown, it includes a memory 2201, a communication module 2203 and one or more processors 2202.

[0219] The memory 2201 is used to store computer programs executed by the processor 2202. The memory 2201 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and programs required for running the instant messaging function, etc.; the data storage area may store various instant messaging information and operation instruction sets, etc.

[0220] The memory 2201 may be a volatile memory, such as a random-access memory (RAM); the memory 2201 may also be a non-volatile memory, such as a read-only memory, a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD); or the memory 2201 may be any other medium that can be used to carry or store a desired computer program in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 2201 may be a combination of the above memories.

[0221] The processor 2202 may include one or more central processing units (CPU) or a digital processing unit, etc. The processor 2202 is used to implement the resource allocation method for acceptance testing when calling the computer program stored in the memory 2201 .

[0222] The communication module 2203 is used to communicate with terminal devices and other servers.

[0223] The specific connection medium between the memory 2201, the communication module 2203 and the processor 2202 is not limited in the embodiment of the present application. Fig. 22 In the embodiment, the memory 2201 and the processor 2202 are connected via a bus 2204. The bus 2204 is connected to the processor 2202 via a bus 2204. Fig. 22 The connections between the other components are only for illustration and are not intended to be limiting. The bus 2204 can be divided into an address bus, a data bus, a control bus, etc. For ease of description, Fig. 22 The diagram shows that only one thick line is used, but this does not mean that there is only one bus or only one type of bus.

[0224] The memory 2201 stores a computer storage medium, and the computer storage medium stores computer executable instructions, and the computer executable instructions are used to implement the resource allocation method for acceptance testing of the embodiment of the present application. The processor 2202 is used to execute the above-mentioned resource allocation method for acceptance testing, such as Figure 2 , Fig. 9 , Fig.18 shown.

[0225] In some possible implementations, various aspects of the resource allocation method for acceptance testing provided by the present application may also be implemented in the form of a program product, which includes a computer program. When the program product is run on an electronic device, the computer program is used to enable the electronic device to execute the steps of the resource allocation method for acceptance testing according to various exemplary embodiments of the present application described above in this specification. For example, the electronic device may execute the following steps: Figure 2 , Fig. 9 , Fig.18 Follow the steps shown in .

[0226] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0227] The program product of the embodiment of the present application may adopt a portable compact disk read-only memory (CD-ROM) and include a computer program, and can be run on an electronic device. However, the program product of the present application is not limited thereto, and in this document, a readable storage medium may be any tangible medium containing or storing a program, which can be used by or in combination with a command execution system, apparatus, or device.

[0228] A readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, wherein a readable computer program is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. A readable signal medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with a command execution system, apparatus, or device.

[0229] The computer program embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0230] The computer program for performing the operation of the present application can be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and also conventional procedural programming languages ​​such as "C" language or similar programming languages. The computer program can be executed entirely on the user electronic device, partially on the user electronic device, as a separate software package, partially on the user electronic device and partially on a remote electronic device, or entirely on a remote electronic device or server. In the case of a remote electronic device, the remote electronic device can be connected to the user electronic device through any type of network including a local area network (LAN) or a wide area network (WAN), or can be connected to an external electronic device (for example, using an Internet service provider to connect through the Internet).

[0231] It should be noted that, although several units or subunits of the device are mentioned in the above detailed description, this division is merely exemplary and not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more units described above can be embodied in one unit. Conversely, the features and functions of one unit described above can be further divided into multiple units to be embodied.

[0232] In addition, although the operations of the method of the present application are described in a specific order in the drawings, this does not require or imply that the operations must be performed in this specific order, or that all the operations shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.

[0233] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain a computer-usable computer program.

[0234] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program commands. These computer program commands can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the commands executed by the processor of the computer or other programmable data processing device generate commands for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0235] These computer program commands may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the commands stored in the computer readable memory produce an article of manufacture comprising a command device, the command device implementing the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0236] These computer program commands can also be loaded onto a computer or other programmable data processing device so that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the commands executed on the computer or other programmable device provide the instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0237] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.

[0238] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A resource allocation method for acceptance testing, characterized in that: include: Generate a test task based on script information of at least one test script selected by the object, wherein the script information includes at least: an index value of the corresponding test script; When the test task is scheduled, submitting the test task to the test platform; Each time the test platform receives a resource acquisition request returned based on the test task, the following operations are performed for at least one index value carried in the resource acquisition request until the test task is completed: In a set of preconfigured resources associated with an index value, resources that are currently in an idle state are selected as test resources, and the test resources are sent to the test platform so that the test platform builds a test environment based on the test resources to complete the test of the test script corresponding to the index value.

2. The method according to claim 1, characterized in that The preconfigured resource set is configured in the following manner: Based on the description of the historical test case, generate a historical test script and historical script information of the historical test script, wherein the historical script information includes a historical index value corresponding to the historical test script; Extracting and classifying resource features contained in the historical test cases to obtain test resource information, wherein the resource features represent: resource types required by the historical test cases; Based on the test resource information, selecting at least one resource for constructing a historical test environment corresponding to the historical test script from the configured platform resources; The at least one resource is used as a preconfigured resource set associated with the historical index value.

3. The method according to claim 1, characterized in that The test task is scheduled by: Adding the test task to the task scheduling pool; When it is determined that there are idle device resources in the test platform and the task priority of the test task in the task scheduling pool meets a preset priority condition, it is determined that the test task is scheduled.

4. The method according to claim 1, characterized in that: After presetting a task priority for the test task and submitting the test task to the test platform, the method further includes: Obtaining a task priority of at least one test task currently being executed in the test platform; If it is determined that the task priority of the newly generated target test task is higher than the task priority of at least one acquired test task, the target test task is submitted to the test platform so that the test platform executes the target test task in parallel.

5. The method according to any one of claims 1 to 4, characterized in that After the test task is completed, the method further includes: Obtaining a test result of each of the at least one test script from the test platform; Analyze at least one test result obtained and generate a test report; The test report is pushed to the object.

6. A resource allocation method for acceptance testing, characterized in that: include: Acquire a test task submitted by an acceptance test platform, wherein the test task includes script information of at least one test script, and the script information includes at least: an index value of a corresponding test script; Sending a resource acquisition request to the acceptance test platform at least once based on the test task until the test task is completed, wherein during one sending process, performing the following operations: Sending a resource acquisition request carrying at least one index value to the acceptance test platform; For the at least one index value, the following operations are performed respectively: receiving test resources corresponding to an index value returned by the acceptance test platform, using the test resources to build a test environment, and completing the test of the test script corresponding to the index value; wherein the test resources are resources selected by the acceptance test platform from the pre-configured resource set associated with the index value and are currently in an idle state.

7. The method according to claim 6, characterized in that Before sending at least one resource acquisition request to the acceptance test platform based on the test task, the method further includes: Instruct at least one pre-configured test device to call the test script corresponding to the at least one index value for testing, wherein each test device calls a test script that has not been called by other test devices each time, and reports the index value corresponding to the called test script to obtain test resources for building a test environment.

8. The method according to claim 7, characterized in that After indicating at least one pre-configured test device and calling the test script corresponding to the at least one index value to perform a test, the method further includes: For a target test device among the at least one test device, when the target test device completes the test of the currently called test script, if it is determined that there is a test script that has not been called by other test devices, the target test device is instructed to continue calling the test script that has not been called by other test devices for testing; if it is determined that the test scripts corresponding to all index values ​​have been called or have completed the test, the occupation of the target test device by the test task is released.

9. The method according to claim 7, characterized in that: During the execution of the current test task, the method further includes: If the target test task submitted by the acceptance test platform is obtained and there is currently no idle test equipment for executing the target test task, then some of the test equipment occupied by the current test task will be released, and the target test task will be tested using the released test equipment. The task priority of the target test task is higher than the task priority of the current test task, and the task priority of the test task is pre-set by the acceptance test platform.

10. The method according to any one of claims 6 to 9, characterized in that: After the test task is completed, the method further includes: Obtaining a script running result of at least one test script; The acceptance test platform is called to parse at least one script running result obtained to obtain a test result corresponding to at least one test script.

11. A resource scheduling method for user acceptance testing, characterized in that: The method comprises: Generate a test task based on script information of at least one test script selected by the object, wherein the script information includes at least: an index value of the corresponding test script; When the test task is scheduled, the following operations are performed respectively for at least one obtained index value until the test task is completed: In a set of pre-configured resources associated with an index value, resources that are currently in an idle state are selected as test resources to construct a test environment, and a test of a test script corresponding to the index value is completed.

12. A resource scheduling system for user acceptance testing, characterized in that: The system includes a user acceptance test platform and a test equipment platform in communication connection, wherein: The user acceptance platform is used to generate a test task based on the script information of at least one test script selected by the object, wherein the script information at least includes: an index value of the corresponding test script; when the test task is scheduled, the test task is submitted to the test platform; and each time the test platform receives a resource acquisition request returned based on the test task, the following operations are performed for at least one index value carried in the resource acquisition request until the test task is completed: from a set of preconfigured resources associated with an index value, a resource that is currently in an idle state is selected as a test resource, and the test resource is sent to the test platform; The test device platform is used to obtain the test task submitted by the acceptance test platform, configure at least one test device, and use the at least one test device to test the test script corresponding to the at least one index value. During the test process, at least one resource acquisition request is sent to the acceptance test platform based on the test task until the test task is completed, wherein, during one sending process, the following operations are performed: a resource acquisition request carrying at least one index value is sent to the acceptance test platform, and for the at least one index value, the following operations are performed respectively: a test resource corresponding to an index value returned by the acceptance test platform is received, a test environment is constructed using the test resource, and the test of the test script corresponding to the index value is completed.

13. A resource scheduling device for acceptance testing, characterized in that: include: A task generating unit, configured to generate a test task based on script information of at least one test script selected by the object, wherein the script information includes at least: an index value of the corresponding test script; A task scheduling unit, used for submitting the test task to the test platform when the test task is scheduled; A resource allocation unit is configured to perform the following operations respectively for at least one index value carried in the resource acquisition request each time the resource acquisition request is received by the test platform based on the test task, until the test task is completed: In a set of preconfigured resources associated with an index value, resources that are currently in an idle state are selected as test resources, and the test resources are sent to the test platform so that the test platform builds a test environment based on the test resources to complete the test of the test script corresponding to the index value.

14. A resource scheduling device for acceptance testing, characterized in that: include: An acquisition unit is used to acquire a test task submitted by an acceptance test platform, wherein the test task includes script information of at least one test script, and the script information includes at least: an index value of a corresponding test script; The acceptance test unit is used to send at least one resource acquisition request to the acceptance test platform based on the test task until the test task is completed, wherein during one sending process, the following operations are performed: Sending a resource acquisition request carrying at least one index value to the acceptance test platform; For the at least one index value, the following operations are performed respectively: receiving test resources corresponding to an index value returned by the acceptance test platform, using the test resources to build a test environment, and completing the test of the test script corresponding to the index value; wherein the test resources are resources selected by the acceptance test platform from the pre-configured resource set associated with the index value and are currently in an idle state.

15. A resource scheduling device for acceptance testing, characterized in that: include: A task generating unit, configured to generate a test task based on script information of at least one test script selected by the object, wherein the script information includes at least: an index value of the corresponding test script; The acceptance test unit is used to perform the following operations respectively for at least one obtained index value when the test task is scheduled, until the test task is completed: In a set of pre-configured resources associated with an index value, resources that are currently in an idle state are selected as test resources to construct a test environment, and a test of a test script corresponding to the index value is completed.

16. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores program codes, and when the program codes are executed by the processor, the processor executes the steps of any one of the methods in claims 1 to 11.

17. A computer-readable storage medium, characterized in that: It includes program codes. When the program product is run on an electronic device, the program codes are used to enable the electronic device to execute the steps of any method described in claims 1 to 11.