Script running task scheduling method for user acceptance testing and related device
By generating script execution instructions and using a unified resource pool for scheduling, the system automatically filters and matches test scripts, solving the problems of high customized scheduling costs and low equipment utilization in user acceptance testing, and achieving efficient task scheduling and resource utilization.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- TENCENT TECHNOLOGY (SHENZHEN) CO LTD
- Filing Date
- 2021-11-30
- Publication Date
- 2026-07-10
AI Technical Summary
Customized task scheduling methods in existing user acceptance testing increase development and operational costs, multi-cluster methods cannot effectively improve equipment utilization, and manual intervention affects the success rate of testing.
By generating script execution instructions, parsing test script filtering conditions based on static characteristics and instruction types, automatically selecting and matching test scripts, and scheduling script execution tasks in a unified resource pool, development costs are reduced and resource utilization and testing efficiency are improved.
It has achieved automated script execution task scheduling, reduced development and operation costs, improved equipment utilization and testing efficiency, and reduced manual intervention.
Smart Images

Figure CN116204402B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of software testing technology. Specifically, this disclosure relates to a script execution task scheduling method for user acceptance testing, a script execution task scheduling device for user acceptance testing, a computer-readable storage medium, a computer device, and a computer program product. Background Technology
[0002] User acceptance testing involves covering numerous test types, including backend version testing, client version testing, and script issue verification. The approach described in relevant technologies is to design customized task execution methods for different user acceptance test types. This means tailoring task implementation methods to different needs, such as designing separate tasks for script debugging, backend stability testing, script issue verification, client version verification, and backend release version verification. Furthermore, to avoid conflicts between customized execution methods for different tasks, different device clusters are planned for task isolation. Each cluster runs a specific type of task, and task scheduling between clusters remains independent.
[0003] However, the customized design approach increases the development cost of task scheduling. Furthermore, as testing scenarios change, the number of adjustment points requiring attention increases, significantly raising the costs of operation and problem identification.
[0004] On the other hand, the multi-cluster approach cannot effectively improve device utilization. For example, if the cluster used to execute script debugging tasks is currently idle, while another cluster used to execute background stability testing tasks is currently overloaded, the task scheduling between these two clusters is independent, making it impossible to utilize the resources in the cluster corresponding to the script debugging task to execute the background stability testing task.
[0005] Furthermore, in the solutions provided by related technologies, when resource conflicts exist between tasks, manual intervention is often required to manage the situation and ensure that user acceptance testing is not affected by resource factors, thereby guaranteeing the success rate of the test. However, excessive manual intervention can easily become a major factor affecting the success rate. Summary of the Invention
[0006] The purpose of this disclosure is to provide a script execution task scheduling method, a script execution task scheduling device, a computer-readable storage medium, a computer device, and a computer program product for user acceptance testing, which at least to some extent reduces testing costs and improves testing efficiency.
[0007] This disclosure provides a script execution task scheduling method for user acceptance testing. The method includes: generating script execution instructions based on script execution type, wherein the script execution instructions describe the static characteristics and corresponding instruction type of the script execution task for user acceptance testing, the static characteristics including the trigger frequency and execution time period of the script execution task, and the instruction type matching the static characteristics; determining the target parsing method of the static characteristics in the script execution instructions based on the instruction type, so as to parse the static characteristics to obtain test script filtering condition information; filtering test scripts that match the test script filtering condition information; constructing a script execution task of the script execution type based on the matched test scripts, the trigger frequency, and the execution time period, and placing the script execution task into a task pool; scheduling the script execution tasks in the task pool according to resource information in the resource pool, so as to execute the scheduled script execution tasks in the test equipment of the test equipment platform and obtain script execution results; and generating a script execution task report of the corresponding script execution type based on the script execution results.
[0008] This disclosure provides a script execution task scheduling device for user acceptance testing. The device includes: a generation unit, configured to generate script execution instructions based on script execution type, wherein the script execution instructions describe the static characteristics and corresponding instruction types of the script execution task for user acceptance testing, the static characteristics including the trigger frequency and execution time period of the script execution task, and the instruction type matching the static characteristics; a determination unit, configured to determine the target parsing method of the static characteristics in the script execution instructions based on the instruction type, to parse the static characteristics to obtain test script filtering condition information; a matching unit, configured to filter test scripts that match the test script filtering condition information; a construction unit, configured to construct a script execution task of the script execution type based on the matched test scripts, the trigger frequency, and the execution time period, and place the script execution task into a task pool; and a scheduling unit, configured to schedule the script execution tasks in the task pool based on resource information in the resource pool, to execute the scheduled script execution tasks in the test equipment of the test equipment platform, and obtain script execution results; the generation unit is further configured to generate a script execution task report of the corresponding script execution type based on the script execution results.
[0009] In some exemplary embodiments of this disclosure, the test script filtering condition information may include a set of script index values, script version, script acceptance status, and test data status. The script execution task scheduling device for user acceptance testing further includes: an obtaining unit, configured to obtain script code package information of test scripts from a test script set on a test device platform from a script code building platform; the script code package information may include the script version, script index value, and script execution type of the test scripts; the obtaining unit is also configured to record the script acceptance status and test data status of the test scripts. The matching unit is configured to: based on the recorded script version, script index value, script execution type, script acceptance status, and test data status of the test scripts, filter test scripts from the test script set that match the test script filtering condition information as matched test scripts.
[0010] In some exemplary embodiments of this disclosure, the script execution instructions are used to customize a unified template for the execution mode of the matching test scripts in script execution tasks corresponding to different script execution types; the instruction type of the script execution instructions is used to determine the processing mode of different script execution types; and the scheduling strategy and test resource acquisition method of the script execution tasks are customized using different instruction types to generate the script execution tasks.
[0011] In some exemplary embodiments of this disclosure, the script execution task includes a single script execution task and a multiple script execution task. The construction unit is configured to: construct a single script execution task if only one test script is matched, wherein the single script execution task is associated with one test script; and construct a multiple script execution task if multiple test scripts are matched, wherein the multiple script execution task is associated with multiple matched test scripts.
[0012] In some exemplary embodiments of this disclosure, the script execution tasks in the task pool can record the task initiating object and task build time of the script execution tasks. The scheduling unit includes a setting unit, configured to set the priority of a single script execution task that is not currently running in the task pool to be higher than the priority of multiple script execution tasks. The setting unit is further configured to set the priority among the single script execution tasks that are not currently running in the task pool based on their task build time. The scheduling unit is configured to, if there are single script execution tasks that are not currently running in the task pool, prioritize scheduling the single script execution tasks according to their priority among the single script execution tasks, and the number of scheduled single script execution tasks does not exceed the concurrency threshold of a single script execution task. The scheduling unit is further configured to, if the number of single script execution tasks scheduled for a task initiating object exceeds the task concurrency threshold of the task initiating object, switch to scheduling single script execution tasks for another task initiating object.
[0013] In some exemplary embodiments of this disclosure, the scheduling unit further includes: a determining unit, configured to determine remaining resources based on resource information of the resource pool and resource information allocated to single-script execution tasks. The setting unit is further configured to, if there are non-running multi-script execution tasks in the task pool, set the priority among the non-running multi-script execution tasks in the task pool according to the task construction time. The scheduling unit is further configured to schedule the non-running multi-script execution tasks based on the remaining resources, the concurrency threshold of the multi-script execution tasks, and the priority among the non-running multi-script execution tasks.
[0014] In some exemplary embodiments of this disclosure, the scheduling unit is further configured to: if there is an unrunning multi-script running task in the task pool, allocate the remaining resources to the unrunning multi-script running task; if there are unrunning multi-script running tasks in the task pool that exceed the concurrency threshold of the multi-script running tasks, schedule unrunning multi-script running tasks equal to the concurrency threshold of the multi-script running tasks according to the priority among the unrunning multi-script running tasks; and determine the allocation of the remaining resources to each scheduled unrunning multi-script running task based on the running time of each scheduled unrunning multi-script running task.
[0015] In some exemplary embodiments of this disclosure, the script execution task includes a multi-script execution task, which is associated with and matches multiple test scripts. The scheduling unit is configured to: obtain test condition information for each test script in the multi-script execution task; group test scripts with the same test condition information into the same group; calculate the total execution time of the test scripts in the same group based on the total execution time within the group, and allocate test resources from the resource pool proportionally within the multi-script execution task.
[0016] In some exemplary embodiments of this disclosure, the scheduling unit is configured to: generate task initialization information for a scheduled script execution task based on the static features; send the task initialization information to the test equipment platform, so that the test equipment platform executes the initialization operation of the scheduled script execution task in the test equipment; obtain static information of matching test scripts associated with the scheduled script execution task; generate script initialization information of matching test scripts associated with the scheduled script execution task based on the static information; send the script initialization information to the test equipment platform, so that the test equipment platform distributes the matching test scripts associated with the scheduled script execution task to the test equipment for execution in the test equipment; the script code of the matching test script triggers the reception of script execution results returned by the test equipment platform through a callback; and complete the script execution results that are not received normally by periodic polling.
[0017] In some exemplary embodiments of this disclosure, the generation unit is further configured to: generate script execution instances based on the script execution results, wherein each scheduled script execution task includes 0 to multiple script execution instances; and after the scheduled script execution task is completed, generate a script execution task report of the corresponding script execution type based on the script execution instance.
[0018] According to one aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a computer device, implements the script execution task scheduling method for user acceptance testing as described above.
[0019] According to one aspect of the present disclosure, a computer device is provided, the computer device comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute a script execution task scheduling method for user acceptance testing as described above by executing the executable instructions.
[0020] According to one aspect of this disclosure, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in the various alternative implementations described above.
[0021] In the technical solution provided in this disclosure embodiment, on the one hand, a script execution instruction of corresponding instruction type can be generated according to the obtained script execution type. The generated script execution instruction is used to describe the static characteristics and corresponding instruction type of the script execution task for user acceptance testing. The static characteristics include key information such as the trigger frequency and execution time period of the script execution task, and the instruction type corresponds to the static characteristics described by the script execution instruction. Thus, the target parsing method of the static characteristics in the script execution instruction can be determined according to the instruction type corresponding to the generated script execution instruction, so as to parse the static characteristics to obtain test script filtering condition information, and automatically filter test scripts that match the test script filtering condition information. Then, based on the matched test scripts, the trigger frequency and execution time period in the static characteristics, the target parsing method of the static characteristics can be determined. The system automatically constructs script execution tasks based on the acquired script execution type. When different script execution types are submitted according to different testing requirements, corresponding script execution tasks can be automatically generated. This eliminates the need to customize different execution methods for each different script execution type, reducing the development cost of task scheduling. Furthermore, by placing the constructed script execution tasks into a task pool and scheduling them based on resource information from a unified resource pool, rather than dividing the pool into different clusters for each script execution type, unified resource scheduling can be achieved for script execution tasks belonging to different script execution types. This avoids situations where some clusters are overloaded while others are idle, thereby improving resource utilization and testing efficiency. Simultaneously, the method provided in this disclosure automates script execution task scheduling by utilizing a unified resource pool for scheduling script execution tasks belonging to different script execution types, reducing manual intervention. Attached Figure Description
[0022] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure. It is obvious that the drawings described below are merely some embodiments of this disclosure, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.
[0023] Figure 1 A flowchart illustrating the steps of a script execution task scheduling method for user acceptance testing provided in an exemplary embodiment of this disclosure is shown.
[0024] Figure 2 The diagram illustrates a system sequence of a script execution task scheduling method for user acceptance testing based on an instruction model, as provided in an exemplary embodiment of this disclosure.
[0025] Figure 3The diagram illustrates the architecture of a script execution task scheduling method for user acceptance testing based on an instruction model, as provided in an exemplary embodiment of this disclosure.
[0026] Figure 4 A schematic diagram of a single-script execution task scheduling mode provided in an exemplary embodiment of this disclosure is shown.
[0027] Figure 5 The diagram illustrates the resource allocation for single-script execution tasks and multi-script execution tasks provided in an exemplary embodiment of this disclosure.
[0028] Figure 6 This illustration schematically shows a resource allocation diagram for a dual-multi-script execution task provided in an exemplary embodiment of the present disclosure.
[0029] Figure 7 A schematic diagram illustrating a list of background version test reports provided in an exemplary embodiment of this disclosure is shown.
[0030] Figure 8 A schematic diagram of a background version test parsing comparison report provided in an exemplary embodiment of this disclosure is shown.
[0031] Figure 9 A schematic diagram of a client version test list page provided in an exemplary embodiment of this disclosure is shown.
[0032] Figure 10 A schematic diagram of an environmental dialing list page provided in an exemplary embodiment of this disclosure is shown.
[0033] Figure 11 A schematic diagram illustrating a client version test and environment probing parsing report provided in an exemplary embodiment of this disclosure is shown.
[0034] Figure 12 A schematic diagram of a script problem verification list page provided in another exemplary embodiment of this disclosure is shown.
[0035] Figure 13 A schematic diagram of a test script execution report provided in an exemplary embodiment of this disclosure is shown.
[0036] Figure 14 A schematic block diagram of a script execution task scheduling apparatus for user acceptance testing provided in an exemplary embodiment of this disclosure is shown.
[0037] Figure 15 This is a network interaction architecture diagram of a script execution task scheduling method for user acceptance testing provided in an embodiment of this disclosure.
[0038] Figure 16 A schematic diagram of the structure of a computer device suitable for implementing embodiments of the present disclosure is shown. Detailed Implementation
[0039] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be more thorough and complete, and will fully convey the concept of the exemplary embodiments to those skilled in the art.
[0040] Furthermore, the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. Numerous specific details are provided in the following description to give a thorough understanding of embodiments of this disclosure. However, those skilled in the art will recognize that the technical solutions of this disclosure can be practiced without one or more of the specific details, or other methods, components, apparatuses, steps, etc., can be employed. In other instances, well-known methods, apparatuses, implementations, or operations are not shown or described in detail to avoid obscuring various aspects of this disclosure.
[0041] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0042] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.
[0043] Figure 1 The flowchart illustrating the steps of a script execution task scheduling method for user acceptance testing provided in an exemplary embodiment of this disclosure is shown in the illustration. The method provided in this embodiment can be executed by any computer device. In the following example, a computer device is used as an example of a user acceptance test (UAT) platform, but this disclosure is not limited thereto. The method provided in this embodiment can be applied to any software testing scenario where test scripts are run on a testing device (e.g., a mobile phone) to achieve task scheduling, including but not limited to software performance evaluation tasks and mobile phone hardware testing tasks.
[0044] User acceptance testing is a phase in the system development lifecycle methodology. During this phase, relevant users or independent testers test and accept the system based on the test plan and results. It allows system users to decide whether to accept the system, and it is a test to determine whether the product meets the requirements specified in the contract or by the user. The user acceptance testing platform in this embodiment can also automatically generate test cases (including test scripts) based on product requirement documents described in natural language.
[0045] like Figure 1 As shown, the method provided in this disclosure embodiment may include the following steps.
[0046] In step S110, a script execution instruction is generated according to the script execution type. The script execution instruction describes the static characteristics and corresponding instruction type of the script execution task for user acceptance testing. The static characteristics include the triggering frequency and execution time period of the script execution task, and the instruction type matches the static characteristics.
[0047] In this embodiment, the script execution type is first obtained. The script execution type refers to the test type / category to which the test object is classified. Different script execution types can have different test purposes. The test object can be, for example, an application (e.g., an instant messaging application) or a functional module within that application (e.g., a payment function module within the instant messaging application). For example, script execution types can include backend version testing, client version testing, environment probing, script problem verification, etc. The script execution type can be classified according to actual testing needs, and this disclosure does not limit this.
[0048] In this embodiment of the disclosure, the user (i.e., the tester, which may be a script debugger or an application developer) can open an automated testing system (e.g., a UAT automated testing system) through the user's device. Various script execution types can be displayed in the automated testing system, such as background version testing, client version testing, environment probing, script problem verification, etc. The user can select (e.g., click) a certain script execution type and submit it to the user acceptance testing platform. The user acceptance testing platform receives the script execution type submitted by the user.
[0049] In an exemplary embodiment, the method may further include: obtaining script code package information of test scripts in the test script set uploaded to the test device platform from the script code building platform, wherein the script code package information includes the script version, script index value and script execution type of the test scripts; and recording the script acceptance status and test data status of the test scripts.
[0050] In this embodiment, a user can submit a product requirement document described in natural language. During the test preparation phase, the user can trigger the user acceptance test platform to automatically generate test scripts in chronological order based on the submitted product requirement document and upload the test script code to a Git repository (belonging to the code management platform). This triggers a listening event on the script code building platform, which then retrieves the latest test script code from the Git repository, generates a script version, script index value, and resources (such as libraries) that the test script depends on, and packages them together to generate a script code package, which is then sent to the test equipment platform. Furthermore, the script code building platform can also send the test script's script version, script index value, and corresponding script execution type as the script code package information to the user acceptance test platform.
[0051] In this embodiment of the disclosure, the script version refers to the version of each test script set. The script index value is an identifier used to uniquely distinguish each test script. When uploading a test script, the user can specify the script execution type of the test script.
[0052] In this embodiment of the disclosure, the user acceptance testing platform can also provide an acceptance function module for test scripts to accept uploaded test scripts and obtain the script acceptance status. The script acceptance status may include, for example, the debug version stage and the operational stage.
[0053] In this embodiment of the disclosure, the user can also prepare test data for the test script. When the test data is ready, the test data status is test data ready; otherwise, it is test data not ready.
[0054] In this embodiment of the disclosure, the UAT automated testing system provides users with entry points for various script execution types. In the user acceptance testing platform, a unified entry point is provided as a parser. The control parameters required to generate script execution instructions are obtained in a customized manner according to each script execution type, such as client version, script index value set, script version, etc., as static features in the script execution instructions, thereby generating script execution instructions.
[0055] Among them, script execution instructions are instructions used by the system to analyze the processing methods of different script execution types. Script execution instructions can be used to describe the static characteristics of script execution tasks for user acceptance testing, and determine the scheduling strategy of the script execution tasks generated according to the script execution instructions for different instruction types.
[0056] One script execution type can correspond to one instruction type. Each instruction type can be distinguished by an instruction type ID (identity). For example, an instruction type ID of "1" indicates that the corresponding script execution type is a background version test; an instruction type ID of "2" indicates that the corresponding script execution type is a client version test; an instruction type ID of "3" indicates that the corresponding script execution type is an environment probing test; an instruction type ID of "4" indicates that the corresponding script execution type is a script problem verification, and so on.
[0057] In this embodiment of the disclosure, relative to the generation of script execution tasks, script execution instructions are static. Once the system constructs a script execution instruction based on the script execution type provided by the user, the various characteristics of the script execution instruction described by the system for user acceptance testing are fixed and unchanging. Therefore, they are referred to as static characteristics.
[0058] In this embodiment of the disclosure, each instruction type is matched with the static features described in the corresponding script execution instruction. Once the instruction type of the script execution instruction is determined, the static features described in the script execution instruction can be determined.
[0059] The script index value set includes at least one script index value of the test script to be executed. Based on the static characteristics described by the script execution instructions, the client version of the test script to be executed, the set of test scripts, and the script version can be determined.
[0060] In other embodiments, the static features may further include at least one of the following: client version, script execution task ID, local retries, and machine-to-machine retries, to indicate which client version the test is performed on. The script execution task ID can be used to indicate a unique identifier of the script execution task generated according to the script execution instructions.
[0061] The local retries limit refers to the maximum number of times the test script corresponding to the script execution task generated by the script execution instructions can be repeated on the original test device if the execution fails. The machine-to-device retries limit refers to the maximum number of times the test script corresponding to the script execution task generated by the script execution instructions can be retested on a different test device if the execution fails.
[0062] The static features here are task-level, meaning they can dynamically generate one or more script execution tasks based on the trigger frequency and execution time period carried in the static features of the script execution command. Specifically, whether a script execution command generates one or more script execution tasks depends on the task type. For example, if it's a scheduled task, the script execution command will trigger and generate script execution tasks periodically, thus continuously generating multiple script execution tasks at set intervals. If it's a single verification task, the script execution command will generate one script execution task. The script execution command can be generated based on the script execution type submitted by the user and the latest test script uploaded to the script code building platform.
[0063] In an exemplary embodiment, the test script filtering condition information may include information such as a set of script index values, script version, script acceptance status, and test data status.
[0064] In step S120, the target parsing method of the static features in the script execution instruction is determined according to the instruction type, so as to parse the static features to obtain test script filtering condition information.
[0065] In this embodiment of the disclosure, the script execution instruction provides a unified template for customizing the execution mode of matching test scripts in script execution tasks corresponding to different script execution types. The instruction type of the script execution instruction can be used to determine the processing mode for different script execution types. Different instruction types are used to customize the scheduling strategy of script execution tasks, the acquisition method of test resources (including but not limited to the script acceptance status of test scripts, the readiness status of test data, the client version construction method, the script code version and branch, etc.), the triggering frequency and execution time period of script execution tasks, etc., to generate script execution tasks.
[0066] In this embodiment of the disclosure, a corresponding target parsing method is customized for each instruction type. For example, assuming that the static features described in the script execution instruction include 10 fields, one instruction type is customized to parse 7 of these fields as test script filtering condition information, and another instruction type is customized to parse 8 of these fields as test script filtering condition information. This allows the corresponding test script filtering condition information to be determined according to the instruction type, so that the matched test scripts obtained through filtering can be controlled. This achieves the purpose of customizing the scheduling strategy of the script execution task and the acquisition method of test resources according to different instruction types.
[0067] In step S130, test scripts that match the test script filtering condition information are selected.
[0068] In an exemplary embodiment, filtering test scripts that match the test script filtering conditions may include: selecting test scripts that match the test script filtering conditions from the test script set as matching test scripts based on the recorded test script version, script index value, script execution type, script acceptance status, and test data status.
[0069] In this embodiment of the disclosure, since the user acceptance test platform pre-stores information such as the script version, script index value, script execution type, script acceptance status, and test data status of each test script, when the user acceptance test platform triggers the generation of script execution instructions, it can query the test script set that meets the test script filtering conditions based on the static characteristics described by the script execution instructions and the corresponding instruction type, and use it as the matching test script. For example, the matching test script is selected based on the script version that is consistent with the script version in the test script filtering conditions, the script index value that belongs to the set of script index values in the test script filtering conditions, the script execution type that corresponds to the instruction type, and the script acceptance status and test data status that are consistent with the script acceptance status and test data status in the test script filtering conditions.
[0070] In step S140, a script execution task of the script execution type is constructed according to the matched test script, the trigger frequency and the execution time period, and the script execution task is placed in the task pool.
[0071] In this embodiment, the script execution task is the basic unit for task scheduling by the system. Different types of tasks can be scheduled based on available resources in the resource pool (number of test devices, test accounts, etc.). The script execution task type can correspond to various script execution types. For example, if the script execution type is background version testing, then the script execution task type is a background version testing task; if the script execution type is client version testing, then the script execution task type is a client version testing task; if the script execution type is environment probing, then the script execution task type is an environment probing task; if the script execution type is script problem verification, then the script execution task type is a script problem verification task.
[0072] In an exemplary embodiment, the script execution task may include a single script execution task and a multi-script execution task.
[0073] In this embodiment of the disclosure, a single script execution task refers to a script execution task that includes a matching test script. That is, based on the static features described by the script execution instructions and the corresponding instruction type, only one test script is matched, and the corresponding script execution instructions can be called single script execution instructions.
[0074] A multi-script execution task refers to a script execution task that includes multiple (two or more) matching test scripts. That is, based on the static characteristics described by the script execution instructions and the corresponding instruction types, multiple test scripts are matched, and the corresponding script execution instructions can be called multi-script execution instructions.
[0075] In an exemplary embodiment, constructing a script execution task based on a matched test script may include: if there is only one matched test script, then constructing a single script execution task, wherein the single script execution task is associated with one test script; if there are multiple matched test scripts, then constructing a multi-script execution task, wherein the multi-script execution task is associated with multiple matched test scripts.
[0076] In an exemplary embodiment, the script execution tasks in the task pool record the task initiating object and task creation time. The task initiating object can be represented by a unique identifier of the user who submitted the script execution type, and can also be referred to as the task initiator.
[0077] In step S150, script execution tasks in the task pool are scheduled according to the resource information in the resource pool, so as to execute the scheduled script execution tasks in the test equipment of the test equipment platform and obtain the script execution results.
[0078] In an exemplary embodiment, scheduling script execution tasks in the task pool based on resource information in the resource pool may include: setting the priority of non-running single script execution tasks in the task pool to be higher than the priority of multi-script execution tasks; setting the priority among non-running single script execution tasks in the task pool based on task construction time; if there are non-running single script execution tasks in the task pool, scheduling the non-running single script execution tasks first based on the priority among the non-running single script execution tasks, and the scheduled single script execution tasks do not exceed the concurrency threshold of single script execution tasks; if the number of scheduled single script execution tasks for a task initiating object exceeds the task concurrency threshold of the task initiating object, then switching to scheduling single script execution tasks for another task initiating object.
[0079] In this embodiment, multiple test scripts in a multi-script execution task compete for resources, and each test script requires significant system resources to support it. A single-script execution task, on the other hand, contains only one test script and requires fewer resources. For example, a single-script execution task may only need a mobile phone as a testing device to specify which test script is allowed to run. Therefore, the priority of a single-script execution task can be set higher than that of a multi-script execution task, allowing for priority scheduling of the single-script execution task. For multiple single-script execution tasks, their priority can be further set based on the order of their task creation time; for example, a single-script execution task created earlier has a higher priority.
[0080] Meanwhile, to prevent an excessive number of concurrent single-script execution tasks from hindering the efficiency of multi-script execution tasks, this embodiment of the disclosure also sets a concurrency threshold for single-script execution tasks to limit the number of single-script execution tasks running simultaneously. That is, the number of single-script execution tasks scheduled simultaneously does not exceed the concurrency threshold for that single-script execution task.
[0081] In addition, the system sets a task concurrency threshold for each task initiating object to limit the number of single-script running tasks that each task initiating object is currently running to no more than the corresponding task concurrency threshold. This is to prevent a single task initiating object from executing too many single-script running tasks at the same time, thus hindering the single-script running tasks initiated by other task initiating objects.
[0082] In an exemplary embodiment, scheduling script execution tasks in the task pool based on resource information in the resource pool may further include: determining remaining resources based on resource information in the resource pool and resource information allocated to a single script execution task; if there are multiple script execution tasks that are not running in the task pool, setting the priority among the multiple script execution tasks that are not running in the task pool based on the task construction time; and scheduling the multiple script execution tasks that are not running based on the remaining resources, the concurrency threshold of the multiple script execution tasks, and the priority among the multiple script execution tasks.
[0083] In this embodiment of the disclosure, the resource information of the resource pool refers to the information related to the available resources in the resource pool, such as the amount of available resources. The resource information allocated to a single script running task refers to the information related to the resources allocated to the single script running task from the available resources in the resource pool, such as the amount of resources allocated to the single script running task. For example, the remaining resources can be obtained by subtracting the amount of resources allocated to the single script running task from the amount of available resources. The resource information allocated to a single script running task includes the resources occupied by the currently scheduled single script running task during runtime, as well as resources that are not currently occupied by the single script running task but are reserved in advance for the single script running task. For example, the resource information allocated to a single script running task can be determined based on the concurrency threshold of the single script running task. For instance, although the concurrency threshold of the single script running task is set to 10, in reality, there may only be 5 single script running tasks at the current time. In that case, the resource information allocated to the single script running task refers to the resources reserved for 10 single script running tasks to run concurrently.
[0084] In this embodiment of the disclosure, multi-script running tasks and single-script running tasks can be scheduled simultaneously. When a single-script running task that meets the concurrency threshold of the single-script running task and the task concurrency threshold of each task initiating object is running, if there are still available resources in the resource pool, referred to as remaining resources, they can continue to be used to schedule multi-script running tasks.
[0085] If there are multiple non-running multi-script running tasks in the task pool, the priority between each multi-script running task can be set according to the order of task creation time. For example, the earlier the task was created, the higher the priority of the multi-script running task, and vice versa. The higher the importance of the task, the higher the priority, for example, backend version testing > client version testing > environment probing.
[0086] In this embodiment, resource contention exists among multiple test scripts in a multi-script execution task. Assuming only 100 mobile phones remain, the first multi-script execution task has 200 test scripts, the second has 300 test scripts, and each multi-script execution task can only obtain a maximum of 100 mobile phones as test devices. If one multi-script execution task obtains 100 mobile phones, the other cannot obtain any and therefore cannot run. This is a resource contention relationship, requiring scheduling to balance it. In this embodiment, the number of concurrent executions of multi-script execution tasks is limited by setting a concurrency threshold. For example, the concurrency threshold for multi-script execution tasks can be set lower than the concurrency threshold for single-script execution tasks.
[0087] For example, assuming the concurrency threshold for multi-script running tasks is 2 (referred to as dual multi-script running task scheduling, which means that dual multi-script running tasks are used in parallel to manage resources and schedule multi-script running tasks), then each time scheduling occurs, the two highest priority multi-script running tasks are selected from the non-running multi-script running tasks in the task pool for scheduling.
[0088] In this embodiment, the concurrency threshold for multiple script execution tasks can be set according to actual needs. For example, it can be set to 1, meaning that multiple script execution tasks can be scheduled serially. In other embodiments, the concurrency threshold for multiple script execution tasks can also be set to an integer greater than 2, meaning that multiple script execution tasks can be scheduled in parallel with more than two script execution tasks.
[0089] In this embodiment of the disclosure, when setting the priority of the script execution task, the script execution type corresponding to the script execution task can also be considered. For example, if it is known that certain script execution types have conflicts during runtime, the script execution tasks corresponding to these script execution types can be divided into different priorities so that they will not be concurrently scheduled at the same time, thus avoiding runtime conflicts.
[0090] In an exemplary embodiment, scheduling non-running multi-script running tasks based on the remaining resources, the concurrency threshold of the multi-script running tasks, and the priority among the non-running multi-script running tasks may include: if there is one non-running multi-script running task in the task pool, then allocating the remaining resources to the non-running multi-script running task; if there are non-running multi-script running tasks in the task pool that exceed the concurrency threshold of the multi-script running tasks, then scheduling non-running multi-script running tasks equal to the concurrency threshold of the multi-script running tasks according to the priority among the non-running multi-script running tasks; and determining the allocation of the remaining resources to each scheduled non-running multi-script running task based on the running time of each scheduled non-running multi-script running task.
[0091] In an exemplary embodiment, the script execution task may include multiple script execution tasks, which are associated with and matched with multiple test scripts.
[0092] In an exemplary embodiment, scheduling script execution tasks in the task pool according to resource information in the resource pool may include: obtaining test condition information for each test script in the multi-script execution task; grouping test scripts with the same test condition information in the multi-script execution task into the same group; calculating the total execution time of the test scripts in the same group based on the total execution time of the scripts in the group, and allocating test resources from the resource pool in the resource pool proportionally within the multi-script execution task.
[0093] In this embodiment, test condition information refers to certain prerequisites that must be met when executing a test script. For example, if a test script is designed to test the functionality of charging, then its test condition information is that it already has a test account and can use that account to test the charging function. Another test script is designed to test whether the registration function can be implemented correctly in a certain client version; in this case, its test condition information is that it does not yet have a test account. By grouping test scripts with the same test condition information within the same multi-script execution task into the same group, during test execution, the total execution time of the test scripts in the same group is statistically analyzed, and test resources (including test devices and test accounts) from the resource pool are allocated proportionally within the multi-script execution task. This avoids repeatedly switching test accounts. For example, if test scripts 1 to 10 all require a logged-in test account, then continuous testing can be performed on the same test device using the same logged-in test account, thereby improving testing efficiency.
[0094] In an exemplary embodiment, scheduling script execution tasks from the task pool based on resource information in the resource pool to execute the scheduled script execution tasks on the test equipment of the test equipment platform and obtain script execution results may include: generating task initialization information for the scheduled script execution tasks based on the static features; sending the task initialization information to the test equipment platform so that the test equipment platform executes the initialization operation of the scheduled script execution tasks on the test equipment; obtaining static information of matching test scripts associated with the scheduled script execution tasks; generating script initialization information of matching test scripts associated with the scheduled script execution tasks based on the static information; sending the script initialization information to the test equipment platform so that the test equipment platform distributes the matching test scripts associated with the scheduled script execution tasks to the test equipment for execution on the test equipment; the script code of the matching test script triggers the reception of script execution results returned by the test equipment platform through a callback; and supplementing any script execution results that are not received normally through periodic polling.
[0095] In step S160, a script execution task report of the corresponding script execution type is generated based on the script execution results.
[0096] In an exemplary embodiment, generating a script execution task report of the corresponding script execution type based on the script execution result may include: generating script execution instances based on the script execution result, wherein each scheduled script execution task includes 0 to multiple script execution instances; and generating a script execution task report of the corresponding script execution type based on the script execution instance after the scheduled script execution task has been executed.
[0097] In this embodiment of the disclosure, the script execution instance is the script execution result obtained by executing the test script in the script execution task. It is used to analyze and record the script execution result information of different test scripts. The script execution result includes a dynamic execution parsing report for each test script execution. Each script execution instance corresponds to a parsing report for a test script. The parsing report is closely related to the script execution result (success or failure, failure reason analysis, etc.) and is dynamic.
[0098] The script execution task scheduling method for user acceptance testing provided in this disclosure can, on the one hand, generate script execution instructions of corresponding instruction types based on the acquired script execution type. The generated script execution instructions are used to describe the static characteristics and corresponding instruction types of the script execution task for user acceptance testing. These static characteristics include key information such as the trigger frequency and execution time period of the script execution task, and the instruction type corresponds to the static characteristics described by the script execution instructions. Therefore, the target parsing method for the static characteristics in the generated script execution instructions can be determined based on the instruction type corresponding to the generated script execution instructions. This allows for parsing the static characteristics to obtain test script filtering condition information, and automatic selection of test scripts that match the test script filtering condition information. Furthermore, the method can be used to schedule the execution task based on the matched test scripts and the trigger frequency in the static characteristics. The system automatically constructs script execution tasks based on information such as execution rate and runtime period. When different script execution types are submitted according to different testing requirements, corresponding script execution tasks can be automatically generated. This eliminates the need to customize different execution methods for each different script execution type, reducing the development cost of task scheduling. Furthermore, by placing the constructed script execution tasks into a task pool and scheduling them based on resource information from a unified resource pool, rather than dividing the pool into different clusters for each script execution type, unified resource scheduling can be achieved for script execution tasks belonging to different script execution types. This avoids situations where some clusters are overloaded while others are idle, thereby improving resource utilization and testing efficiency. Simultaneously, the method provided in this disclosure automates script execution task scheduling by utilizing a unified resource pool for scheduling script execution tasks belonging to different script execution types, reducing manual intervention.
[0099] The following is combined with Figures 2 to 13The present invention provides an example of the method provided in the embodiments of the present invention, taking user acceptance testing as an example. The script execution task scheduling method for user acceptance testing provided in the embodiments of the present invention can be used to provide a reliable script execution task scheduling method for user acceptance testing based on the instruction model (here, the instruction is the script execution instruction).
[0100] This disclosure involves a UAT automated testing system, and the specific service deployment parameters are shown in Tables 1 and 2 below. Figure 2 The diagram illustrates a system sequence of a script execution task scheduling method for user acceptance testing based on an instruction model, as provided in an exemplary embodiment of this disclosure.
[0101] Figure 2 In this embodiment, the test equipment platform is a mobile phone device platform and the test equipment is a mobile phone for illustration. The mobile phone device platform can schedule each mobile phone as a test equipment, but this disclosure is not limited to this. The test equipment can be any terminal and / or server.
[0102] Figure 2 This document presents a system sequence diagram of a script execution task scheduling method for user acceptance testing based on an instruction model. During the test preparation phase, whenever new test script code is generated, the test script code package (including resources such as dependent libraries) is uploaded to the mobile device platform via a script code building platform. Relevant script code information, referred to as script code package information, is recorded in the user acceptance testing platform. This information may include the test script version, build time, script index value (also known as a unique index value), and build address (which records information about the test script's dependent libraries and other resources).
[0103] During the test initiation phase, the user submits the script execution type to trigger the generation of script test instructions (i.e., script execution instructions, or simply instructions). The user acceptance test platform parses the instructions, generates and schedules test tasks (i.e., script execution tasks), and sends a test plan to the mobile device platform. The test plan includes the scheduling of test scripts, the allocation of test devices, and the number of retries after test execution failure (which may include the number of retries on the local machine and / or the number of retries on a different machine). Based on the test plan, the platform determines how to run the script execution task on the mobile device platform and executes the relevant test scripts on the mobile phone.
[0104] During the test result processing phase, when a test script finishes running, the mobile device platform will call back to the user acceptance test platform to parse the script test results (i.e., script execution results, also known as test script execution results) and save the relevant script test results, such as screenshots, log files, etc.
[0105] During the test report generation phase, when the script execution task finishes, the user acceptance test platform completes all the script execution results, automatically analyzes any anomalies in the script execution results, generates the corresponding script execution task report (i.e., test report), and pushes the test report to the user.
[0106] The method provided in this disclosure involves a system that constructs script execution instructions based on the script execution type provided by the user. These instructions describe various static characteristics for user acceptance testing. The system generates script execution tasks based on these instructions, records static information of different test scripts, associates the script execution tasks with their corresponding test scripts and their static information, and adds the tasks to a task pool (or scheduling pool). The system dynamically schedules the parallel execution of tasks in the task pool based on available resources. By providing a large resource pool, single-script execution tasks and multi-script execution tasks can run simultaneously. That is, for all script execution types (test types), tasks can be divided into multi-script execution tasks and single-script execution tasks, eliminating the need for customization of task execution methods for each test type. This provides a reliable and universal script execution task scheduling method for user acceptance testing based on an instruction model, effectively reducing the development cost of task scheduling and improving the ability to locate and resolve problems.
[0107] Figure 3 The diagram illustrates the architecture of a script execution task scheduling method for user acceptance testing based on an instruction model, as provided in an exemplary embodiment of this disclosure.
[0108] Figure 3 This is an architecture diagram of a script execution task scheduling method for user acceptance testing based on an instruction model. This method is based on a task scheduler (which is set up in the user acceptance testing platform and is the main function implementation in the user acceptance testing platform) and a mobile device platform.
[0109] The task scheduler is responsible for building, scheduling, parsing, and pushing reports of script execution tasks. The mobile device platform is responsible for running the script execution tasks according to the task execution plan (i.e., the test plan, shown in the diagram) issued by the task scheduler.
[0110] like Figure 3As shown, the script execution task scheduling method for user acceptance testing based on the instruction model constructs a "script execution instruction (instruction) - script execution task (task) - test script record of script execution task (task script) - script execution instance (instance)" approach. This approach provides a unified instruction generation template (i.e., instruction pattern, which distinguishes different instruction types according to different script execution types) for users to use. Different types of users (e.g., script debuggers, backend developers, etc.) construct script execution instructions for different script execution types as needed.
[0111] The system analyzes the processing methods of different script execution types through script execution instructions and determines the task scheduling strategy based on different instruction types. A single script execution instruction can generate multiple script execution tasks or a single script execution task, depending on the script execution type. The script execution instructions describe various static characteristics for user acceptance testing to the system.
[0112] The single script execution task in this embodiment can cover various task types such as script debugging task, background stability testing task, script problem verification task, client version verification task, and background release version verification task. The multi-script execution task can also cover various task types such as script debugging task, background stability testing task, script problem verification task, client version verification task, and background release version verification task.
[0113] As the basic unit of task scheduling in the system, script execution tasks are scheduled by the system to execute multiple script execution tasks of different types simultaneously based on available resources. The test script record of each script execution task is used to record the runtime characteristics of the script execution task, i.e., its dynamic runtime characteristics, and to distribute the task execution plan to the mobile device platform, where the corresponding test scripts are run. Dynamic runtime characteristics can include dynamically acquired states such as the number of test scripts that meet the script acceptance and test data status requirements, the number of test devices assigned to the test scripts, and a list of device IDs of the already assigned test devices.
[0114] A test script record for a script execution task can include a list of scripts tested by the script execution task. This record is used to statistically analyze and record the static information of different test scripts. For example, the script list for a single script execution task includes one test script, while the script list for multiple script execution tasks includes multiple test scripts. This associates the script execution task with its corresponding test scripts and their static information before running the script execution task. The static information in this embodiment is at the script level and may include information such as the test environment, test data, test case operation steps, and static code of the test scripts.
[0115] When a script execution task (or simply task) finishes running, the system generates a script execution instance by parsing the runtime characteristics of the corresponding test script. This involves parsing the execution report and logs of each test script. These reports and logs record the runtime characteristics of the test script, and the parsing results constitute the script execution instance. Specifically, by analyzing the success or failure of the result, performing call stack exception analysis, and extracting error logs, a script execution instance is generated, and the generated test report is proactively pushed to the user. A test script for one execution task can correspond to one or more script execution instances in each test report, indicating one or more execution results of that test script within the task. Because test scripts may fail due to network fluctuations, this type of failure is not part of the user acceptance testing. Such misjudgments can be avoided through local testing and / or retrying on a different machine. Therefore, one test script can correspond to one or more execution results.
[0116] This disclosure proposes a script execution task scheduling method for user acceptance testing based on an instruction-based model. User acceptance testing involves numerous test types (script execution types), each with its own test cases, such as single-script debugging, script problem localization and tracking, client version testing, and backend version testing. When multiple types of test tasks (script execution tasks) are initiated simultaneously, effective scheduling is necessary to ensure all test tasks run in an orderly and high-quality manner due to limitations in hardware and software resources such as test equipment and test accounts. The instruction-based user acceptance testing script execution task scheduling method manages and schedules numerous task types using a unified resource pool (including test equipment and test accounts).
[0117] Continue to refer to Figure 3 The specific implementation logic of the script execution task scheduling method for user acceptance testing based on the instruction model is as follows:
[0118] In this embodiment, the instruction provides a unified entry point for different task types (e.g., regression testing of live client, script debugging, and script problem verification). The instruction records the static characteristics of task execution, including public and private script execution information. Public script execution information may include the script version and the instruction initiator (the task initiator object can be transparently passed as the instruction initiator). Private script execution information may include static characteristics used to distinguish different task types, such as script filtering conditions (i.e., test script filtering condition information) and timed triggering rules (determined based on triggering frequency and execution time period). Different task types are distinguished based on the instruction type ID. The script filtering conditions may include at least one of the following: script index value set, script version, script acceptance status, and test data status, used to filter test scripts that meet the script filtering conditions as matching test scripts. The timed triggering rules are used to control task generation, for example, determining whether the script execution instruction generates a script execution task on a timed basis or generates a single script execution task.
[0119] Based on the different instructions, they can be mainly divided into multi-script execution instructions and single-script execution instructions. Multi-script execution instructions generate multi-script execution tasks that compete for resources, requiring significant system resources for support. Therefore, scheduling needs to limit the parallelism of multi-script execution tasks. Single-script execution instructions generate single-script execution tasks with less resource contention, allowing multiple single-script execution tasks to run simultaneously during scheduling, ensuring the system can efficiently and orderly meet the needs of multiple users.
[0120] In this embodiment of the disclosure, the instruction translator in the task scheduler can schedule different modules to parse the static features of the instruction based on the different instruction type IDs. That is, the static feature parsing rules for different task types are pre-encapsulated into different modules, and the corresponding modules are distinguished based on the instruction type ID to parse the static features of the instruction, convert them into static features that conform to the task parsing rules, and generate task initialization information for the script execution task. Different task types are distinguished based on the task type ID (used to distinguish the corresponding script execution type), and the relevant tasks are added to the scheduling pool through the enqueue processor. The generation of each new instruction will trigger the task scheduler to schedule the tasks in the task pool, and the task scheduling does not affect each other.
[0121] In this embodiment, task initialization information for a script execution task can be generated based on static features. The user acceptance testing platform sends the task initialization information to the mobile device platform. After receiving the task initialization information, the mobile device platform uses it to initialize the corresponding script execution task. For example, based on the client version in the static features, the generated task initialization information may include control commands to download the corresponding client version. That is, the task initialization information can instruct the corresponding test device to download and install the corresponding client version as the test environment for the test script.
[0122] In this embodiment of the disclosure, script initialization information can also be generated based on the static information of the recorded test script. The user acceptance test platform sends the script initialization information to the mobile device platform. For example, script initialization is a process such as resetting the test device and restoring the test account attributes through adb naming.
[0123] In this embodiment of the disclosure, the task scheduler first sorts all the unrunning script running tasks according to their priority. The priority of single-script running tasks is higher than that of multi-script running tasks. This is because single-script running tasks often have a smaller resource requirement and often have the need to specify specific resources such as test accounts and test devices for running in order to trace and locate problems.
[0124] In this embodiment of the disclosure, in a single-script running task, the task scheduler triggers the execution of multiple single-script running tasks in parallel.
[0125] The system sets a concurrency threshold for single-script execution tasks to prevent excessive execution of single-script tasks from hindering the efficiency of multi-script execution tasks. For example, the testing environment is a multi-script execution task used to confirm the stability of the environment. When a large number of single-script execution tasks consume all the resources, it will be impossible to effectively monitor the stability of the environment. Therefore, it is necessary to limit the number of concurrent single-script execution tasks.
[0126] At the same time, the system sets a task concurrency threshold for each task initiator to prevent excessive execution of single-script tasks by a single task initiator from blocking the parallel task capabilities of other task initiators.
[0127] For example, the task scheduler uses the resource pool to sequentially determine whether the number of currently running single-script tasks exceeds the concurrency threshold for single-script tasks, and whether the number of currently running single-script tasks for each task initiator exceeds the task concurrency threshold for the corresponding single-script task initiator.
[0128] When the number of single-script execution tasks currently running on the system exceeds the concurrency threshold for single-script execution tasks, the system will automatically pause the scheduling of more single-script execution tasks. When the system detects whether the number of single-script execution tasks currently running by a certain task initiator exceeds the task concurrency threshold for the corresponding task initiator, the system will randomly switch to another task initiator and continue scheduling the execution of single-script execution tasks initiated by the randomly switched task initiator. For example, if the number of single-script execution tasks currently running by task initiator A exceeds the task concurrency threshold for task initiator A, the system will randomly switch to scheduling single-script execution tasks initiated by task initiator B.
[0129] When a single-script execution task meets the execution conditions (e.g., the number of running single-script execution tasks does not exceed the concurrency threshold of single-script execution tasks, and the number of single-script execution tasks running by each task initiator does not exceed the task concurrency threshold of the corresponding task initiator), the task scheduler sequentially schedules the single-script execution tasks of each task initiator to run. This continues until the unrunning single-script execution tasks of that task initiator no longer meet the execution conditions. Then, the scheduler randomly switches to another task initiator to continue scheduling the execution of the single-script execution tasks of that other task initiator. This continues until all unrunning single-script execution tasks of all task initiators no longer meet the execution conditions, until all task initiators have been traversed.
[0130] For example, such as Figure 4 The diagram illustrates the single-script task scheduling mode. Solid boxes represent single-script tasks, dashed boxes represent no single-script tasks, black-filled boxes represent running single-script tasks, and white-filled boxes represent unscheduled single-script tasks.
[0131] The queuing processor in this embodiment is used to put single-script running tasks and multi-script running tasks into a task pool, and the task scheduler distinguishes different task types for scheduling.
[0132] Figure 4 In the diagram, A, B, C, and D represent the respective task initiators. For example, A1 to A5 refer to the five single-script running tasks initiated by task initiator A, A1 to A4 represent the single-script running tasks that have already been run, and A5 represents the single-script running task that has not been scheduled.
[0133] Suppose the task scheduler first attempts to schedule a single-script running task initiated by task initiator A. However, it finds that the number of single-script running tasks already running by task initiator A has reached task initiator A's task concurrency threshold of 4, so A5 is not scheduled this time. Next, it checks for single-script running tasks initiated by task initiator B and finds that none exceed task initiator B's task concurrency threshold of 4, so B4 is scheduled this time. Then, it checks for single-script running tasks initiated by task initiator C and finds that none exceed task initiator C's task concurrency threshold of 4, so C4 is scheduled this time. Finally, it checks for task initiator D and finds that there are no unscheduled single-script running tasks, so the scheduling of single-script running tasks ends. Figure 4 In the embodiment, B4 and C4 are single-script running tasks that are not running. B4 and C4 can be scheduled at the same time. When B4 or C4 is paused because it does not meet the test conditions, B4 and C4 can also be rescheduled to run in a serial manner when the test conditions are met again.
[0134] In this embodiment of the disclosure, the task concurrency thresholds for different task initiators can be the same or different.
[0135] It should be noted that the embodiments disclosed herein establish a unified task pool for task scheduling. Figure 4 The different columns for each task initiator are only to express the judgment condition for whether the same task initiator triggers the task concurrency threshold.
[0136] In this embodiment of the disclosure, by setting a task concurrency threshold for the single-script running tasks of each task initiator, when an unrunning single-script running task of a certain task initiator does not meet the test conditions (e.g., exceeds the task concurrency threshold of the task initiator), the single-script running tasks of other task initiators are randomly triggered, which can ensure that the single-script running tasks of other task initiators that were previously affected and suspended continue to run.
[0137] Figure 4 In the embodiments, B1 and D1 can represent the report parsing process after the single script running tasks B1 and D2 are completed.
[0138] When a single-script task is running, the task scheduler first requests resources from a unified resource pool, locks the relevant resources, updates the status of the corresponding single-script task to the running state, and records the relevant information obtained by the test script corresponding to the single-script task during runtime.
[0139] In this embodiment of the disclosure, in a multi-script running task, the task scheduler triggers multiple multi-script running tasks to run simultaneously in a limited manner. For example, the task scheduler ensures that at most two multi-script running tasks run at the same time, which not only ensures the requirement that multiple multi-script running tasks can be batch-run at the same time, but also ensures that a single multi-script running task can deliver results with maximum efficiency.
[0140] For example, after all single-script execution tasks that meet the testing conditions have been scheduled, the task scheduler begins scheduling multi-script execution tasks. When there is only one multi-script execution task in the task pool, the task scheduler requests all available resources from the resource pool (such as test equipment and test accounts) and locks the relevant available resources to maximize the resources available for the execution of the multi-script execution task, thereby ensuring maximum efficiency in completing the multi-script execution task. Figure 5 As shown, assuming that single-script execution task 1, single-script execution task 2, single-script execution task 3, and multi-script execution task 1 are scheduled simultaneously, each of the single-script execution tasks 1, 2, and 3 is assigned one test device, i.e. Figure 5 Each square in the diagram represents a test device. Considering that single-script execution tasks may involve retrying on a different machine, white squares represent unused test devices. Figure 5 The remaining resources allocated to multi-script running task 1 refer to the multiple test devices in the five columns on the right.
[0141] Figure 5 The offline devices in this context refer to test devices that have been taken offline due to abnormal factors such as abnormal shutdown. Offline devices will not be used to run scripts or tasks.
[0142] When multiple new multi-script running tasks are added to the task pool, the task scheduler will be triggered again to schedule the tasks. However, at this time, system resources are used for the existing multi-script running tasks, so the new multi-script running tasks need to be blocked and queued.
[0143] When the first multi-script execution task finishes running and there are multiple multi-script execution tasks in the task pool, the task scheduler can simultaneously schedule two high-priority multi-script execution tasks (let's assume they are...). Figure 6 The execution of multi-script execution tasks 1 and 2 is carried out by calculating the resource ratio of the two multi-script execution tasks based on the ratio of the total execution time of each multi-script execution task, and then allocating them to the corresponding multi-script execution tasks for execution.
[0144] For example, if the total runtime of multi-script task 2 is 20 hours and the total runtime of multi-script task 1 is 35 hours, then the ratio of remaining resources is as follows: Figure 6 As shown.
[0145] When one multi-script task finishes running first, the task scheduler will wait for the other multi-script task to finish before starting the next round of scheduling. Since resource allocation is calculated based on the ratio of the total running time of each multi-script task, the expected completion times of the two multi-script tasks will not differ too much. After both multi-script tasks have finished, the task scheduler will schedule the next round of tasks according to the priority of the tasks based on the number of multi-script tasks in the task pool.
[0146] In this embodiment, the task scheduler can group test scripts within the same multi-script execution task according to their script distribution (e.g., test condition information) to reduce phenomena such as account switching and improve overall task execution efficiency. Furthermore, based on the grouping of test scripts within each multi-script execution task, the task scheduler customizes the script execution plan for each group. The task scheduler updates the status of the scheduled script execution task to running and records runtime information such as resources related to the test scripts. The execution log of the corresponding script is parsed and recorded in the script execution instance.
[0147] In this embodiment, a callback is added to the script execution code of each test script after the script execution ends, ensuring that the execution results of each script can be parsed in parallel to guarantee the parsing efficiency of the script execution results. The task scheduler receives the callback of each script and parses the script's execution log to generate script execution instances. The execution script record of a task corresponds to zero (if the script does not run and the task ends, no report will be generated, i.e., no instance can be generated, such as when the test device unexpectedly goes offline) to multiple script execution instances.
[0148] In this embodiment of the disclosure, script execution information can be obtained by parsing logs, call stacks, exception throwing stacks, and other information to generate a script execution instance. The script execution instance includes the content of the parsed report, which can be used to locate problems.
[0149] In this embodiment, after a task finishes execution, the mobile device platform actively calls back the task scheduler. The task scheduler accepts the callback and generates a script execution task report. It then scans the script execution instances of each script sequentially, actively completing any script execution task reports lost due to callbacks after script execution. Once the report is parsed, the task scheduler releases resources, updates the script execution task to the completed state, saves relevant runtime information, pushes the script execution task report to the task initiator, and actively triggers the task scheduler to perform the next round of task scheduling.
[0150] In this embodiment, the task scheduler will periodically and proactively check the running status of each task to avoid the loss of proactive callbacks from the mobile device platform due to issues such as server restarts, thus ensuring that all tasks in the entire system can run efficiently and orderly.
[0151] The script execution task scheduling method for user acceptance testing provided in this disclosure offers two main advantages. Firstly, it provides a reliable and universal instruction-based script execution task scheduling method for user acceptance testing. This method manages and schedules numerous task types using a unified resource pool, improving upon the traditional approach of customizing code development for each task type. This effectively reduces the development cost of new task types and enhances the ability to locate and resolve problems. Secondly, it effectively improves upon the traditional method of clustering and isolating test equipment based on task type, maximizing the utilization of test equipment and enabling the system to deliver script execution task results to the greatest extent possible, thereby improving task execution efficiency. Furthermore, the method provided in this disclosure fully proceduralizes task scheduling, reducing the impact of human factors on the success rate of script execution tasks through proactive order checking and resource allocation based on script status.
[0152] Figure 7 A schematic diagram illustrating a list of background version test reports provided in an exemplary embodiment of this disclosure is shown.
[0153] like Figure 7 As shown, assuming a user triggers the "Background Version Test" entry point, this triggers the generation of script execution instructions corresponding to this script execution type (Background Version Test), constructs the script execution task corresponding to this script execution type, and generates the following upon completion of the script execution task: Figure 7 The list of backend version test reports shown is pushed to users as test reports.
[0154] Figure 8 A schematic diagram of a background version test parsing comparison report provided in an exemplary embodiment of this disclosure is shown.
[0155] like Figure 8 As shown, the UAT automated testing system provided in this embodiment can also perform test report difference analysis and generate a background version test parsing comparison report.
[0156] Figure 9 A schematic diagram of a client version test list page provided in an exemplary embodiment of this disclosure is shown.
[0157] like Figure 9As shown, assuming a user triggers the "Client Version Test" entry point, this triggers the generation of script execution instructions corresponding to this script execution type (Client Version Test), constructs the script execution task corresponding to this script execution type, and generates the following upon completion of the script execution task: Figure 9 The client version test list page shown is pushed to users as a test report.
[0158] Figure 10 A schematic diagram of an environmental dialing list page provided in an exemplary embodiment of this disclosure is shown.
[0159] like Figure 10 As shown, assuming a user triggers the "Environment Probe" entry point, this triggers the generation of script execution instructions corresponding to this "Environment Probe" script execution type, constructs the script execution task corresponding to this "Environment Probe" script execution type, and generates the following upon completion of the script execution task: Figure 10 The environmental testing list page shown is pushed to users as a test report.
[0160] Figure 11 A schematic diagram illustrating a client version test and environment probing parsing report provided in an exemplary embodiment of this disclosure is shown.
[0161] like Figure 11 As shown, the UAT automated testing system provided in this embodiment can also generate client version testing and environment probing analysis reports.
[0162] Figure 12 A schematic diagram of a script problem verification list page provided in another exemplary embodiment of this disclosure is shown.
[0163] like Figure 12 As shown, assuming a user triggers the script issue verification entry point, this triggers the generation of script execution instructions corresponding to this script issue verification script execution type, constructs the script execution task corresponding to this script issue verification script execution type, and generates the following after the script execution task completes: Figure 12 The script issue verification list page shown is pushed to users as a test report.
[0164] Figure 13 A schematic diagram of a test script execution report provided in an exemplary embodiment of this disclosure is shown.
[0165] like Figure 13 As shown, the test script execution report provided in this embodiment may include test script execution instances and various key screenshots.
[0166] It should be noted that although the steps of the method in this disclosure are described in a specific order in the accompanying drawings, this does not require or imply that the steps must be performed in that specific order, or that all the steps shown must be performed to achieve the desired result. Additional or alternative steps may be omitted, multiple steps may be combined into one step, and / or a step may be broken down into multiple steps.
[0167] Figure 14 A schematic block diagram illustrating the composition of a script execution task scheduling apparatus for user acceptance testing provided in an exemplary embodiment of this disclosure is shown. Figure 14 As shown, Figure 14 The script execution task scheduling device 1400 for user acceptance testing provided in the embodiment may include a generation unit 1410, a determination unit 1420, a matching unit 1430, a construction unit 1440, and a scheduling unit 1450.
[0168] The generation unit 1410 can be used to generate script execution instructions according to the script execution type. The script execution instructions describe the static characteristics and corresponding instruction types of the script execution task for user acceptance testing. The static characteristics include the triggering frequency and execution time period of the script execution task, and the instruction type matches the static characteristics.
[0169] The determining unit 1420 can be used to determine the target parsing method of the static features in the script execution instruction according to the instruction type, so as to parse the static features to obtain test script filtering condition information.
[0170] The matching unit 1430 can be used to filter test scripts that match the test script filtering condition information.
[0171] The construction unit 1440 can be used to construct a script execution task of the script execution type according to the matched test script, the trigger frequency and the execution time period, and put the script execution task into the task pool.
[0172] The scheduling unit 1450 can be used to schedule script execution tasks in the task pool according to the resource information in the resource pool, so as to execute the scheduled script execution tasks in the test equipment of the test equipment platform and obtain the script execution results.
[0173] The generation unit 1410 can also be used to generate a script execution task report of the corresponding script execution type based on the script execution results.
[0174] In an exemplary embodiment, the test script filtering condition information may include information such as a set of script index values, script version, script acceptance status, and test data status.
[0175] In an exemplary embodiment, the script execution task scheduling device 1400 for user acceptance testing may further include:
[0176] The obtaining unit can be used to obtain script code package information of test scripts in the test script set on the test device platform from the script code building platform. The script code package information may include the script version, script index value and script execution type of the test script.
[0177] The acquisition unit can also be used to record the script acceptance status and test data status of the test script.
[0178] The matching unit 1430 can be used to: select test scripts from the test script set that match the test script filtering condition information based on the recorded test script version, script index value, script execution type, script acceptance status and test data status.
[0179] In an exemplary embodiment, the script execution instruction is used to customize a unified template for the execution mode of the matching test scripts in the script execution tasks corresponding to different script execution types; the instruction type of the script execution instruction is used to determine the processing mode of different script execution types; and the scheduling strategy and test resource acquisition method of the script execution task are customized using different instruction types to generate the script execution task.
[0180] In an exemplary embodiment, the script execution task may include a single script execution task and a multi-script execution task.
[0181] Among them, building unit 1440 can be used for:
[0182] If there is only one matching test script, then a single script execution task is constructed, and the single script execution task is matched and associated with one test script.
[0183] If there are multiple matching test scripts, a multi-script execution task is constructed, which is associated with and matches multiple test scripts.
[0184] In an exemplary embodiment, the script execution tasks in the task pool can record the task initiating object and task construction time of the script execution task.
[0185] The scheduling unit 1450 may include a setting unit, which can be used to set the priority of a single-script running task that is not running in the task pool to be higher than the priority of a multi-script running task.
[0186] The setting unit can also be used to set the priority among single-script running tasks that are not running in the task pool based on the task build time.
[0187] The scheduling unit 1450 can be used to schedule non-running single-script running tasks according to their priority among the non-running single-script running tasks if there are non-running single-script running tasks in the task pool, and the scheduled single-script running tasks do not exceed the concurrency threshold of single-script running tasks.
[0188] The scheduling unit 1450 can also be used to switch to scheduling a single script running task of another task initiating object if the number of single script running tasks scheduled by the task initiating object exceeds the task concurrency threshold of the task initiating object.
[0189] In an exemplary embodiment, the scheduling unit 1450 may further include a determining unit, which can be used to determine the remaining resources based on the resource information of the resource pool and the resource information allocated to the single script running task.
[0190] The setting unit can also be used to set the priority among the non-running multi-script running tasks in the task pool according to the task construction time if there are non-running multi-script running tasks in the task pool.
[0191] The scheduling unit 1450 can also be used to schedule non-running multi-script running tasks according to the remaining resources, the concurrency threshold of multi-script running tasks, and the priority among non-running multi-script running tasks.
[0192] In an exemplary embodiment, the scheduling unit 1450 can also be used for:
[0193] If there is an unrunning multi-script running task in the task pool, then all remaining resources will be allocated to the unrunning multi-script running task.
[0194] If there are non-running multi-script running tasks in the task pool that exceed the concurrency threshold of the multi-script running tasks, then non-running multi-script running tasks with a priority equal to the concurrency threshold of the multi-script running tasks are scheduled according to the priority among the non-running multi-script running tasks.
[0195] The remaining resources will be allocated to each scheduled, non-running multi-script task based on the execution time of each scheduled, non-running multi-script task.
[0196] In an exemplary embodiment, the script execution task may include multiple script execution tasks, which are associated with and matched with multiple test scripts;
[0197] The scheduling unit 1450 can be used for:
[0198] Obtain the test condition information for each test script in the multi-script execution task;
[0199] Test scripts with the same test condition information in the multi-script execution task are grouped into the same group;
[0200] The test scripts in the same group are counted based on the total execution time of the scripts in the group, and the test resources in the resource pool are allocated proportionally within the multi-script execution task.
[0201] In an exemplary embodiment, the scheduling unit 1450 can be used to:
[0202] Based on the static features, generate task initialization information for the scheduled script execution task;
[0203] The task initialization information is sent to the test equipment platform so that the test equipment platform executes the initialization operation of the scheduled script running task in the test equipment.
[0204] Obtain static information about the matching test scripts associated with the scheduled script execution task;
[0205] Based on the static information, generate script initialization information for the matching test scripts associated with the scheduled script execution tasks;
[0206] The script initialization information is sent to the test equipment platform so that the test equipment platform can distribute the matching test script associated with the scheduled script execution task to the test equipment, so that the matching test script associated with the scheduled script execution task can be run in the test equipment.
[0207] The matching test script's script code triggers a callback to receive the script execution result returned by the test device platform;
[0208] The system uses a periodic polling method to complete the script execution results that were not received correctly.
[0209] In an exemplary embodiment, the generation unit 1410 can also be used for:
[0210] Script execution instances are generated based on the script execution results, and each scheduled script execution task includes 0 to multiple script execution instances;
[0211] After the scheduled script execution task is completed, a script execution task report of the corresponding script execution type is generated based on the script execution instance.
[0212] Figure 14 Other aspects of the embodiments can be found in the descriptions of the other embodiments described above.
[0213] In this disclosure embodiment, please refer to Figure 15 , Figure 15This is a network interaction architecture diagram of a script execution task scheduling method for user acceptance testing provided in this embodiment. This embodiment can be implemented by a computer device 101. The computer device 101 can obtain data (e.g., script execution type) from the user device 102, process the data, for example, schedule test scripts in test devices of the test equipment platform (e.g., test devices 104a and / or 104b), and return the processing results (e.g., script execution results and / or script execution task reports) to the user device 102 for display. The computer device 101 can interact with the user device 102 and the test equipment platform. The computer device 101 can be a server, or it can belong to the user device (i.e., the user device's backend), etc., without limitation.
[0214] The user equipment 102 can be a mobile phone, a laptop computer, or a playback device in a vehicle, etc., without limitation. The user equipment 102 can be considered as a playback device in the vehicle 103, and it can display applications such as those from an automated testing system. Figure 15 The user equipment described herein is only a portion of the equipment exemplified, and the user equipment in this disclosure is not limited to this. Figure 15 The equipment listed in the text.
[0215] It is understood that the user equipment mentioned in the embodiments of this disclosure can be a computer device, and the computer device in the embodiments of this disclosure includes, but is not limited to, terminal devices or servers. In other words, the computer device can be a server or a terminal device, or a system composed of a server and a terminal device. Among them, the terminal device mentioned above can be an electronic device, including but not limited to mobile phones, tablets, desktop computers, laptops, handheld computers, in-vehicle devices, augmented reality / virtual reality (AR / VR) devices, head-mounted displays, smart TVs, wearable devices, smart speakers, digital cameras, webcams and other mobile internet devices (MIDs) with network access capabilities, or terminal devices in scenarios such as trains, ships, and flights.
[0216] The servers mentioned above can be independent physical servers, server clusters or distributed systems composed of multiple physical servers, or cloud servers that provide basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, vehicle-road cooperation, content delivery networks (CDN), and big data and artificial intelligence platforms.
[0217] Optionally, the data involved in the embodiments of this disclosure may be stored in a computer device or may be stored based on cloud storage technology, without limitation.
[0218] Figure 15 Other aspects of the embodiments can be found in the descriptions of the other embodiments described above.
[0219] See Figure 16 , Figure 16 This is a schematic diagram of the structure of a computer device provided in an embodiment of this disclosure. Figure 16 As shown, the computer device in this embodiment may include one or more processors 1601, a memory 1602, and an input / output interface 1603. The processor 1601, memory 1602, and input / output interface 1603 are connected via a bus 1604. The memory 1602 stores a computer program, which includes program instructions. The input / output interface 1603 receives and outputs data, such as for data interaction between the host machine and the computer device, or for data interaction between various virtual machines within the host machine. The processor 1601 executes the program instructions stored in the memory 1602.
[0220] The processor 1601 can perform the following operations:
[0221] Script execution instructions are generated based on the script execution type. The script execution instructions describe the static characteristics and corresponding instruction types of the script execution task for user acceptance testing. The static characteristics include the triggering frequency and execution time period of the script execution task. The instruction types match the static characteristics.
[0222] The target parsing method for static features in the script execution instructions is determined based on the instruction type, so as to parse the static features to obtain test script filtering condition information;
[0223] Filter test scripts that match the filter conditions of the test script;
[0224] Based on the matched test script, the trigger frequency, and the running time period, a script running task of the script running type is constructed, and the script running task is placed into the task pool;
[0225] The script execution tasks in the task pool are scheduled according to the resource information in the resource pool, so as to execute the scheduled script execution tasks in the test equipment of the test equipment platform and obtain the script execution results.
[0226] Generate a script execution task report of the corresponding script execution type based on the script execution results.
[0227] In some feasible implementations, the processor 1601 may be a central processing unit (CPU), but it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.
[0228] The memory 1602 may include read-only memory and random access memory, and provides instructions and data to the processor 1601 and the input / output interface 1603. A portion of the memory 1602 may also include non-volatile random access memory. For example, the memory 1602 may also store device type information.
[0229] In practice, the computer device can execute the steps shown in the above figure through its built-in functional modules, which will not be elaborated here.
[0230] This disclosure provides a computer device including a processor, an input / output interface, and a memory. The processor retrieves a computer program from the memory and executes the steps of the method shown in the figures above.
[0231] This disclosure also provides a computer-readable storage medium storing a computer program adapted to be loaded by a processor and execute the application display methods provided in the steps of the above figures, which will not be repeated here. Furthermore, the beneficial effects of using the same method will not be repeated here either. For technical details not disclosed in the embodiments of the computer-readable storage medium involved in this disclosure, please refer to the description of the method embodiments of this disclosure. As an example, the computer program may be deployed to execute on a single computer device, or on multiple computer devices located in one location, or on multiple computer devices distributed in multiple locations and interconnected via a communication network.
[0232] The computer-readable storage medium can be an internal storage unit of the computer device provided in any of the foregoing embodiments, such as a hard disk or memory of the computer device. The computer-readable storage medium can also be an external storage device of the computer device, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., provided on the computer device. Furthermore, the computer-readable storage medium can include both internal and external storage units of the computer device. The computer-readable storage medium is used to store the computer program and other programs and data required by the computer device. The computer-readable storage medium can also be used to temporarily store data that has been output or will be output.
[0233] This disclosure also provides a computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in the various alternative embodiments shown in the figures above.
[0234] The terms "first," "second," etc., used in the specification, claims, and drawings of this disclosure are used to distinguish different objects, not to describe a specific order. Furthermore, the term "comprising," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, apparatus, product, or device that includes a series of steps or units is not limited to the listed steps or modules, but may optionally include steps or modules not listed, or may optionally include other step units inherent to these processes, methods, apparatuses, products, or devices.
[0235] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of each example have been generally described in terms of functionality. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this disclosure.
[0236] The methods and related apparatus provided in this disclosure are described with reference to the method flowcharts and / or structural diagrams provided in this disclosure. Specifically, each block of the method flowchart and / or structural diagram, as well as combinations of blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable application display device to create a machine, such that the instructions, which execute via the processor of the computer or other programmable application display device, generate instructions for implementing the process... Figure 1 A schematic diagram of one or more processes and / or structures. Figure 1 The computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable application display device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 A schematic diagram of one or more processes and / or structures. Figure 1 The functions specified in one or more boxes. These computer program instructions may also be loaded onto a computer or other programmable application display device to cause a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable device for implementing the process. Figure 1 A process or multiple processes and / or structures illustrate the steps of the functions specified in one or more boxes.
Claims
1. A script execution task scheduling method for user acceptance testing, characterized in that, include: Script execution instructions are generated based on the script execution type. The script execution instructions describe the static characteristics and corresponding instruction types of the script execution task for user acceptance testing. The static characteristics include the trigger frequency and execution time period of the script execution task, the set of test scripts to be executed, and the script version. The instruction type matches the static characteristics. One script execution type corresponds to one instruction type. The control parameters required to generate the script execution instructions are obtained in a customized manner according to each script execution type as the static characteristics. Based on the instruction type, determine the target parsing method of the static features in the script execution instruction, so as to parse the static features to obtain test script filtering condition information, the test script filtering condition information including script index value set and script version; Filter test scripts that match the filter conditions of the test script; Based on the matched test script, the trigger frequency, and the running time period, a script running task of the script running type is constructed, and the script running task is placed into the task pool; The script execution tasks in the task pool are scheduled according to the resource information in the resource pool, so as to execute the scheduled script execution tasks in the test equipment of the test equipment platform and obtain the script execution results. Generate a script execution task report of the corresponding script execution type based on the script execution results.
2. The method according to claim 1, characterized in that, The test script filtering condition information also includes script acceptance status and test data status; wherein, the method further includes: Obtain script code package information of test scripts from the test script set on the test device platform from the script code building platform. The script code package information includes the script version, script index value and script execution type of the test script. Record the script acceptance status and test data status of the test script; The test scripts that filter and match the test script filtering conditions include: Based on the recorded script version, script index value, script execution type, script acceptance status, and test data status, test scripts that match the test script filtering conditions are selected from the test script set as the matching test scripts.
3. The method according to claim 2, characterized in that, The script execution instructions are used to customize a unified template for the execution mode of the matching test scripts in script execution tasks corresponding to different script execution types. The instruction type of the script execution command is used to determine the processing method for different script execution types; The scheduling strategy and resource acquisition method for script execution tasks are customized using different instruction types to generate the script execution tasks.
4. The method according to claim 1, characterized in that, The script execution tasks include single script execution tasks and multiple script execution tasks; The process of constructing a script execution task based on the matched test script includes: If there is only one matching test script, then a single script execution task is constructed, and the single script execution task is matched and associated with one test script. If there are multiple matching test scripts, a multi-script execution task is constructed, which is associated with and matches multiple test scripts.
5. The method according to claim 4, characterized in that, The script execution task in the task pool records the task initiation object and task creation time of the script execution task; The process of scheduling script execution tasks in the task pool based on resource information in the resource pool includes: The priority of single-script running tasks that are not running in the task pool is set to be higher than the priority of multi-script running tasks; The priority of non-running single-script execution tasks in the task pool is set according to the task build time; If there are unrunning single-script running tasks in the task pool, the unrunning single-script running tasks are scheduled first according to their priority among the unrunning single-script running tasks, and the scheduled single-script running tasks do not exceed the concurrency threshold of single-script running tasks. If the number of single-script execution tasks scheduled for the task initiating object exceeds the task concurrency threshold of the task initiating object, then switch to scheduling a single-script execution task for another task initiating object.
6. The method according to claim 5, characterized in that, Scheduling script execution tasks in the task pool based on resource information in the resource pool also includes: Based on the resource information of the resource pool and the resource information allocated to the single script execution task, determine the remaining resources; If there are non-running multi-script running tasks in the task pool, the priority among the non-running multi-script running tasks in the task pool is set according to the task build time; The non-running multi-script tasks are scheduled based on the remaining resources, the concurrency threshold of the multi-script running tasks, and the priority among the non-running multi-script running tasks.
7. The method according to claim 6, characterized in that, Scheduling non-running multi-script tasks based on the remaining resources, the concurrency threshold of multi-script running tasks, and the priority among non-running multi-script running tasks includes: If there is an unrunning multi-script running task in the task pool, then all remaining resources will be allocated to the unrunning multi-script running task. If there are non-running multi-script running tasks in the task pool that exceed the concurrency threshold of the multi-script running tasks, then non-running multi-script running tasks with a priority equal to the concurrency threshold of the multi-script running tasks are scheduled according to the priority among the non-running multi-script running tasks. The remaining resources will be allocated to each scheduled, non-running multi-script task based on the execution time of each scheduled, non-running multi-script task.
8. The method according to claim 1, characterized in that, The script execution task includes multiple script execution tasks, and the multiple script execution tasks are associated with and matched with multiple test scripts; The process of scheduling script execution tasks in the task pool based on resource information in the resource pool includes: Obtain the test condition information for each test script in the multi-script execution task; Test scripts with the same test condition information in the multi-script execution task are grouped into the same group; The test scripts in the same group are counted based on the total execution time of the scripts in the group, and the test resources in the resource pool are allocated proportionally within the multi-script execution task.
9. The method according to claim 1, characterized in that, Based on the resource information in the resource pool, script execution tasks in the task pool are scheduled to execute on the test equipment of the test equipment platform, and the script execution results are obtained, including: Based on the static features, generate task initialization information for the scheduled script execution task; The task initialization information is sent to the test equipment platform so that the test equipment platform executes the initialization operation of the scheduled script running task in the test equipment. Obtain static information about the matching test scripts associated with the scheduled script execution task; Based on the static information, generate script initialization information for the matching test scripts associated with the scheduled script execution tasks; The script initialization information is sent to the test equipment platform so that the test equipment platform can distribute the matching test script associated with the scheduled script execution task to the test equipment, so that the matching test script associated with the scheduled script execution task can be run in the test equipment. The matching test script's script code triggers a callback to receive the script execution result returned by the test device platform; The system uses a periodic polling method to complete the script execution results that were not received correctly.
10. The method according to claim 9, characterized in that, Based on the script execution results, a script execution task report of the corresponding script execution type is generated, including: Script execution instances are generated based on the script execution results, and each scheduled script execution task includes 0 to multiple script execution instances; After the scheduled script execution task is completed, a script execution task report of the corresponding script execution type is generated based on the script execution instance.
11. A script execution task scheduling device for user acceptance testing, characterized in that, include: The generation unit is used to generate script execution instructions according to the script execution type. The script execution instructions describe the static characteristics and corresponding instruction types of the script execution task for user acceptance testing. The static characteristics include the triggering frequency and execution time period of the script execution task, the set of test scripts to be executed, and the script version. The instruction type matches the static characteristics. One script execution type corresponds to one instruction type. The control parameters required to generate the script execution instructions are obtained in a customized manner according to each script execution type as the static characteristics. The determining unit is configured to determine the target parsing method of the static features in the script execution instruction according to the instruction type, so as to parse the static features to obtain test script filtering condition information, wherein the test script filtering condition information includes a set of script index values and a script version; The matching unit is used to filter test scripts that match the test script filtering condition information; A construction unit is used to construct a script execution task of the script execution type according to the matched test script, the trigger frequency and the execution time period, and put the script execution task into the task pool; The scheduling unit is used to schedule script execution tasks in the task pool according to the resource information in the resource pool, so as to execute the scheduled script execution tasks in the test equipment of the test equipment platform and obtain the script execution results. The generation unit is also used to generate a script execution task report of the corresponding script execution type based on the script execution results.
12. A computer-readable storage medium having a computer program stored thereon, which, when executed by a computer device, implements the method of any one of claims 1 to 10.
13. A computer device, characterized in that, include: processor; as well as Memory for storing the executable instructions of the processor; The processor is configured to execute the method of any one of claims 1 to 10 by executing the executable instructions.
14. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a computer device, it implements the method described in any one of claims 1-10.