Task processing method, device and server based on multi-cloud server
Patent Information
- Application Number
- CN202210988244.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-17
- Publication Date
- 2026-09-11
- Estimated Expiration
- 2042-08-17
AI Technical Summary
[0005]本申请提供一种基于多云服务器的任务处理方法、装置及服务器,用以解决任务测试的效率较低的技术问题
[0042]This application provides a task processing method, apparatus, and server based on multiple cloud servers, which acquires test plan information. The test plan information includes the start time of each task to be tested, the cloud server corresponding to each task, and the task invocation strategy. If it is determined that the preset configuration information for the corresponding task in the cloud server has been successfully deployed, and it is determined that the current time has reached the start time, then each of the multiple cloud servers is controlled to run the task corresponding to that cloud server, and the resource utilization of each cloud server is monitored to obtain monitoring result information for each cloud server. The configuration information is used to indicate the information required for the cloud server to run the task. If it is determined that the monitoring result information indicates that the resource utilization of the cloud server is lower than a preset threshold, then according to the task invocation strategy, the tasks running in the cloud servers with resource utilization lower than the preset threshold are invoked, and the test result information for each cloud server based on running the corresponding task is obtained. In this solution, since each cloud server has preset configuration information corresponding to a specific task, if it is determined that the preset configuration information for the corresponding task on the cloud server has been successfully deployed and the current time has reached the start time in the test plan information, then each of the multiple cloud servers is controlled to run the task corresponding to that cloud server, and the resource utilization of each cloud server is monitored to obtain the monitoring result information for each cloud server. The server compares the resource utilization of the cloud server in the monitoring result information with a preset threshold. If it is determined that the monitoring result information indicates that the resource utilization of the cloud server is lower than the preset threshold, then according to the task invocation strategy, the task running on the cloud server with the resource utilization lower than the preset threshold is invoked to other cloud servers, and the test result information based on running the corresponding task is obtained for each cloud server. Therefore, by invoking and processing tasks in the cloud servers in real time according to the task invocation strategy, server management and deployment, test plan and real-time invocation management for UI automated testing are realized. Compared with the manual task invocation in the prior art, the automated task invocation in this application has greatly improved the testing efficiency and has great market promotion potential in the implementation of UI automated testing, solving the technical problem of low efficiency in task testing.
Smart Images

Figure CN115391007B_ABST
Abstract
Description
Technical Field
[0001] This application relates to computer technology, and in particular to a task processing method, apparatus and server based on a multi-cloud server. Background Technology
[0002] Currently, applications or systems need to undergo automated testing before they can be put into use.
[0003] In existing technologies, automated testing involves using task invocation tools to distribute the scripts to be tested to corresponding cloud servers for execution.
[0004] However, in existing technologies, since automated testing distributes the scripts to be tested to the corresponding cloud servers through task invocation tools, it can only achieve manual invocation of tasks, resulting in low efficiency of task testing. Summary of the Invention
[0005] This application provides a task processing method, apparatus, and server based on a multi-cloud server to solve the technical problem of low efficiency in task testing.
[0006] Firstly, this application provides a task processing method based on multiple cloud servers, including:
[0007] Obtain test plan information; wherein, the test plan information includes the start time of each task to be tested, the cloud server corresponding to each task, and the task invocation strategy;
[0008] If it is determined that the preset configuration information for the corresponding task in the cloud server has been successfully deployed, and it is determined that the current time has reached the start time, then each of the multiple cloud servers is controlled to run the task corresponding to each cloud server, and the resource utilization of each cloud server is monitored to obtain the monitoring result information of each cloud server; wherein, the configuration information is used to indicate the information required for the cloud server to run the task.
[0009] If it is determined that the monitoring result information indicates that the resource utilization rate of the cloud server is lower than a preset threshold, then according to the task invocation strategy, the tasks running in the cloud servers with resource utilization rates lower than the preset threshold are invoked, and the test result information of each cloud server based on the running of the corresponding task is obtained.
[0010] Furthermore, the method also includes:
[0011] In response to an input operation, wherein the input operation represents an operation inputting configuration information for the cloud server, the version information of the operating system of each cloud server is determined; wherein the version information is used to indicate the software and code information required for the cloud server to run tasks;
[0012] Based on the operating system version information of each cloud server, a deployment operation is performed on the software and code information of each cloud server to obtain return result information; wherein, the return result information indicates whether the deployment was successful.
[0013] Furthermore, the configuration information includes the Internet Protocol address of the cloud server and the address in the distributed version control system where the code information is located.
[0014] Furthermore, if it is determined that the monitoring result information indicates that the resource utilization rate of the cloud server is lower than a preset threshold, then according to the task invocation strategy, the tasks running on the cloud servers with resource utilization rates lower than the preset threshold are invoked, including:
[0015] If it is determined that the monitoring result information indicates that the resource utilization rate of the cloud server is lower than a preset threshold, then according to the task invocation strategy, the tasks running in the cloud server with the resource utilization rate lower than the preset threshold are invoked to the cloud server with the resource utilization rate greater than or equal to the preset threshold.
[0016] Furthermore, if it is determined that the monitoring result information indicates that the resource utilization rate of the cloud server is lower than a preset threshold, then according to the task invocation strategy, the tasks running on the cloud servers with resource utilization rates lower than the preset threshold are invoked, including:
[0017] If it is determined that the monitoring result information indicates that the resource utilization rate of the cloud server is lower than a preset threshold, then according to the task invocation strategy, the task running in the cloud server with the resource utilization rate lower than the preset threshold is invoked to another cloud server of the same type as the cloud server with the resource utilization rate lower than the preset threshold.
[0018] Furthermore, the test plan information also includes a report generation strategy; and obtains test result information for each cloud server based on running the corresponding task, including:
[0019] According to the report generation strategy, test result information for each cloud server based on running the corresponding task is generated and integrated.
[0020] Furthermore, the method also includes:
[0021] Generate a prompt message; wherein the prompt message is used to indicate that the running result information of the cloud server has been obtained.
[0022] Secondly, this application provides a task processing device based on a multi-cloud server, comprising:
[0023] The acquisition unit is used to acquire test plan information; wherein, the test plan information includes the start time of each task to be tested, the cloud server corresponding to each task, and the task invocation strategy;
[0024] The monitoring unit is configured to, if it is determined that the preset configuration information for the corresponding task in the cloud server has been successfully deployed and the current time has reached the start time, control each of the multiple cloud servers to run the task corresponding to each cloud server, monitor the resource utilization of each cloud server, and obtain monitoring result information for each cloud server; wherein, the configuration information is used to indicate the information required for the cloud server to run the task.
[0025] The calling unit is used to, if it is determined that the monitoring result information indicates that the resource utilization rate of the cloud server is lower than a preset threshold, then according to the task calling strategy, call the tasks running in the cloud server whose resource utilization rate is lower than the preset threshold.
[0026] The first determining unit is used to obtain the test result information of each cloud server based on the running of the corresponding task.
[0027] Furthermore, the device also includes:
[0028] The second determining unit is configured to respond to an input operation, wherein the input operation represents an operation inputting configuration information of the cloud server, and determine the operating system version information of each cloud server; wherein the version information is used to indicate the software and code information required for the cloud server to run tasks;
[0029] The deployment unit is used to perform deployment operations on the software and code information of each cloud server according to the version information of the operating system of each cloud server, and obtain return result information; wherein, the return result information indicates whether the deployment is successful.
[0030] Furthermore, the configuration information includes the Internet Protocol address of the cloud server and the address in the distributed version control system where the code information is located.
[0031] Furthermore, the calling unit is specifically used for:
[0032] If it is determined that the monitoring result information indicates that the resource utilization rate of the cloud server is lower than a preset threshold, then according to the task invocation strategy, the tasks running in the cloud server with the resource utilization rate lower than the preset threshold are invoked to the cloud server with the resource utilization rate greater than or equal to the preset threshold.
[0033] Furthermore, the calling unit is specifically used for:
[0034] If it is determined that the monitoring result information indicates that the resource utilization rate of the cloud server is lower than a preset threshold, then according to the task invocation strategy, the task running in the cloud server with the resource utilization rate lower than the preset threshold is invoked to another cloud server of the same type as the cloud server with the resource utilization rate lower than the preset threshold.
[0035] Furthermore, the test plan information also includes a report generation strategy; the first determining unit is specifically used for:
[0036] According to the report generation strategy, test result information for each cloud server based on running the corresponding task is generated and integrated.
[0037] Furthermore, the device also includes:
[0038] A generation unit is used to generate prompt information; wherein the prompt information is used to indicate that the running result information of the cloud server has been obtained.
[0039] Thirdly, this application provides a server, including a memory and a processor, wherein the memory stores a computer program that can run on the processor, and the processor executes the computer program to implement the method described in the first aspect.
[0040] Fourthly, this application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the method described in the first aspect.
[0041] Fifthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the method described in the first aspect.
[0042] This application provides a task processing method, apparatus, and server based on multiple cloud servers, which acquires test plan information. The test plan information includes the start time of each task to be tested, the cloud server corresponding to each task, and the task invocation strategy. If it is determined that the preset configuration information for the corresponding task in the cloud server has been successfully deployed, and it is determined that the current time has reached the start time, then each of the multiple cloud servers is controlled to run the task corresponding to that cloud server, and the resource utilization of each cloud server is monitored to obtain monitoring result information for each cloud server. The configuration information is used to indicate the information required for the cloud server to run the task. If it is determined that the monitoring result information indicates that the resource utilization of the cloud server is lower than a preset threshold, then according to the task invocation strategy, the tasks running in the cloud servers with resource utilization lower than the preset threshold are invoked, and the test result information for each cloud server based on running the corresponding task is obtained. In this solution, since each cloud server has preset configuration information corresponding to a specific task, if it is determined that the preset configuration information for the corresponding task on the cloud server has been successfully deployed and the current time has reached the start time in the test plan information, then each of the multiple cloud servers is controlled to run the task corresponding to that cloud server, and the resource utilization of each cloud server is monitored to obtain the monitoring result information for each cloud server. The server compares the resource utilization of the cloud server in the monitoring result information with a preset threshold. If it is determined that the monitoring result information indicates that the resource utilization of the cloud server is lower than the preset threshold, then according to the task invocation strategy, the task running on the cloud server with the resource utilization lower than the preset threshold is invoked to other cloud servers, and the test result information based on running the corresponding task is obtained for each cloud server. Therefore, by invoking and processing tasks in the cloud servers in real time according to the task invocation strategy, server management and deployment, test plan and real-time invocation management for UI automated testing are realized. Compared with the manual task invocation in the prior art, the automated task invocation in this application has greatly improved the testing efficiency and has great market promotion potential in the implementation of UI automated testing, solving the technical problem of low efficiency in task testing. Attached Figure Description
[0043] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0044] Figure 1 A flowchart illustrating a task processing method based on a multi-cloud server, provided as an embodiment of this application;
[0045] Figure 2 A flowchart illustrating another task processing method based on a multi-cloud server provided in this application embodiment;
[0046] Figure 3 An interactive schematic diagram of a task processing method based on a multi-cloud server provided in an embodiment of this application;
[0047] Figure 4 An interactive diagram illustrating the logic of a server identification module provided in this application embodiment;
[0048] Figure 5 An interactive diagram of the planning module logic provided in an embodiment of this application;
[0049] Figure 6 A schematic diagram illustrating the interaction logic between a task invocation module and a report collection module, provided for an embodiment of this application;
[0050] Figure 7 A comparative analysis diagram showing the effects of a task processing method based on a multi-cloud server provided in this application embodiment compared with existing technologies;
[0051] Figure 8 This application provides a schematic diagram of the structure of a task processing device based on a multi-cloud server, as shown in the embodiments of the present application.
[0052] Figure 9 This is a schematic diagram of another task processing device based on a multi-cloud server provided in an embodiment of this application;
[0053] Figure 10 This is a schematic diagram of the structure of a server provided in an embodiment of this application.
[0054] The accompanying drawings have illustrated specific embodiments of this disclosure, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concepts of this disclosure to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0055] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure.
[0056] In one example, applications or systems require automated testing before deployment. In existing technologies, automated testing involves distributing the scripts to be tested to corresponding cloud servers using task invocation tools. However, because this method relies on manual task invocation, it results in low efficiency.
[0057] This application provides a task processing method, apparatus, and server based on a multi-cloud server, which aims to solve the above-mentioned technical problems in the prior art.
[0058] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0059] Figure 1 This application provides a flowchart illustrating a task processing method based on a multi-cloud server, as shown in the embodiments below. Figure 1 As shown, the method includes:
[0060] 101. Obtain test plan information; the test plan information includes the start time of each task to be tested, the cloud server corresponding to each task, and the task invocation strategy.
[0061] For example, the executing entity in this embodiment can be a server, a terminal device, a task processing device or device based on a multi-cloud server, or other device or device capable of executing this embodiment, and there are no limitations on this. In this embodiment, the executing entity is described as a server.
[0062] First, test plan information needs to be obtained. This information is used to execute automated tests, such as UI automation tests. The server includes a planning module where users can create test plans and set the start time for each task, the server to execute the task, the test suite, the task invocation strategy, and the report generation strategy. Therefore, test plan information can be obtained.
[0063] 102. If it is determined that the preset configuration information for the corresponding task in the cloud server has been successfully deployed and the current time has reached the start time, then control each cloud server in the multiple cloud servers to run the task corresponding to each cloud server, and monitor the resource utilization of each cloud server to obtain the monitoring result information of each cloud server; wherein, the configuration information is used to indicate the information required for the cloud server to run the task.
[0064] For example, the preset configuration information refers to the configuration information pre-entered by the user for executing automated tests. This configuration information includes the cloud server's Internet Protocol Address (IP) and the address in the distributed version control system (Git) where the code information resides (referred to as the Git address). Specifically, the server includes a configuration module, a service identification module, and an adaptation and distribution module. In the configuration module, the user configures the IP address of the cloud server to be used for user interface (UI) automated testing and the Git address of the code information (i.e., the UI automation code) into the server. At this point, the configuration is complete. Then, the server uses the service identification module to identify the operating system and version information of each cloud server with its IP address and stores the identified information. Based on the operating system and version information of each cloud server with its IP address, the server automatically distributes and installs the software required for UI automated testing to each cloud server. This software includes a browser, browser update scripts, and automation drivers. Simultaneously, the server pulls the full UI automation code from the Git repository according to the Git address and distributes it to each cloud server, finally obtaining the returned result information. If the returned result indicates successful deployment, then the preset configuration information for the corresponding task in the cloud server has been successfully deployed.
[0065] In this step, if it is confirmed that the preset configuration information for the task corresponding to that cloud server has been successfully deployed and the start time has been determined, then each of the multiple cloud servers is controlled to start running the task corresponding to that cloud server. During the operation of each cloud server, the resource utilization of each cloud server is monitored, and the monitoring results of each cloud server are obtained. The resource utilization of the cloud server includes resource consumption information, central processing unit (CPU), memory, and network conditions, etc.
[0066] For example, in the first scenario, the task is used to test whether the code information is correct. The start time for each task to be tested is 9:00 AM on July 27, 2022. Task 1 corresponds to cloud server A, and Task 2 corresponds to cloud server B. The code running Task 1 and the code running Task 2 are different parts of the UI automation code. The operating system version information of cloud server A and cloud server B can be different or the same. If it is determined that the preset configuration information for Task 1 corresponding to cloud server A and the preset configuration information for Task 2 corresponding to cloud server B have been successfully deployed, and the current time has reached the start time, then cloud server A is controlled to start running Task 1, and cloud server B is controlled to run Task 2. During the operation of cloud servers A and B, the resource utilization of cloud server A and cloud server B are monitored, and the monitoring result information 1 for cloud server A and the monitoring result information 2 for cloud server B are obtained.
[0067] Alternatively, in the second scenario, the task is used to test the compatibility of cloud servers with different operating systems. Each task to be tested starts at 10:00 AM on July 27, 2022. Task 1 corresponds to cloud server A, and Task 2 corresponds to cloud server B. The code running Task 1 and Task 2 is the same UI automation code, and the operating system version information of cloud server A and cloud server B is identical. If the preset configuration information for Task 1 (for cloud server A) and Task 2 (for cloud server B) is successfully deployed, and the current time reaches the start time, then cloud server A starts running Task 1, and cloud server B starts running Task 2. During the operation of cloud servers A and B, the resource utilization of cloud server A and cloud server B is monitored, resulting in monitoring result information 1 for cloud server A and monitoring result information 2 for cloud server B.
[0068] 103. If the monitoring results indicate that the resource utilization rate of the cloud server is lower than the preset threshold, then according to the task invocation strategy, the tasks running on the cloud servers with resource utilization rates lower than the preset threshold are invoked, and the test result information of each cloud server based on the running of the corresponding task is obtained.
[0069] For example, the preset threshold is a pre-set standard value, and the task invocation strategy refers to the rule information for invoking tasks under different test conditions. For example, the task invocation strategy includes invoking tasks to other cloud servers with resource utilization greater than or equal to the threshold, or invoking tasks to other cloud servers with the same operating system as cloud servers with resource utilization lower than the threshold. The server compares the resource utilization of the cloud servers in the monitoring results with the preset threshold. If it is determined that the resource utilization of the cloud server is lower than the preset threshold, then according to the task invocation strategy, it invokes the tasks running on the cloud servers with resource utilization lower than the preset threshold in real time, and obtains the test result information of each cloud server based on running the corresponding task.
[0070] For example, in the first scenario, since the task is used to test whether the code information is correct, the code information only needs to run on the cloud server, and there is no need to consider the compatibility issues of the cloud server. Therefore, if it is determined that the monitoring results of cloud server A indicate that the resource utilization of cloud server A is lower than the preset threshold, and it is determined that the monitoring results of cloud server B indicate that the resource utilization of cloud server B is higher than the preset threshold, it means that the resource utilization of cloud server A is insufficient to support the completion of the testing process of task 1, or the speed at which cloud server A runs task 1 is slower than the speed at which cloud server B runs task 2. In this case, task 1 running on cloud server A will be called to run on cloud server B, and the monitoring results of cloud server B will be obtained.
[0071] Alternatively, in the second scenario, since the task is used to test the compatibility of cloud servers with different operating systems, the code needs to run on cloud servers with different operating systems. Therefore, if the monitoring results of cloud server A indicate that its resource utilization is lower than a preset threshold, and the monitoring results of cloud server B indicate that its resource utilization is higher than the preset threshold, it means that the resource utilization of cloud server A is insufficient to support the completion of the testing process of task 1. In this case, task 1 running on cloud server A will be transferred to cloud server B for execution, and the monitoring results of cloud server B will be obtained. Alternatively, cloud server A can be continuously monitored until its resource utilization is greater than or equal to the preset threshold, at which point task 1 will run, and the monitoring results of cloud server A will be obtained.
[0072] In this embodiment, test plan information is obtained; the test plan information includes the start time of each task to be tested, the cloud server corresponding to each task, and the task invocation strategy. If it is determined that the preset configuration information for the corresponding task in the cloud server has been successfully deployed, and it is determined that the current time has reached the start time, then each of the multiple cloud servers is controlled to run the task corresponding to that cloud server, and the resource utilization of each cloud server is monitored to obtain the monitoring result information of each cloud server; wherein, the configuration information is used to indicate the information required for the cloud server to run the task. If it is determined that the monitoring result information indicates that the resource utilization of the cloud server is lower than a preset threshold, then according to the task invocation strategy, the task running in the cloud server with the resource utilization lower than the preset threshold is invoked, and the test result information of each cloud server based on running the corresponding task is obtained. In this solution, since each cloud server has preset configuration information corresponding to a specific task, if it is determined that the preset configuration information for the corresponding task on the cloud server has been successfully deployed and the current time has reached the start time in the test plan information, then each of the multiple cloud servers is controlled to run the task corresponding to that cloud server, and the resource utilization of each cloud server is monitored to obtain the monitoring result information for each cloud server. The server compares the resource utilization of the cloud server in the monitoring result information with a preset threshold. If it is determined that the monitoring result information indicates that the resource utilization of the cloud server is lower than the preset threshold, then according to the task invocation strategy, the task running on the cloud server with the resource utilization lower than the preset threshold is invoked to other cloud servers, and the test result information based on running the corresponding task is obtained for each cloud server. Therefore, by invoking and processing tasks in the cloud servers in real time according to the task invocation strategy, server management and deployment, test plan and real-time invocation management for UI automated testing are realized. Compared with the manual task invocation in the prior art, the automated task invocation in this application has greatly improved the testing efficiency and has great market promotion potential in the implementation of UI automated testing, solving the technical problem of low efficiency in task testing.
[0073] Figure 2 A flowchart illustrating another task processing method based on a multi-cloud server provided in this application embodiment is shown below. Figure 2 As shown, the method includes:
[0074] 201. Responding to an input operation, wherein the input operation represents an operation that inputs configuration information for a cloud server, determining the operating system version information of each cloud server; wherein the version information is used to indicate the software and code information required for the cloud server to run tasks.
[0075] In one example, the configuration information includes the cloud server's Internet Protocol address and the address of the distributed version control system where the code information resides.
[0076] For example, the preset configuration information refers to the configuration information pre-entered by the user for executing automated tests. This configuration information includes the cloud server's Internet Protocol Address (IP) and the address in the distributed version control system (Git) where the code information resides (referred to as the Git address). Specifically, the server includes a configuration module, a service identification module, and an adaptation and distribution module. Responding to user input, the user configures the IP address of the cloud server for which the user interface (UI) automated testing will be performed and the Git address of the code information (i.e., the UI automation code) into the server through the configuration module. At this point, the configuration is complete. Finally, the server uses the service identification module to identify the operating system and version information of each cloud server with its IP address and stores the identified information.
[0077] 202. Based on the operating system version information of each cloud server, perform deployment operations on the software and code information of each cloud server and obtain the return result information; the return result information indicates whether the deployment was successful.
[0078] For example, the server automatically distributes and installs the software required for UI automation testing to each cloud server based on the operating system and version information of each IP address. This software includes a browser, browser update scripts, and automation drivers. Simultaneously, it pulls the full UI automation code from the Git repository based on the Git address and distributes it to each cloud server, finally obtaining the returned result information. If the returned result information indicates successful deployment, then the pre-defined configuration information for the corresponding task on the cloud server is considered successfully deployed.
[0079] 203. Obtain test plan information; the test plan information includes the start time of each task to be tested, the cloud server corresponding to each task, and the task invocation strategy.
[0080] For example, this step can be referred to Figure 1 Step 101 in the text will not be repeated here.
[0081] 204. If it is determined that the preset configuration information for the corresponding task in the cloud server has been successfully deployed and the current time has reached the start time, then control each cloud server in the multiple cloud servers to run the task corresponding to each cloud server, and monitor the resource utilization of each cloud server to obtain the monitoring result information of each cloud server; wherein, the configuration information is used to indicate the information required for the cloud server to run the task.
[0082] For example, this step can be referred to Figure 1 Step 102 in the text will not be repeated here.
[0083] 205. If the monitoring results indicate that the resource utilization rate of the cloud server is lower than the preset threshold, then according to the task invocation strategy, the tasks running on the cloud server with the resource utilization rate lower than the preset threshold will be invoked.
[0084] Step 205 includes two implementation methods:
[0085] The first implementation of step 205: If it is determined that the monitoring result information indicates that the resource utilization rate of the cloud server is lower than the preset threshold, then according to the task invocation strategy, the task running in the cloud server with the resource utilization rate lower than the preset threshold is invoked to the cloud server with the resource utilization rate greater than or equal to the preset threshold.
[0086] The second implementation of step 205: If it is determined that the monitoring result information indicates that the resource utilization rate of the cloud server is lower than the preset threshold, then according to the task invocation strategy, the task running in the cloud server with the resource utilization rate lower than the preset threshold is invoked to another cloud server with the same resource utilization rate lower than the preset threshold.
[0087] For example, this step can be referred to Figure 1 Step 103 in the text will not be repeated here.
[0088] 206. The test plan information also includes a report generation strategy; based on the report generation strategy, test result information for each cloud server based on running the corresponding task is generated and integrated.
[0089] For example, the report generation strategy is pre-stored report generation rule information. The server can pull execution result information from each cloud server according to the report generation strategy and integrate the execution result information from each cloud server together, making it convenient for users to view the execution result information of multiple cloud servers. In summary, users can achieve rapid configuration and multi-cloud server operation and report generation functions through simple configuration.
[0090] 207. Generate a prompt message; the prompt message is used to indicate that the cloud server's running result information has been obtained.
[0091] For example, once the operation results information of each cloud server has been obtained, the server can generate a prompt message to promptly remind the user.
[0092] For example, Figure 3 An interactive schematic diagram of a task processing method based on a multi-cloud server provided in this application embodiment is shown below. Figure 3As shown, the server includes: a configuration module, a server identification module, an adaptation and distribution module, a Git repository, a scheduling module, a service status monitoring module, a task invocation module, cloud server A, cloud server B, cloud server C, and a report collection module. The configuration module is used for user-defined configuration information, such as the cloud server's IP address and the Git address of the code. The server identification module identifies the operating system and version information of each cloud server with its IP address. The adaptation and distribution module automatically distributes and installs the software required for UI automation testing to each cloud server and pulls the UI automation code from the Git repository according to the Git address, distributing it fully to each cloud server. The Git repository stores the code information corresponding to the Git address. The scheduling module creates test plan information. The service status monitoring module monitors each cloud server. The task invocation module invokes tasks on the cloud servers. Cloud servers A, B, and C are used to run code information. The report collection module generates the running results information for the cloud servers.
[0093] For example, Figure 4 This application provides an interactive diagram illustrating the logic of a server identification module, as shown in the embodiment. Figure 4 As shown, it includes a user module, a configuration module, a "server identification" module, an "adaptation and distribution" module, and a cloud server. The server identification and distribution logic is as follows:
[0094] 1. Users can enter the cloud server's configuration information and login user information through the configuration module, without needing to worry about the cloud server's operating system type or the browser version within that operating system.
[0095] 2. Configuration module: Stores the configuration information entered by the user for easy selection and permanent use later.
[0096] 3. Server identification module:
[0097] 3.1. Recognize operating systems such as Windows 7, Windows 10, and Windows Server;
[0098] 3.2. Identify installed browsers such as Firefox, Chrome, and web browsers (Internet Explorer, IE);
[0099] 3.3. If no browser is installed, the latest three browser versions will be downloaded and installed automatically;
[0100] 3.4. If already installed, the latest upgrade package will be pushed and the system will automatically upgrade.
[0101] 3.5. Simultaneously distribute UI automation drivers for all browser versions.
[0102] 4. Exception handling:
[0103] 4.1. Cloud server configuration information is abnormal, usually due to the entered information not conforming to the format, prompting the user to handle it;
[0104] 4.2. Server identification error: If the cloud server's IP address, username, password, etc., are incorrect, specific error messages will be provided to prompt the user to check.
[0105] 4.3. Service Delivery Anomalies: In case of errors in the delivery of installation packages or driver media, or in installation or upgrade processes, detailed error logs will be recorded for user analysis, and a retry mechanism will be provided.
[0106] For example, Figure 5 This application provides an example of an interaction diagram illustrating the logic of a planning module. Figure 5 As shown, the server includes: a user module, a plan module, an "adaptation and distribution" module, a Git repository, and a "task invocation" module. The plan entry and processing flow is as follows:
[0107] pass Figure 4 With the server's basic identification logic functionality, users can create UI automation test plans and use these plans to perform actual tests. The specific process is as follows:
[0108] 1. When the user enters relevant plan information:
[0109] 1.1. The cloud server used;
[0110] 1.2. Browser used;
[0111] 1.3. The test suite to be executed for each task;
[0112] 1.4. Task Invocation Strategy:
[0113] a. Execute the entire process;
[0114] b. Execute by polling;
[0115] c. Optimize the allocation of cloud server resources;
[0116] 1.5. Task start time;
[0117] 1.6. Report Generation Strategy:
[0118] a. Merge and collect;
[0119] b. Collect independently;
[0120] 2. Planning Module: Solidifies and saves the information entered by the user, and notifies the task invocation module and the adaptation and distribution module to start the work.
[0121] 3. Adaptation and Deployment Module: Based on the test plan information, determine whether each cloud server meets the requirements and deploy accordingly. Figure 4 The timing is determined and the full test suite is pulled from the git repository to each cloud server;
[0122] 4. Task Invocation Module: Reads user configuration information and performs real-time invocation after the plan starts.
[0123] For example, Figure 6 This application provides an embodiment of an interaction diagram between a task invocation module and a report collection module, as shown in the following example. Figure 6 As shown, the server includes: a "Service Status Monitoring" module, a "Task Invocation" module, a cloud server, a "Report Collection" module, and a "Task Invocation" module. Through... Figure 5 The logic is as follows: after the test plan information is released, the task begins execution, and the task invocation module and service status monitoring module start working.
[0124] 1. Service Status Monitoring Module: Provides real-time feedback on the cloud server's status to the task invocation module.
[0125] 2. Task Invocation Module: Based on the status of the cloud server, if there are bottlenecks in CPU, network, or memory, the number of tasks on the cloud server will be reduced accordingly, while the number of tasks on other cloud servers will be increased accordingly to ensure efficiency.
[0126] 3. Report Collection Module: After the task is completed, the report is sent back to the planning module according to the planned report generation strategy for users to view and download.
[0127] For example, Figure 7 This diagram shows a comparative analysis of the effects of a task processing method based on a multi-cloud server provided in this application embodiment and existing technologies.
[0128] In this embodiment, in response to an input operation, where the input operation represents an operation to input configuration information for a cloud server, the operating system version information of each cloud server is determined; wherein the version information is used to indicate the software and code information required for the cloud server to run tasks. Based on the operating system version information of each cloud server, a deployment operation is performed on the software and code information of each cloud server, and a return result is obtained; wherein the return result indicates whether the deployment was successful. Test plan information is obtained; wherein the test plan information includes the start time of each task to be tested, the cloud server corresponding to each task, and the task invocation strategy. If it is determined that the preset configuration information for the corresponding task in the cloud server has been successfully deployed, and it is determined that the current time has reached the start time, then each of the multiple cloud servers is controlled to run the task corresponding to each cloud server, and the resource utilization of each cloud server is monitored to obtain monitoring result information for each cloud server; wherein the configuration information is used to indicate the information required for the cloud server to run tasks. If it is determined that the monitoring result information indicates that the resource utilization of the cloud server is lower than a preset threshold, then according to the task invocation strategy, the tasks running in the cloud servers with resource utilization lower than the preset threshold are invoked. The test plan information also includes a report generation strategy; based on the report generation strategy, test result information for each cloud server based on running the corresponding task is generated and integrated. A prompt message is generated; this prompt message indicates that the cloud server's running result information has been obtained. Therefore, by calling and processing tasks in the cloud server in real time according to the task invocation strategy, server management and deployment, test plan and real-time invocation management for UI automated testing are realized. Compared with the manual task invocation in existing technologies, the automated task invocation in this application has greatly improved testing efficiency and has significant market potential in UI automated testing implementation, solving the technical problem of low efficiency in task testing. By automating the deployment operation of the cloud server through configuration information, the complex operations and heavy environment configuration faced by testers in preparing and configuring environments with different manufacturers, operating systems, and browser versions when conducting UI automated testing are fundamentally solved, improving the execution efficiency of deployment operations. Furthermore, the flexible report generation strategy provides a convenient way to collect reports, facilitating various user scenarios.
[0129] Figure 8 This application provides a schematic diagram of the structure of a task processing device based on a multi-cloud server, as shown in the embodiments. Figure 8 As shown, the device includes:
[0130] The acquisition unit 31 is used to acquire test plan information; wherein, the test plan information includes the start time of each task to be tested, the cloud server corresponding to each task, and the task invocation strategy.
[0131] The monitoring unit 32 is used to control each of the multiple cloud servers to run the task corresponding to each cloud server if it is determined that the preset configuration information for the corresponding task in the cloud server has been successfully deployed and the current time has reached the start time, and to monitor the resource utilization of each cloud server to obtain the monitoring result information of each cloud server; wherein, the configuration information is used to indicate the information required for the cloud server to run the task.
[0132] Calling unit 33 is used to call tasks running on cloud servers with resource utilization rates below the preset threshold if the monitoring result information indicates that the resource utilization rate of the cloud server is lower than the preset threshold, according to the task calling strategy.
[0133] The first determining unit 34 is used to obtain test result information for each cloud server based on running the corresponding task.
[0134] The apparatus in this embodiment can execute the technical solutions in the above method. Its specific implementation process and technical principles are the same, and will not be repeated here.
[0135] Figure 9 This is a schematic diagram of another task processing device based on a multi-cloud server provided in an embodiment of this application. Figure 8 Based on the illustrated embodiments, as Figure 9 As shown, the device also includes:
[0136] The second determining unit 41 is configured to respond to an input operation, wherein the input operation represents an operation that inputs configuration information for the cloud server, and determine the operating system version information of each cloud server; wherein the version information is used to indicate the software and code information required for the cloud server to run tasks.
[0137] Deployment unit 42 is used to perform deployment operations on the software and code information of each cloud server according to the operating system version information of each cloud server, and obtain the return result information; wherein, the return result information indicates whether the deployment is successful.
[0138] In one example, the configuration information includes the cloud server's Internet Protocol address and the address of the distributed version control system where the code information resides.
[0139] In one example, unit 33 is called, specifically for:
[0140] If the monitoring results indicate that the resource utilization rate of the cloud server is lower than a preset threshold, then according to the task invocation strategy, the tasks running on the cloud servers with resource utilization rates lower than the preset threshold will be invoked to the cloud servers with resource utilization rates greater than or equal to the preset threshold.
[0141] In one example, unit 33 is called, specifically for:
[0142] If the monitoring results indicate that the resource utilization rate of the cloud server is lower than a preset threshold, then according to the task invocation policy, the tasks running on the cloud server with the resource utilization rate lower than the preset threshold will be invoked to other cloud servers of the same type as the cloud server with the resource utilization rate lower than the preset threshold.
[0143] In one example, the test plan information also includes a report generation strategy; the first determining unit 34 is specifically used for:
[0144] Based on the report generation strategy, test result information for each cloud server based on running the corresponding task is generated and integrated.
[0145] In one example, the device also includes:
[0146] The generation unit 43 is used to generate prompt information; wherein the prompt information is used to indicate that the running result information of the cloud server has been obtained.
[0147] The apparatus in this embodiment can execute the technical solutions in the above method. Its specific implementation process and technical principles are the same, and will not be repeated here.
[0148] Figure 10 This application provides a schematic diagram of the structure of a server, as shown in the embodiment of the present application. Figure 10 As shown, the server includes: memory 51 and processor 52.
[0149] The memory 51 stores a computer program that can run on the processor 52.
[0150] The processor 52 is configured to perform the methods provided in the embodiments described above.
[0151] The server also includes a receiver 53 and a transmitter 54. The receiver 53 is used to receive instructions and data sent by external devices, and the transmitter 54 is used to send instructions and data to external devices.
[0152] This application also provides a non-transitory computer-readable storage medium, which, when the instructions in the storage medium are executed by the processor of a server, enables the server to perform the methods provided in the above embodiments.
[0153] This application also provides a computer program product, which includes: a computer program stored in a readable storage medium, at least one processor of the server can read the computer program from the readable storage medium, and the at least one processor executes the computer program to cause the server to perform the solution provided in any of the above embodiments.
[0154] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.
[0155] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.
Claims
1. A multi-cloud server based task processing method, characterized in that, include: Obtain test plan information; wherein, the test plan information includes the start time of each task to be tested, the cloud server corresponding to each task, and the task invocation strategy; the task invocation strategy includes: invoking tasks running on cloud servers with resource utilization rates below a preset threshold to cloud servers with resource utilization rates greater than or equal to the preset threshold; or, invoking tasks running on cloud servers with resource utilization rates below the preset threshold to other cloud servers with the same operating system as the cloud servers with resource utilization rates below the preset threshold. If it is determined that the preset configuration information for the corresponding task in the cloud server has been successfully deployed, and it is determined that the current time has reached the start time, then each of the multiple cloud servers is controlled to run the task corresponding to each cloud server, and the resource utilization of each cloud server is monitored to obtain the monitoring result information of each cloud server; wherein, the configuration information is used to indicate the information required for the cloud server to run the task. If it is determined that the monitoring result information indicates that the resource utilization rate of the cloud server is lower than a preset threshold, then according to the task invocation strategy, the task running in the cloud server with the resource utilization rate lower than the preset threshold is invoked, and the test result information of each cloud server based on the running of the corresponding task is obtained. The method further includes: In response to an input operation, wherein the input operation represents an operation inputting configuration information of the cloud server, the version information of the operating system of each cloud server is determined; wherein the configuration information includes the Internet Protocol address of the cloud server and the address in the distributed version control system where the code information is located, and the version information is used to indicate the software information and code information required for the cloud server to run tasks; Based on the operating system version information of each cloud server, a deployment operation is performed on the software and code information of each cloud server to obtain return result information; wherein, the return result information indicates whether the deployment was successful.
2. The method of claim 1, wherein, If it is determined that the monitoring result information indicates that the resource utilization rate of the cloud server is lower than a preset threshold, then according to the task invocation strategy, the tasks running on the cloud servers with resource utilization rates lower than the preset threshold are invoked, including: If it is determined that the monitoring result information indicates that the resource utilization rate of the cloud server is lower than a preset threshold, then according to the task invocation strategy, the tasks running in the cloud server with the resource utilization rate lower than the preset threshold are invoked to the cloud server with the resource utilization rate greater than or equal to the preset threshold.
3. The method of claim 1, wherein, If it is determined that the monitoring result information indicates that the resource utilization rate of the cloud server is lower than a preset threshold, then according to the task invocation strategy, the tasks running on the cloud servers with resource utilization rates lower than the preset threshold are invoked, including: If it is determined that the monitoring result information indicates that the resource utilization rate of the cloud server is lower than a preset threshold, then according to the task invocation strategy, the task running in the cloud server with the resource utilization rate lower than the preset threshold is invoked to another cloud server of the same type as the cloud server with the resource utilization rate lower than the preset threshold.
4. The method of claim 1, wherein, The test plan information also includes a report generation strategy; Obtain test result information for each cloud server based on the execution of the corresponding task, including: According to the report generation strategy, test result information for each cloud server based on running the corresponding task is generated and integrated.
5. The method according to any one of claims 1 to 4, characterized in that, The method further includes: Generate a prompt message; wherein the prompt message is used to indicate that the running result information of the cloud server has been obtained. 6.A multi-cloud server based task processing apparatus, characterized by, include: An acquisition unit is used to acquire test plan information; wherein, the test plan information includes the start time of each task to be tested, the cloud server corresponding to each task, and the task invocation strategy; the task invocation strategy includes: invoking tasks running on cloud servers with resource utilization rates below a preset threshold to cloud servers with resource utilization rates greater than or equal to the preset threshold; or, invoking tasks running on cloud servers with resource utilization rates below the preset threshold to other cloud servers with the same operating system as the cloud servers with resource utilization rates below the preset threshold. The monitoring unit is configured to, if it is determined that the preset configuration information for the corresponding task in the cloud server has been successfully deployed and the current time has reached the start time, control each of the multiple cloud servers to run the task corresponding to each cloud server, monitor the resource utilization of each cloud server, and obtain monitoring result information for each cloud server; wherein, the configuration information is used to indicate the information required for the cloud server to run the task. The calling unit is used to, if it is determined that the monitoring result information indicates that the resource utilization rate of the cloud server is lower than a preset threshold, then according to the task calling strategy, call the tasks running in the cloud server whose resource utilization rate is lower than the preset threshold. The first determining unit is used to obtain test result information for each cloud server based on running the corresponding task; The device further includes: The second determining unit is configured to respond to an input operation, wherein the input operation represents an operation inputting configuration information of the cloud server, and determine the operating system version information of each cloud server; wherein the version information is used to indicate the software information and code information required for the cloud server to run tasks; the configuration information includes the Internet Protocol address of the cloud server and the address in the distributed version control system where the code information is located; The deployment unit is used to perform deployment operations on the software and code information of each cloud server according to the version information of the operating system of each cloud server, and obtain return result information; wherein, the return result information indicates whether the deployment is successful.
7. The apparatus of claim 6, wherein, The calling unit is specifically used for: If it is determined that the monitoring result information indicates that the resource utilization rate of the cloud server is lower than a preset threshold, then according to the task invocation strategy, the tasks running in the cloud server with the resource utilization rate lower than the preset threshold are invoked to the cloud server with the resource utilization rate greater than or equal to the preset threshold.
8. The apparatus according to claim 6, characterized in that, The calling unit is specifically used for: If it is determined that the monitoring result information indicates that the resource utilization rate of the cloud server is lower than a preset threshold, then according to the task invocation strategy, the task running in the cloud server with the resource utilization rate lower than the preset threshold is invoked to another cloud server of the same type as the cloud server with the resource utilization rate lower than the preset threshold.
9. The apparatus according to claim 6, characterized in that, The test plan information also includes a report generation strategy; the first determining unit is specifically used for: According to the report generation strategy, test result information for each cloud server based on running the corresponding task is generated and integrated.
10. The apparatus according to any one of claims 6-9, characterized in that, The device further includes: A generation unit is used to generate prompt information; wherein the prompt information is used to indicate that the running result information of the cloud server has been obtained.
11. A server, characterized in that, The method includes a memory and a processor, wherein the memory stores a computer program that can run on the processor, and the processor executes the computer program to implement the method of any one of claims 1-5.
12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1-5.
13. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method of any one of claims 1-5.
Citation Information
Patent Citations
Method for testing distributed type Web based on cloud computing environment
CN103581247A
Cloud testing environment scheduling method and system based on load forecast
CN103916438A