Automatic testing method and system and computer cluster

By introducing test execution nodes, data statistics nodes and result display nodes into the cloud platform, the execution information and statistical information of test cases are processed and displayed in real time, which solves the problems of low test task analysis efficiency and insufficient information in the existing technology, and achieves More efficient test task analysis and information display.

CN118672890APending Publication Date: 2024-09-20HUAWEI CLOUD COMPUTING TECHNOLOGIES CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310727764.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2023-03-15
Filing Date
2023-06-19
Publication Date
2024-09-20

AI Technical Summary

Technical Problem

With existing automated testing technology, after the test task is executed, testers can only wait for the entire task to be completed before analyzing the results, resulting in low analysis efficiency and insufficient execution result data to meet complex business needs.

Method used

Introduce test execution nodes, data statistics nodes and result display nodes into the cloud platform. After each test execution node completes a test case, it sends the execution file and information to the data statistics node and result display node. The data statistics node calculates and sends statistics. Information, the result display node sends the information to the user terminal to achieve real-time analysis and rich test information display.

Benefits of technology

It improves the efficiency of test task analysis, provides richer test information, meets the business analysis needs of testers, and reduces the waiting time for test tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118672890A
    Figure CN118672890A
Patent Text Reader

Abstract

The embodiment of the invention provides an automatic testing method and system and computer equipment, is applied to a cloud platform, and comprises the steps that after a test execution node executes one test case in a test task every time, an execution file and execution information corresponding to the test case are obtained, the execution file comprises a script file and a script log file, and the script log file comprises the script file and the script log file; the execution information comprises an execution result corresponding to the test case. And the test execution node sends the execution file to the result display node and sends the execution information to the data statistics node. And the data statistical node calculates statistical information corresponding to the test task according to the received execution information, and sends the execution information and the statistical information to a result display node. And the result display node sends the execution file and the execution information corresponding to the received test case and the statistical information corresponding to the test task to a user side for display. By adopting the method and the device, the service analysis requirements of testers can be met, and the efficiency of analyzing the test tasks by the testers is improved.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application claims priority to Chinese patent application No. 202310251069.0, filed on March 15, 2023, and entitled “Method and device for executing test tasks”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of cloud computing technology, and in particular to an automated testing method, system and computer cluster. Background Art

[0003] Automated testing is a commonly used testing technology. Its main process includes: testers create test tasks, each of which includes a set of test cases. The test scheduling node can assign the test cases in the test tasks to different test execution nodes for execution. After the test execution node completes the execution of the test cases, it can send the test results to the test scheduling node.

[0004] After all the test cases in the test task are completed, the test scheduling node can send the test results corresponding to each test case in the test task to the user end. The tester can further analyze the test task according to the execution results displayed on the user end.

[0005] As testing business becomes increasingly complex, the execution results corresponding to the test tasks alone can no longer meet the business analysis needs of testers. Summary of the invention

[0006] The embodiments of the present application provide an automated testing method, system, and computer cluster, which can meet the business analysis needs of testers and improve the efficiency of testers in analyzing test tasks. The corresponding technical solutions are as follows:

[0007] In a first aspect, an automated testing method is provided, which can be applied to a cloud platform, wherein the cloud platform includes a test execution node, a data statistics node, and a result display node, and the method includes:

[0008] After the test execution node executes a test case in the test task, it obtains the execution file and execution information corresponding to the test case, wherein the execution file includes a script file and a script log file, and the execution information includes the execution result corresponding to the test case. Then the test execution node sends the execution file to the result display node and sends the execution information to the data statistics node. The data statistics node calculates the statistical information corresponding to the test task based on the received execution information, and sends the execution information and statistical information to the result display node, and the statistical information includes the execution progress corresponding to the test task. The result display node sends the received execution file, execution information and statistical information corresponding to the test task corresponding to the test case to the user end for display.

[0009] In the scheme shown in the present application, each time the test execution node executes a test case, the execution file corresponding to the test case is sent to the result display node, and the execution information corresponding to the test case is sent to the data statistics node. The data statistics node can calculate the statistical information of the test task corresponding to the test case according to the execution information, and send the execution information of the test case and the statistical information of the test task to the result display node. Then the result display node can send the execution file, execution information and statistical information to the user end for display. In this way, on the one hand, the tester can analyze the test case after each test case is executed, without waiting for the execution of the entire test task to be completed, which can improve the efficiency of the tester's analysis of the test task. On the other hand, the scheme shown in the present application can provide the tester with richer test information, including the execution file of the test case, the execution information and the statistical information of the test task, so that the richer test information can meet the business analysis needs of the tester.

[0010] In one achievable manner, the cloud platform also includes a test scheduling node, each test case executed by the test execution node is assigned by the test scheduling node, and the execution information also includes the execution status corresponding to the test case. The above method also includes: the test scheduling node sends the execution information corresponding to at least one test case in the test task to the data statistics node at a specified time interval, and the execution status corresponding to at least one test case includes not executed or executed.

[0011] In the scheme shown in the present application, the test scheduling node can be used to manage the test execution nodes in the cloud platform, can receive test tasks, and assign the test cases in the test tasks to the test execution nodes. Each time the test execution node executes a test case, it can also send the corresponding execution information to the test scheduling node. Due to the limited number of test execution nodes, or the large number of test cases in the test task, the test scheduling node may not be able to assign all test cases to the test execution node. For test cases that are not assigned to the test execution node, the test scheduling node can generate the execution information corresponding to the test case of this type at a specified time interval. The execution status in the execution information is not executed. At the same time, the test scheduling node can send the execution information of the received test case and the generated execution information of the test case that is not assigned to the test execution node to the data statistics node at a specified time interval. In this way, on the one hand, the data statistics node can calculate the statistical information of the test task based on the execution information of more test cases, and on the other hand, the test scheduling node repeatedly sends the execution information of the test case that has been executed to the data statistics node, which can avoid the problem of the test execution node failing to send the execution information to the data statistics node and causing the loss of execution information.

[0012] In one achievable manner, the data statistics node performs deduplication processing on the execution information sent by the test execution node and the test scheduling node to obtain the deduplication processed execution information. The data statistics node calculates the statistical information corresponding to the test task based on the received execution information, including: the data statistics node calculates the statistical information corresponding to the test task based on the deduplication processed execution information.

[0013] In the solution shown in the present application, the data statistics node may repeatedly receive the execution information of the test execution node and the test scheduling node for the completed test cases. Therefore, the data statistics node can deduplicate the received execution information. Then, based on the deduplicated execution information, the statistical information corresponding to the test task is calculated, so that the accuracy of the calculated statistical information can be improved.

[0014] In one feasible manner, the execution information also includes the execution rounds corresponding to the test case, and the data statistics node deduplicates the execution information sent by the test execution node and the test scheduling node, including: the data statistics node deduplicates the execution information sent by the test execution node and the test scheduling node that corresponds to the same test case and has the same execution rounds.

[0015] In the scheme shown in the present application, the test case in the test task can be set to execute times, that is, the number of times the test case needs to be executed at the test execution node. The execution information of the test case may include the current execution times of the test case, that is, the execution round. The data statistics node can deduplicate according to the execution round in the execution information, that is, the execution information of the same test case and the same execution round can be deduplicated to improve the accuracy of the calculated statistical information.

[0016] In an achievable manner, the statistical information also includes the average execution time of multiple test cases in the test task and the average execution times of multiple test cases in the test task. The execution file may also include an environment configuration file of the test execution node, and the like.

[0017] In a second aspect, an automated testing system is provided. The automated testing system is configured on a cloud platform and includes a test execution node, a data statistics node, and a result display node, wherein:

[0018] The test execution node is used to obtain the execution file and execution information corresponding to the test case after executing a test case in the test task, wherein the execution file includes a script file and a script log file, and the execution information includes the execution result corresponding to the test case;

[0019] The test execution node is used to send the execution file to the result display node and the execution information to the data statistics node;

[0020] The data statistics node is used to calculate the statistical information corresponding to the test task according to the received execution information, and send the execution information and statistical information to the result display node, where the statistical information includes the execution progress corresponding to the test task;

[0021] The result display node is used to send the execution file, execution information and statistical information corresponding to the received test case to the user end for display.

[0022] In an achievable manner, the automated testing system further includes a test scheduling node, each test case executed by the test execution node is assigned by the test scheduling node, and the execution information further includes an execution status corresponding to the test case;

[0023] The test scheduling node is used to send execution information corresponding to at least one test case in the test task to the data statistics node at a specified time interval, and the execution status corresponding to at least one test case includes not executed or executed.

[0024] In one achievable manner, the data statistics node is also used to deduplicate the execution information sent by the test execution node and the test scheduling node to obtain the deduplicated execution information, and calculate the statistical information corresponding to the test task based on the deduplicated execution information.

[0025] In one achievable manner, the execution information also includes the execution round corresponding to the test case, and the data statistics node is further used to deduplicate the execution information corresponding to the same test case and having the same execution round sent by the test execution node and the test scheduling node.

[0026] In an achievable manner, the statistical information also includes the average execution time of multiple test cases in the test task and the average execution times of multiple test cases in the test task. The execution file may also include an environment configuration file of the test execution node, and the like.

[0027] In a third aspect, a computing device cluster is provided, comprising at least one computing device, each computing device comprising a processor and a memory, the processor of the at least one computing device being used to execute instructions stored in the memory of the at least one computing device, so that the computing device cluster executes the method provided in the first aspect above.

[0028] In a fourth aspect, a computer program product comprising instructions is provided, wherein when the instructions are executed by a computing device cluster, the computing device cluster executes the method provided in the first aspect above.

[0029] In a fifth aspect, a computer-readable storage medium is provided, comprising computer program instructions. When the computer program instructions are executed by a computing device cluster, the computing device cluster executes the method as described in the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 It is a schematic diagram of a framework for performing automated testing provided in an embodiment of the present application;

[0031] Figure 2 The present application provides a flowchart of an automated testing method;

[0032] Figure 3 The present application provides a flowchart of an automated testing method;

[0033] Figure 4 This is a schematic diagram of a display interface of a user terminal provided in an embodiment of the present application;

[0034] Figure 5 This is a schematic diagram of a display interface of a user terminal provided in an embodiment of the present application;

[0035] Figure 6 It is a structural schematic diagram of an automated testing system provided in an embodiment of the present application;

[0036] Figure 7 It is a schematic diagram of a computer device structure provided in an embodiment of the present application;

[0037] Figure 8 This is a schematic diagram of a computer device cluster structure provided in an embodiment of the present application;

[0038] Fig. 9 It is a schematic diagram of a computer device cluster structure provided in an embodiment of the present application. DETAILED DESCRIPTION

[0039] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.

[0040] Automated Test is the mainstream testing method in the Information and Communication Technologies (ICT) industry. Its main process includes: testers create test tasks, each of which includes a set of test cases. The test scheduling node can assign the test cases in the test task to different test execution nodes for execution. After the test execution node completes the execution of the test case, the test result can be sent to the test scheduling node. Among them, the test task can be a test task for the cloud platform, and the test cases included in the test task can be test items for the server in the cloud platform, such as stress testing, bandwidth testing, CPU testing, memory testing, etc. of the server, or testing the services provided by the cloud platform, such as testing of account login services, order payment services, etc. In addition, the test task can also be a test task for an embedded system.

[0041] In one example, the test cases in the test task are assigned to the test execution node, which can be a test scheduling node that sends the test script corresponding to the test case to the test execution node, and the test execution node completes the execution of the test case by executing the test script. Wherein, the test script can be written by a tester. After completing the execution of the test case, the test execution node can send the execution result to the test scheduling node. Wherein, the test execution result can include whether the test case is successfully executed, and can also include whether the project tested by the test case passes the test. After the test cases in the test task are all executed by the test scheduling node, the execution result corresponding to each test case in the test task can be sent to the user end, and the tester can analyze according to the execution result of each test case. In particular, for test cases that fail to execute, the tester needs to analyze the reasons for the failure of the corresponding test case to execute, and then the test case or the project tested by the test case can be optimized and adjusted.

[0042] Currently, there are the following key issues in the processing of execution results in automated testing:

[0043] Automated test execution is driven by test tasks, but the execution progress of different test cases in a test task is different. Some test cases only take a few hours to execute, or even shorter. Some test cases may take several days or even longer to execute. Currently, testers can only collect all test case execution results after the entire test task is completed, and then analyze them, which results in low efficiency in analyzing test tasks.

[0044] As testing services become increasingly complex, simple test execution result data such as success or failure and execution time can no longer meet the business needs of testers. Testers need more test information to meet the business needs of testing. Currently, testers need to manually collect and count the test information they need to complete the analysis of test tasks, such as retrieving the execution log of each test execution node, which further leads to low analysis efficiency of test tasks.

[0045] The present application provides an automated testing method, which can be applied to a cloud platform and can be executed and implemented by the cloud platform. Figure 1 This is a schematic diagram of a framework for performing automated testing provided by an embodiment of the present application, see Figure 1, the cloud platform may include at least a test execution node, a data statistics node, and a result display node. The automated testing method provided by the present application enables testers to view the test information corresponding to each test case after executing a test case at the test execution node. In addition to basic information such as the test case execution result and execution time, the test information also includes the corresponding execution file, the statistical information of the test task, etc., which can meet the business needs of testers and improve the efficiency of testers in analyzing test tasks. Figure 2 This is a schematic diagram of an automated testing method provided by an embodiment of the present application. Figure 1 and Figure 2 The following is an introduction to the method for performing automated testing provided by this application:

[0046] Step 101: After executing a test case in a test task, the test execution node obtains the execution file and execution information corresponding to the test case.

[0047] Among them, the test case executed by the test execution node can be assigned to the test execution node by the test scheduling node, or the tester can upload the script file corresponding to the test script of the test case to the test execution node. For example, the tester can upload the test script of the test case to the test execution node by calling the automation interface.

[0048] For each test execution node in the cloud platform, after the test execution node executes a test case, the execution file and execution information corresponding to the test case can be obtained. The execution file may include the script file for executing the test case and the script log file for recording the execution of the script file. In addition, the execution file may also include the configuration file of the test execution node, such as the environment configuration file. The execution information may include the execution result, execution time, execution round, etc. corresponding to the test case.

[0049] Step 102: The test execution node sends the execution file to the result display node and sends the execution information to the data statistics node.

[0050] After obtaining the execution file and execution information corresponding to the test case, the test execution node can send the execution file of the test case to the result display node and send the execution information to the data statistics node. The result display node is used to send the test information of the received test case to the user end and provide it to the tester for analysis. The data statistics node can perform statistical calculations on the execution information of the received test case to obtain the statistical information of the test task to which the test case belongs, so as to provide it to the test user for analysis.

[0051] Step 103: The data statistics node calculates statistical information corresponding to the test task according to the received execution information, and sends the execution information and statistical information to the result display node, where the statistical information includes the execution progress corresponding to the test task.

[0052] The execution information may carry the use case identifier of the test case, the task identifier of the test task to which the test case belongs, and the like. In one example, the data statistics node may determine the test task to which the execution information belongs based on the identifier of the test task carried in the execution information. The data statistics node may determine the execution information with the same task identifier in the received execution information as the execution information corresponding to the test case in the same test task. Then, the statistical information of the corresponding task may be calculated based on the determined execution information corresponding to the test case in the same test task. Among them, the statistical information may include the execution progress of the test task, the current execution success rate of the test task, the average execution time of the test cases in the test task, and the like.

[0053] In an achievable manner, the test scheduling node may also send execution information corresponding to at least one test case in the test task to the data statistics node at a specified time interval, and the execution status corresponding to at least one test case includes not executed or executed.

[0054] In implementation, due to the limited number of test execution nodes, or the large number of test cases in the test task, the test scheduling node may not be able to assign all test cases to the test execution node after receiving the test task. In an embodiment of the present application, for test cases that are not assigned to test execution nodes, the test scheduling node can generate execution information corresponding to this type of test case. Among them, the execution status in this type of execution information is not executed. In addition, after each test execution node executes a test case, in addition to sending the corresponding execution information to the result display node, the corresponding execution information can also be sent to the test scheduling node. In this way, the execution information corresponding to the test case that has been executed can be included in the scheduling node, as well as the execution information corresponding to the test case that has not been executed.

[0055] The test scheduling node can send the execution information of the received test cases and the generated execution information of the test cases that are not assigned to the test execution nodes to the data statistics node at the specified time interval. In this way, on the one hand, the data statistics node can calculate the statistical information of the test task based on the execution information of more test cases, and on the other hand, the test scheduling node repeatedly sends the execution information of the completed test cases to the data statistics node, which can avoid the problem of the test execution node failing to send the execution information to the data statistics node, resulting in the loss of execution information.

[0056] Correspondingly, the data statistics node performs deduplication processing on the execution information sent by the test execution node and the test scheduling node to obtain the deduplication-processed execution information. The data statistics node calculates the statistical information corresponding to the test task based on the deduplication-processed execution information.

[0057] In implementation, the data statistics node may repeatedly receive execution information of the test execution node and the test scheduling node for the completed test cases. Therefore, the data statistics node can deduplicate the received execution information. Then, based on the deduplicated execution information, the statistical information corresponding to the test task is calculated, which can improve the accuracy of the calculated statistical information.

[0058] Among them, the data statistics node deduplicates the execution information corresponding to the same test case and having the same execution round sent by the test execution node and the test scheduling node. In an embodiment of the present application, the test case in the test task can be set with an execution count, that is, the number of times the test case needs to be executed at the test execution node. The execution information of the test case may include the current number of executions of the test case, that is, the execution round. The data statistics node can deduplicate according to the execution round in the execution information, that is, the execution information with the same test case identifier and the same execution round can be deduplicated to improve the accuracy of calculating statistical information.

[0059] Step 104: The result display node sends the received execution file corresponding to the test case, execution information, and statistical information corresponding to the test task to the user end for display.

[0060] The result display node can send the execution file, execution information and statistical information to the user end for display. In this way, on the one hand, the tester can analyze the test case after each test case is executed, without waiting for the execution of the entire test task to be completed, which can improve the efficiency of the test task analysis. On the other hand, the scheme shown in the present application can provide the tester with richer test information, including the execution file of the test case, execution information and statistical information of the test task, so that the richer test information can meet the business analysis needs of the tester.

[0061] Figure 3 is a schematic diagram of a framework for performing automated testing provided in an embodiment of the present application, such as Figure 3As shown, the result display node provides a test execution result integrated display service, and the process of the test execution machine (test execution node) sending an execution file to the test execution result integrated display service may include: the test execution machine sends the unstructured execution result data (including but not limited to: test script log, test suite log, test script, test suite script) to the unstructured execution result data processing node, and after receiving the unstructured execution result data, the unstructured execution result data processing node may store the unstructured execution result data in the form of a file in a file storage system, such as the file storage system may be an object storage service (OBS). When the file (i.e., execution file) stored in the file storage system is updated, the test execution result integrated display service may obtain the updated execution file from the file storage system.

[0062] See also Figure 3 , the data statistics node can run an execution result data synchronization and statistics service, and the process of the test execution machine sending the execution information corresponding to the test case to the execution result data synchronization and statistics service can include: the test execution machine sends the structured execution result data (i.e., execution information, including but not limited to: execution result, execution round, form, execution time) to the structured execution result data processing node, and the structured execution result data processing node can send the structured execution result data to the distributed message node after receiving the structured execution result data. The distributed message node provides a distributed message service, and can provide message subscription capabilities for the execution result data synchronization and statistics service. The execution result data synchronization and statistics service subscribes to the structured execution result message from the distributed message service, and the new structured execution result data will be pushed to the execution result data synchronization and statistics service in real time in the form of a structured execution result message after arriving at the distributed message service. In addition, the process of the test scheduling node sending the execution result data synchronization and statistics service to send the execution information corresponding to the test case to the execution result data synchronization and statistics service is similar to the process of the test execution machine sending the execution information corresponding to the test case to the execution result data synchronization and statistics service, and will not be repeated here.

[0063] Continue to see Figure 3The execution result data synchronization and statistics service includes an execution instance information processing thread pool, a statistical deduplication queue, and a statistical information processing thread pool. The execution instance information processing thread pool is responsible for processing structured execution result messages, extracting the original execution instance information (i.e., the execution information corresponding to each test case), sending it to the statistical deduplication queue, and writing it to the document database. The statistical deduplication queue deduplicates the original execution instance information in units of test execution instances, and sends the deduplicated execution instance information to the statistical information processing thread pool. The statistical information processing thread pool performs statistical calculations and writes the execution statistics to a document database, such as a digital data storage (DDS). When the execution statistics information and execution instance information stored in the document database are updated, the test execution result integrated display service can obtain the updated execution statistics information and execution instance information from the document database.

[0064] After obtaining updated execution statistics and execution instance information, or updated execution files, the test execution result integrated display service can send the obtained execution statistics, execution instance information, and execution files to the user end for display. Alternatively, the tester can operate the user end to send a test information acquisition notification to the test execution result integrated display service. After receiving the test information acquisition notification sent by the user end, the test execution result integrated display service can send the currently updated execution statistics, execution instance information, and execution files to the user end for display.

[0065] In an achievable manner, the statistical deduplication queue may perform deduplication on the original execution instance information in units of test execution instances as follows:

[0066] Statistical deduplication queue, after receiving the first execution information, if there is execution information in the execution information queue that belongs to the same test case and corresponds to the same execution instance as the received first execution information, then delete the received first execution information; if there is no execution information in the execution information queue that belongs to the same test case and corresponds to the same execution instance as the received first execution information, then add the received first execution information to the execution information queue. After receiving the second execution information, if there is execution information in the execution information queue that belongs to the same test case and corresponds to the same execution instance as the received second execution information, then delete the received second execution information; if there is no execution information in the execution information queue that belongs to the same test case and corresponds to the same execution instance as the received second execution information, then add the received second execution information to the execution information queue. Wherein, the first execution information and the second execution information can be execution information corresponding to any test case.

[0067] Figure 4 and Figure 5is a schematic diagram of a display interface of a user terminal provided in an embodiment of the present application. Figure 4 As shown, the display interface of the user end can display script files, script log files, test suite scripts, test suite logs, etc. Figure 5 As shown, the display interface on the user side can show the execution progress, execution success rate, etc. of each task.

[0068] The present application also provides an automated testing system, which is configured on a cloud platform. Figure 6 As shown, the automated testing system includes a test execution node 610, a data statistics node 620, and a result display node 630, wherein:

[0069] The test execution node 610 is used to obtain the execution file and execution information corresponding to the test case after executing a test case in the test task, wherein the execution file includes a script file and a script log file, and the execution information includes the execution result corresponding to the test case.

[0070] The test execution node 610 is used to send the execution file to the result display node and send the execution information to the data statistics node.

[0071] The data statistics node 620 is used to calculate the statistical information corresponding to the test task according to the received execution information, and send the execution information and the statistical information to the result display node, where the statistical information includes the execution progress corresponding to the test task;

[0072] The result display node 630 is used to send the execution file corresponding to the received test case, the execution information and the statistical information corresponding to the test task to the user end for display.

[0073] In an achievable manner, the automated testing system further includes a test scheduling node 640, each test case executed by the test execution node is assigned by the test scheduling node 640, and the execution information further includes an execution status corresponding to the test case;

[0074] The test scheduling node 640 is used to send execution information corresponding to at least one test case in the test task to the data statistics node at a specified time interval, and the execution status corresponding to at least one test case includes not executed or executed.

[0075] In one achievable manner, the data statistics node 630 is also used to deduplicate the execution information sent by the test execution node and the test scheduling node to obtain the deduplicated execution information, and calculate the statistical information corresponding to the test task based on the deduplicated execution information.

[0076] In one achievable manner, the execution information also includes the execution round corresponding to the test case, and the data statistics node 630 is further used to deduplicate the execution information corresponding to the same test case and having the same execution round sent by the test execution node and the test scheduling node.

[0077] In an achievable manner, the statistical information also includes the average execution time of multiple test cases in the test task and the average execution times of multiple test cases in the test task. The execution file may also include an environment configuration file of the test execution node, and the like.

[0078] The test execution node 610, the data statistics node 620, the result display node 630, and the test scheduling node 640 can all be implemented by software, or can be implemented by hardware. Exemplarily, the implementation of the test execution node 610 is introduced below. Similarly, the implementation of the data statistics node 620, the result display node 630, and the test scheduling node 640 can refer to the implementation of the test execution node 610.

[0079] As an example of a software functional unit, the test execution node 610 may include code running on a computing instance. The computing instance may be at least one of a physical host (computing device), a virtual machine, a container, and other computing devices. Furthermore, the computing device may be one or more. For example, the test execution node 610 may include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers used to run the application may be distributed in the same region or in different regions. The multiple hosts / virtual machines / containers used to run the code may be distributed in the same AZ or in different AZs, each AZ including a data center or multiple data centers with similar geographical locations. Typically, a region may include multiple AZs.

[0080] Similarly, multiple hosts / virtual machines / containers used to run the code can be distributed in the same VPC or in multiple VPCs. Usually, a VPC is set up in a region. For cross-region communication between two VPCs in the same region and between VPCs in different regions, a communication gateway must be set up in each VPC to achieve interconnection between VPCs through the communication gateway.

[0081] As an example of a hardware functional unit, the test execution node 610 may include at least one computing device, such as a server, etc. Alternatively, the test execution node 610 may also be a device implemented using ASIC or PLD, etc. The PLD may be implemented using CPLD, FPGA, GAL or any combination thereof.

[0082] The multiple computing devices included in the test execution node 610 can be distributed in the same region or in different regions. The multiple computing devices included in the test execution node 610 can be distributed in the same AZ or in different AZs. Similarly, the multiple computing devices included in the test execution node 610 can be distributed in the same VPC or in multiple VPCs. The multiple computing devices can be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, and GALs.

[0083] The present application also provides a computing device 100. Figure 7 As shown, the computing device 100 includes: a bus 102, a processor 104, a memory 106, and a communication interface 108. The processor 104, the memory 106, and the communication interface 108 communicate with each other through the bus 102. The computing device 100 can be a server or a terminal device. It should be understood that the present application does not limit the number of processors and memories in the computing device 100.

[0084] The bus 102 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 7 The bus 102 is represented by only one line, but it does not mean that there is only one bus or one type of bus. The bus 102 may include a path for transmitting information between various components of the computing device 100 (eg, the memory 106, the processor 104, and the communication interface 108).

[0085] The processor 104 may include any one or more of a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).

[0086] The memory 106 may include a volatile memory, such as a random access memory (RAM). The memory 106 may also include a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD), or a solid state drive (SSD).

[0087] The memory 106 stores executable codes, and the processor 104 executes the executable codes to respectively implement the functions of the aforementioned test execution node 610, data statistics node 620, result display node 630, and test scheduling node 640, thereby implementing the automated testing method. That is, the memory 106 stores instructions for executing the automated testing method.

[0088] The communication interface 108 uses a transceiver module such as, but not limited to, a network interface card or a transceiver to implement communication between the computing device 100 and other devices or a communication network.

[0089] The embodiment of the present application also provides a computing device cluster. The computing device cluster includes at least one computing device. The computing device can be a server, such as a central server, an edge server, or a local server in a local data center. In some embodiments, the computing device can also be a terminal device such as a desktop computer, a laptop computer, or a smart phone.

[0090] like Figure 8 As shown, the computing device cluster includes at least one computing device 100. The memory 106 in one or more computing devices 100 in the computing device cluster may store the same instructions for executing the automated testing method.

[0091] In some possible implementations, the memory 106 of one or more computing devices 100 in the computing device cluster may also store partial instructions for executing the automated testing method. In other words, the combination of one or more computing devices 100 may jointly execute instructions for executing the automated testing method.

[0092] It should be noted that the memory 106 in different computing devices 100 in the computing device cluster may store different instructions, which are respectively used to execute partial functions of the automated testing method.

[0093] In some possible implementations, the memory 106 of one or more computing devices 100 in the computing device cluster may also store partial instructions for executing the automated testing method. In other words, the combination of one or more computing devices 100 may jointly execute instructions for executing the automated testing method.

[0094] It should be noted that the memory 106 in different computing devices 100 in the computing device cluster can store different instructions for executing part of the functions of the automated test system. That is, the instructions stored in the memory 106 in different computing devices 100 can implement the functions of one or more of the test execution node 610, the data statistics node 620, the result display node 630, and the test scheduling node 640.

[0095] In some possible implementations, one or more computing devices in the computing device cluster may be connected via a network, which may be a wide area network or a local area network. Fig. 9 A possible implementation is shown. Fig. 9 As shown, two computing devices 100A and 100B are connected via a network. Specifically, the network is connected via a communication interface in each computing device. In this type of possible implementation, the memory 106 in the computing device 100A stores instructions for executing the functions of the test execution node 610. At the same time, the memory 106 in the computing device 100B stores instructions for executing the functions of the data statistics node 620, the result display node 630, and the test scheduling node 640. It should be understood that Fig. 9 The functions of the computing device 100A shown in FIG. 1 may also be completed by multiple computing devices 100. Similarly, the functions of the computing device 100B may also be completed by multiple computing devices 100.

[0096] The present application embodiment also provides another computing device cluster. The connection relationship between the computing devices in the computing device cluster can be similar to that of Figure 8 and Fig. 9 The connection mode of the computing device cluster is different in that the memory 106 in one or more computing devices 100 in the computing device cluster may store the same instructions for executing the automated testing method.

[0097] In some possible implementations, the memory 106 of one or more computing devices 100 in the computing device cluster may also store partial instructions for executing the automated testing method. In other words, the combination of one or more computing devices 100 may jointly execute instructions for executing the automated testing method.

[0098] It should be noted that the memory 106 in different computing devices 100 in the computing device cluster can store different instructions for executing part of the functions of the automated test system. That is, the instructions stored in the memory 106 in different computing devices 100 can implement the functions of one or more of the test execution node 610, the data statistics node 620, the result display node 630, and the test scheduling node 640.

[0099] The embodiment of the present application also provides a computer program product including instructions. The computer program product may be software or a program product including instructions that can be run on a computing device or stored in any available medium. When the computer program product is run on at least one computing device, the at least one computing device executes an automated testing method or an automated testing method.

[0100] The embodiment of the present application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that can be stored by a computing device or a data storage device such as a data center containing one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk). The computer-readable storage medium includes instructions that instruct a computing device to execute an automated testing method, or instructs a computing device to execute an automated testing method.

[0101] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the protection scope of the technical solutions of the embodiments of the present invention.

Claims

1. An automated testing method, characterized in that: The method is applied to a cloud platform, the cloud platform includes a test execution node, a data statistics node and a result display node, and the method includes: After the test execution node completes executing a test case in the test task, it obtains the execution file and execution information corresponding to the test case, wherein the execution file includes a script file and a script log file, and the execution information includes the execution result corresponding to the test case; The test execution node sends the execution file to the result display node, and sends the execution information to the data statistics node; The data statistics node calculates statistical information corresponding to the test task according to the received execution information, and sends the execution information and the statistical information to the result display node, wherein the statistical information includes the execution progress corresponding to the test task; The result display node sends the received execution file and execution information corresponding to the test case and the statistical information corresponding to the test task to the user end for display.

2. The method according to claim 1, characterized in that The cloud platform also includes a test scheduling node, each test case executed by the test execution node is assigned by the test scheduling node, the execution information also includes an execution status corresponding to the test case, and the method further includes: The test scheduling node sends execution information corresponding to at least one test case in the test task to the data statistics node at a specified time interval, and the execution status corresponding to the at least one test case includes not executed or executed.

3. The method according to claim 2, characterized in that The method further comprises: The data statistics node performs deduplication processing on the execution information sent by the test execution node and the test scheduling node to obtain the deduplication-processed execution information; The data statistics node calculates the statistical information corresponding to the test task according to the received execution information, including: The data statistics node calculates the statistical information corresponding to the test task according to the execution information after deduplication processing.

4. The method according to claim 3, characterized in that The execution information also includes the execution round corresponding to the test case, and the data statistics node performs deduplication processing on the execution information sent by the test execution node and the test scheduling node, including: The data statistics node deduplicates the execution information corresponding to the same test case and having the same execution round sent by the test execution node and the test scheduling node.

5. The method according to claims 1 to 4, characterized in that The statistical information also includes an average execution time of multiple test cases in the test task and an average execution times of multiple test cases in the test task.

6. An automated testing system, characterized in that: The system is configured on a cloud platform and includes a test execution node, a data statistics node, and a result display node, wherein: The test execution node is used to obtain the execution file and execution information corresponding to a test case after executing a test case in the test task, wherein the execution file includes a script file and a script log file, and the execution information includes the execution result corresponding to the test case; The test execution node is used to send the execution file to the result display node and send the execution information to the data statistics node; The data statistics node is used to calculate the statistical information corresponding to the test task according to the received execution information, and send the execution information and the statistical information to the result display node, wherein the statistical information includes the execution progress corresponding to the test task; The result display node is used to send the received execution file and execution information corresponding to the test case and the statistical information corresponding to the test task to the user end for display.

7. The system according to claim 6, characterized in that The system further comprises a test scheduling node, each test case executed by the test execution node is assigned by the test scheduling node, and the execution information further comprises an execution status corresponding to the test case; The test scheduling node is used to send execution information corresponding to at least one test case in the test task to the data statistics node at a specified time interval, and the execution status corresponding to the at least one test case includes not executed or executed.

8. The system according to claim 7, characterized in that The data statistics node is also used to perform deduplication processing on the execution information sent by the test execution node and the test scheduling node to obtain the deduplication-processed execution information, and calculate the statistical information corresponding to the test task based on the deduplication-processed execution information.

9. The system according to claim 8, characterized in that The execution information also includes an execution round corresponding to the test case, and the data statistics node is further used to deduplicate the execution information corresponding to the same test case and having the same execution round sent by the test execution node and the test scheduling node.

10. The system according to claims 6 to 9, characterized in that The statistical information also includes an average execution time of multiple test cases in the test task and an average execution times of multiple test cases in the test task.

11. A computing device cluster, characterized in that: comprising at least one computing device, each computing device comprising a processor and a memory; The processor of the at least one computing device is configured to execute instructions stored in the memory of the at least one computing device, so that the computing device cluster executes the method according to any one of claims 1 to 5.

12. A computer program product comprising instructions, characterized in that When the instructions are executed by a computing device cluster, the computing device cluster executes the method according to any one of claims 1 to 5.

13. A computer-readable storage medium, characterized in that: The method comprises computer program instructions. When the computer program instructions are executed by a computing device cluster, the computing device cluster performs the method according to any one of claims 1 to 5.