Task testing method, computer device, and storage medium

Through automated testing environment allocation and step-by-step testing, the problem of low execution efficiency of test tasks in the existing technology is solved, efficient testing tasks are achieved, and cost and time consumption are reduced.

WO2025001190A1PCT designated stage expired Publication Date: 2025-01-02ZTE CORP
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/077775
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-06-28
Filing Date
2024-02-20
Publication Date
2025-01-02

AI Technical Summary

Technical Problem

In the prior art, testing tasks need to be manually executed before the release of the system and software version, which makes the testing process time-consuming and labor-intensive, especially when the number of test tasks is large, the testing tasks are less efficient.

Method used

Provide a task testing method, by obtaining test task information, generating a test task set, and when detecting the test environment release, the test task to be executed is assigned to the test environment, and performing step-by-step testing in the test environment based on the task step-by-step testing information. , realize automated test task execution.

Benefits of technology

Through automated testing environment allocation and step-by-step testing, the efficiency of testing task execution is significantly improved, testing time and labor costs are reduced, and testing quality and resource utilization are optimized.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024077775_02012025_PF_FP_ABST
    Figure CN2024077775_02012025_PF_FP_ABST
Patent Text Reader

Abstract

Embodiments of the present application relate to the technical field of computers, and provide a task testing method, a computer device, and a storage medium. The method comprises: acquiring test task information, and generating a test task set, wherein the test task set comprises at least one test task (S101); when detecting test environment release, allocating the test environment to the current test task to be executed in the test task set (S102); and on the basis of task step-testing information corresponding to said current test task, performing step-testing on said current test task in the test environment to obtain an execution result of said current test task (S103).
Need to check novelty before this filing date? Find Prior Art

Description

Task testing method, computer equipment and storage medium

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application is based on the Chinese patent application with application number 202310790070.0 and application date of June 28, 2023, and claims the priority of the Chinese patent application. The entire content of the Chinese patent application is hereby introduced into this application as a reference. Technical Field

[0003] The present application relates to the field of computer technology, and in particular to a task testing method, computer equipment, and storage medium. Background Art

[0004] Nowadays, various systems and software require testing before each version is released. Only after successful testing can the software be released to ensure normal use after release. Currently, when executing various testing tasks, such as system upgrade testing tasks, testing operations are generally performed manually. The testing process is time-consuming and labor-intensive, and especially when the number of test tasks is large, the test execution efficiency is very low.

[0005] Therefore, how to improve the efficiency of test task execution has become an urgent problem to be solved.

[0006] Summary of the Invention

[0007] Embodiments of the present application provide a task testing method, a computer device, and a storage medium.

[0008] In the first aspect, an embodiment of the present application provides a task testing method, which includes: obtaining test task information and generating a test task set, wherein the test task set includes at least one test task; when it is detected that the test environment is released, allocating the test environment to the current test task to be executed in the test task set; based on the task step-by-step test information corresponding to the current test task, performing step-by-step testing on the current test task in the test environment to obtain the execution result of the current test task.

[0009] In a second aspect, an embodiment of the present application provides a computer device, comprising: a processor, a memory, a computer program stored in the memory and executable by the processor, and a data bus for realizing connection and communication between the processor and the memory, wherein when the computer program is executed by the processor, the steps of the task testing method as described above are implemented.

[0010] In a third aspect, an embodiment of the present application provides a storage medium for computer-readable storage, wherein the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the task testing method as described above. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0012] FIG1 is a schematic diagram of a process flow of a task testing method provided in an embodiment of the present application;

[0013] FIG2 is a schematic diagram of the software architecture of a task testing system provided in an embodiment of the present application;

[0014] FIG3 is a schematic diagram of a process for generating a test task set according to an embodiment of the present application;

[0015] FIG4 is a flow chart of a test task set scheduling process provided by an embodiment of the present application;

[0016] FIG5 is a schematic diagram of a test task execution process provided by an embodiment of the present application;

[0017] FIG6 is a schematic diagram of a process for calling a test knowledge base to perform fault handling according to an embodiment of the present application;

[0018] FIG7 is a flow chart of another task testing method provided in an embodiment of the present application;

[0019] FIG8 is a schematic diagram of a process for generating a test report according to an embodiment of the present application;

[0020] FIG9 is a schematic block diagram of the structure of a task testing device provided in an embodiment of the present application;

[0021] FIG10 is a schematic block diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0022] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0023] The flowcharts shown in the accompanying drawings are for illustrative purposes only and do not necessarily include all contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may be decomposed, combined, or partially merged, so the actual execution order may vary depending on the actual situation.

[0024] It should be understood that the terms used in this specification are only for the purpose of describing specific embodiments and are not intended to limit the present application. As used in this specification and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms unless the context clearly indicates otherwise.

[0025] Currently, various systems and software require testing before each version is released. Only after successful testing can the software be released to ensure normal use after release. Currently, when executing various testing tasks, such as system upgrade testing tasks, testing operations are generally performed manually. This testing process is time-consuming and labor-intensive, and especially when the number of test tasks is large, the test execution efficiency is very low.

[0026] In order to solve the above problems, the embodiments of the present application provide a task testing method, a computer device and a storage medium, which aim to improve the efficiency of test task execution.

[0027] The following embodiments of the present application are described in detail with reference to the accompanying drawings. In the absence of conflict, the following embodiments and features therein may be combined with each other.

[0028] Please refer to Figure 1, which is a flowchart of a task testing method provided in an embodiment of the present application.

[0029] As shown in FIG1 , the task testing method includes steps S101 to S103 .

[0030] S101: Acquire test task information and generate a test task set, wherein the test task set includes at least one test task.

[0031] Before introducing the task testing method, we first describe the software architecture of the task testing system that applies the task testing method. In some embodiments, as shown in Figure 2, the task testing system includes an online orchestration interface, an execution system, and a test environment. The online orchestration interface includes but is not limited to a Web-UI (User Interface), and the test environment includes but is not limited to a test tool library.

[0032] The online orchestration interface provides some operation portals for user interaction. After the user operates on the interface, the relevant interfaces of the execution system will be called to implement specific functions such as task planning and data echo during the test task execution. The interface operation process includes:

[0033] To register a test environment, click Register Test Environment and fill in the test environment information in the pop-up box. The test environment information includes but is not limited to the supported scale, database type, node type, supported platform type, etc. After filling in the test environment information, click OK to complete the test environment registration. The test environment will then be available for execution system scheduling.

[0034] Minimize the implementation and definition of task-by-step test operations. For example, taking the system upgrade test task as an example, the minimized task-by-step test operations include new version downloading, pre-upgrade preparation, pre-upgrade check, and upgrade operations. For example, "1" represents the new version downloading operation, "2" represents the pre-upgrade preparation operation, "3" represents the pre-upgrade check operation, and "4" represents the upgrade operation.

[0035] To create a task set, click the Create Task Set button, then click Add Task, set the old and new versions, and select the required actions from the pre-defined list of minimized task step-by-step test actions. Combine these actions to create a test task. Repeat these steps until all test tasks are created. The test task set is complete.

[0036] The test task set is triggered by clicking the execute button, and the execution system starts to automatically schedule the test environment to execute the test task set.

[0037] Progress review and recovery: After executing a test task set, users can view the test task set execution progress on the interface. If the execution fails and is interrupted, if the fault can be automatically repaired, the user will not be affected. If the fault requires manual repair and is successful, the user can click Resume execution on the interface to continue subsequent operations. Otherwise, the test task execution will fail. Users can also click the History button to view the execution status of previously executed test task sets on the History interface.

[0038] The execution system mainly includes task planning module, scheduling execution module, test knowledge base, data collection module and report sending module. The task planning module is used to implement the planning of test environment and test task execution; the scheduling execution module is used to execute batch test tasks by calling test tools in the test tool library; the test knowledge base is used to handle exceptions during the execution process; the data collection module is used to collect data during the execution process; the report sending module is used to generate and send test reports, etc.

[0039] The test tool library contains all the abstracted scripts required for test operations. When the test task is executed, the test task execution module will schedule the corresponding script according to the configuration file to automate the entire test process. After the test task is completed, the script will report the data during the execution process.

[0040] Based on the above system, functions such as test task set arrangement, test task set scheduling, test task execution, exception handling based on test knowledge base, test report generation and sending can be realized.

[0041] In this embodiment, before executing a test task, test task information corresponding to at least one test task is first obtained to generate a test task set, which includes at least one test task. The test task information includes but is not limited to test version information, test scenario information, and the like.

[0042] In some embodiments, obtaining test task information and generating a test task set includes:

[0043] Obtaining the test version information;

[0044] If the test version information does not exist in the system database, storing the test version information in the system database;

[0045] Obtaining test scenario information corresponding to the test tasks in the test task set;

[0046] Verifying the test scenario information;

[0047] If the verification passes, determining whether the test scenario information exists in the system database;

[0048] If not, the test scenario information is stored in the system database, and the test scenario information corresponding to the next test task is obtained, and the step of verifying the test scenario information is returned to execute;

[0049] The test task set is generated according to the test scenario information corresponding to each of the test tasks.

[0050] In some embodiments, as shown in FIG3 , the process of generating a test task set is as follows:

[0051] S201. Acquire test version information input by a user, wherein the test version information includes but is not limited to version name, version acquisition path, etc. In some embodiments, each test version uses the version name as a unique key value.

[0052] S202: Determine whether the test version information exists in the system database; if so, execute step S203; if not, execute step S204.

[0053] S203: Modify the test version. Modify the test version in the system database according to the test version information input by the user.

[0054] S204: Add a new test version and store the test version information input by the user into the system database.

[0055] S205. Acquire test scenario information input by the user. The test scenario information includes but is not limited to scenario name, old version name, old version parameters, task step-by-step test information, hardware type, database type, network networking, and other information. Each test scenario uses the scenario name as a unique key value.

[0056] S206. Verify the test scenario information, extract the test scenario environment information such as hardware type, database type, network networking, etc. in the test scenario information. If the existing test environment meets the requirements of the test scenario environment information, the verification passes success and executes step S207; otherwise, if the existing test environment does not meet the requirements of the test scenario environment information, the verification fails and re-executes step S205 to obtain the test scenario information.

[0057] S207. Determine whether the test scenario information already exists in the system database; if so, execute step S208; otherwise, if not, execute step S209.

[0058] S208: Modify the test scenario: modify the test scenario information in the system database according to the test scenario information input by the user.

[0059] S209: Add a new test scenario and store the test scenario information input by the user into the system database.

[0060] S210, continue to add test scenarios to determine whether to continue adding test scenarios; if yes, execute step S205 to obtain the next test scenario information input by the user; otherwise, execute step S211.

[0061] S211 , generating a test task set. According to the acquired at least one test scenario information, a test task set is generated, and the test task set arrangement is completed. The test task set contains one or more test tasks.

[0062] By generating a test task set for batch testing, the test tasks to be executed, the test operations to be performed for each test task, and the required test environment are determined. This not only reduces the cost of familiarizing users with the test environment and execution process, but also improves the efficiency of creating test tasks.

[0063] S102: When it is detected that the test environment is released, the test environment is allocated to the current test task to be executed in the test task set.

[0064] When scheduling a test task set, the system waits for a test environment to be released. When a new test environment is detected, the system determines whether the test environment meets the requirements of the test scenario environment information, that is, whether the test environment matches the current test task in the test task set. If not, the system continues to wait for the test environment to be released. If so, the system assigns the test environment to the current test task.

[0065] In some embodiments, as shown in FIG4 , the process of scheduling a test task set is as follows:

[0066] S301: Acquire test task set information input by a user, or acquire test task set information from the step of generating a test task set. The test task set includes one or more test tasks.

[0067] S302, test environment judgment, extract the test scenario environment information such as hardware type, database type, network networking, etc. in the test task, and judge whether there is an available idle test environment that matches the test scenario environment information. If so, execute step S305; otherwise, execute step S303.

[0068] S303: Wait for the test environment to be released.

[0069] S304: Determine whether the test environment is released. When it is detected that a new test environment is released, execute step S302 to determine the test environment; otherwise, repeat step S303 to wait for the test environment to be released.

[0070] S305 , allocating a test environment, allocating the matched test environment to the current test task, and writing the allocated test environment information into the test task.

[0071] S306: Output a test task set, where the test task set includes information about the allocated test environment.

[0072] Through intelligent scheduling and allocation of test environment resources, we avoid waste, save on test environment resource overhead, reduce testing costs and time, and improve test environment resource utilization, thereby improving overall testing efficiency. Furthermore, during the test environment allocation process, we consider factors such as hardware type, database type, and network configuration to ensure the accuracy and reliability of the allocated test environment, thereby optimizing test quality.

[0073] S103 : Based on the task step-by-step test information corresponding to the current test task, perform step-by-step testing on the current test task in the test environment to obtain an execution result of the current test task.

[0074] In some embodiments, task step-by-step test information included in the test scenario information is extracted based on the test scenario information corresponding to the current test task. For example, taking the current test task as a system upgrade test task, the task step-by-step test information obtained includes test steps "1" and "3," where step "1" represents a new version download operation and step "3" represents a pre-upgrade check operation.

[0075] According to the obtained task step-by-step test information corresponding to the current test task, the current test task is tested step by step in the assigned test environment, rather than executing each step of the test task from beginning to end. Therefore, the test time is further reduced and the test efficiency is improved.

[0076] In some embodiments, performing step-by-step testing on the current test task in the test environment based on the task step-by-step testing information corresponding to the current test task includes:

[0077] Acquire multiple test operations corresponding to the current test task and the execution order of the multiple test operations contained in the task step-by-step test information;

[0078] According to the execution order, each of the test operations is executed in sequence in the test environment to implement step-by-step testing of the current test task.

[0079] For example, taking the current test task as a system upgrade test task, the obtained task step-by-step test information includes test steps "1," "3," and "4." Step "1" represents the new version download operation, step "3" represents the pre-upgrade check operation, and step "4" represents the upgrade operation. The test operations corresponding to the current test task include the new version download operation, the pre-upgrade check operation, and the upgrade operation. The execution order of these three test operations is to execute step "1" first, then step "3," and finally step "4."

[0080] In the assigned test environment, first perform the test operation corresponding to step "1", that is, the new version download operation. After the test operation is completed, perform the test operation corresponding to step "3", that is, the pre-upgrade check operation. Finally, perform the test operation corresponding to step "4", that is, the upgrade operation.

[0081] In some embodiments, performing each of the test operations in sequence in the test environment includes:

[0082] Execute the current test operation in the test environment;

[0083] If the current test operation is successfully executed, the next test operation is determined as the new current test operation according to the execution order, and the step of executing the current test operation in the test environment is returned to execution until each test operation completes the step-by-step test in the test environment;

[0084] If the current test operation fails to execute, the preconfigured test knowledge base is called to perform fault handling. After the fault handling is successful, the next test operation is determined as the new current test operation according to the execution order, and the steps of executing the current test operation in the test environment are returned to execute until each of the test operations completes step-by-step testing in the test environment.

[0085] The test knowledge base is used to process failure information after test task execution fails. The test knowledge base contains a large amount of failure information and corresponding recovery processing information (such as solutions). For example, the test knowledge base records historical test task execution failure information, error codes, test environment, hardware configuration, software version, and other information.

[0086] When the related test operations of a test task fail to execute, a matching query is performed based on the information in the test knowledge base to determine whether the fault has occurred before and find the corresponding solution to the fault. For example, it is determined whether the fault can be automatically recovered or requires manual recovery, and the fault is handled based on the solution.

[0087] In some embodiments, as shown in FIG5 , the process of executing the test task is as follows:

[0088] S401. Determine the current test task, the current test task input by the user, or obtain the test scenario information from the test task set scheduling step. The test scenario information includes the scenario name, the name of the old version before the upgrade, the parameters of the old version before the upgrade, the task step-by-step test information, the hardware type, the database type, the network networking, the allocated test environment information, etc.

[0089] S402 , test operation execution, obtaining task step-by-step test information and allocated test environment information from the test scenario information, parsing a single test operation, and executing the corresponding single test operation in the allocated test environment.

[0090] S403: Determine whether the test operation is successfully executed. If the test operation is successfully executed, execute step S406; otherwise, execute step S404.

[0091] S404: Call the test knowledge base, input the test operation execution failure information, call the test knowledge base, and perform fault processing.

[0092] S405 , determining whether the calling of the test knowledge base is successful. If the calling of the test knowledge base is successful, executing step S406 ; otherwise, executing step S407 .

[0093] S406, execute the next test operation judgment, obtain the task step-by-step test information from the test scenario information, and judge whether the next test operation is empty. If it is empty, execute S407; otherwise, execute S402 to perform the next test operation.

[0094] S407: Release the test environment, releasing the test environment occupied by the current test task.

[0095] S408: Output the test task execution result, output the execution result of the current test task, and upload it to the system database synchronously.

[0096] Test operations corresponding to test tasks can be combined as needed, facilitating customized test execution processes. If an exception occurs during test execution, the test knowledge base can be used for automatic recovery, or manual recovery can be performed using the solutions provided by the test knowledge base before continuing the test operation. The test knowledge base reduces fault location costs, while automatic recovery reduces test environment latency and manual operations, thereby improving test environment utilization and testing efficiency.

[0097] In some embodiments, if the current test operation fails, calling a preconfigured test knowledge base to perform fault processing includes:

[0098] If the current test operation fails, submit failure information;

[0099] If the fault corresponding to the fault information is recorded in the test knowledge base, recovery processing is performed on the fault based on the recovery processing information corresponding to the fault recorded in the test knowledge base.

[0100] When the relevant test operations of a test task fail, the fault information is submitted to the fault system for tracking. The fault information includes but is not limited to the fault name, fault description, fault occurrence time, test version, test environment, etc. The information in the test knowledge base is queried. If the test knowledge base records the fault corresponding to the fault information, the fault is recovered based on the corresponding recovery processing information (such as the solution) recorded in the test knowledge base. For example, automatic recovery or manual recovery is performed, thereby improving test efficiency and accuracy.

[0101] In some embodiments, if the current test operation fails, after submitting the failure information, the method further includes:

[0102] If the fault corresponding to the fault information is not recorded in the test knowledge base, the fault information is recorded in the test knowledge base and the test knowledge base is updated.

[0103] Query the information in the test knowledge base. If the test knowledge base does not record the fault corresponding to the fault information, add the fault information to the test knowledge base and record the corresponding recovery processing information, such as the solution to the fault, and update the test knowledge base.

[0104] In some embodiments, the performing recovery processing on the fault based on the recovery processing information corresponding to the fault recorded in the test knowledge base includes:

[0105] Based on the recovery processing information, determining whether the fault can be automatically recovered;

[0106] If so, automatically recover the fault;

[0107] If not, a manual recovery prompt message is output, so that the user can manually recover the fault based on the prompt message.

[0108] In some embodiments, as shown in FIG6 , the process of calling the test knowledge base to handle a fault is as follows:

[0109] S501: Input test operation execution failure information, or obtain test operation execution failure information from the test task execution step.

[0110] S502: Determine whether the fault has been recorded in the test knowledge base. If so, execute step S505; otherwise, execute step S503.

[0111] S503: submitting fault information. Submitting fault information to the fault system for tracking. The fault information includes but is not limited to fault name, fault description, fault occurrence time, test version, test environment, and other information.

[0112] S504, test knowledge base update: if the fault is not recorded in the test knowledge base, the fault information is added to the test knowledge base, and the processing based on the test knowledge base is unsuccessful.

[0113] S505: Fault automatic recovery judgment: judge whether the fault can be automatically recovered. If yes, execute step S506; otherwise, execute step S507.

[0114] S506, automatic recovery processing, calling the business execution code to recover the fault. After the execution is completed, step S509 data and log collection is performed. The processing result based on the test knowledge base is based on the automatic recovery execution result.

[0115] S507 , judging whether the fault can be manually recovered, if yes, executing step S508 ; otherwise, executing step S510 .

[0116] S508: User manual processing, waiting for user intervention to handle the fault. After the user intervention processing is completed, step S509 is executed to collect data and logs. The processing result based on the test knowledge base is based on the processing result submitted by the user.

[0117] S509: Data and log collection: collecting relevant execution data and execution logs during the automatic recovery process / user manual process.

[0118] S510: Output the processing result based on the test knowledge base.

[0119] When a test fails, the test knowledge base can be used to determine whether the failure has occurred before and identify possible solutions, thereby improving test efficiency and accuracy. A combination of automatic and manual recovery strategies can better handle various failure scenarios that arise during test execution, thereby improving test efficiency and overall test quality.

[0120] In some embodiments, as shown in FIG. 7 , step S103 may be followed by step S104 .

[0121] S104: Generate a test report according to the execution result of each test task in the test task set.

[0122] By executing each test task in the test task set in the above manner, the execution result of each test task is obtained, and a corresponding test report is generated based on the execution result of each test task. In some embodiments, the test report includes information such as the execution result of each test task and a timestamp.

[0123] After generating a test report, you can output the test report, for example, by sending the test report to relevant testers.

[0124] In some embodiments, as shown in FIG8 , the process of generating a test report is as follows:

[0125] S601: Input the execution result of the test task set, or obtain the execution result of the test task set from the test task execution step, wherein the execution result of the test task set includes the execution results of one or more test tasks.

[0126] S602: Generate a test report, summarize the execution results of the test task set, and generate a test report.

[0127] S603: Send the test report to the testers related to this test task set.

[0128] By generating and automatically pushing test reports, the time for summarizing test results is reduced, time and labor costs are saved, and efficient notification of the corresponding person in charge of the test is achieved, thereby facilitating timely response processing.

[0129] In the above embodiment, a test task set is generated by obtaining test task information, wherein the test task set includes at least one test task. When the release of the test environment is detected, a test environment is allocated to the current test task to be executed in the test task set. Based on the task step-by-step test information corresponding to the current test task, the current test task is step-by-step tested in the allocated test environment to obtain the execution result of the current test task. By automatically allocating the test environment to schedule task execution, the time consumed in manually matching the test environment is reduced. Furthermore, by performing step-by-step testing on the test task, there is no need to execute each step of the test task from beginning to end, which reduces the test task execution time and thus improves the test task execution efficiency.

[0130] An embodiment of the present application further provides a task testing device. Please refer to FIG9 , which is a schematic block diagram of the task testing device provided in an embodiment of the present application.

[0131] As shown in FIG9 , the task testing device 1000 includes a generating module 1001 , an allocating module 1002 , and a testing module 1003 .

[0132] A generating module 1001 is configured to obtain test task information and generate a test task set, wherein the test task set includes at least one test task;

[0133] An allocating module 1002 is configured to allocate the test environment to the current test task to be executed in the test task set when a test environment release is detected;

[0134] The testing module 1003 is configured to perform a step-by-step test on the current test task in the test environment based on the task step-by-step test information corresponding to the current test task, and obtain an execution result of the current test task.

[0135] In some embodiments, the testing module 1003 is further configured to:

[0136] Acquire multiple test operations corresponding to the current test task and the execution order of the multiple test operations contained in the task step-by-step test information;

[0137] According to the execution order, each of the test operations is executed in sequence in the test environment to implement step-by-step testing of the current test task.

[0138] In some embodiments, the testing module 1003 is further configured to:

[0139] Execute the current test operation in the test environment;

[0140] If the current test operation is successfully executed, the next test operation is determined as the new current test operation according to the execution order, and the step of executing the current test operation in the test environment is returned to execution until each test operation completes the step-by-step test in the test environment;

[0141] If the current test operation fails to execute, the preconfigured test knowledge base is called to perform fault handling. After the fault handling is successful, the next test operation is determined as the new current test operation according to the execution order, and the steps of executing the current test operation in the test environment are returned to execute until each of the test operations completes step-by-step testing in the test environment.

[0142] In some embodiments, the testing module 1003 is further configured to:

[0143] If the current test operation fails, submit failure information;

[0144] If the fault corresponding to the fault information is recorded in the test knowledge base, recovery processing is performed on the fault based on the recovery processing information corresponding to the fault recorded in the test knowledge base.

[0145] In some embodiments, the testing module 1003 is further configured to:

[0146] Based on the recovery processing information, determining whether the fault can be automatically recovered;

[0147] If so, automatically recover the fault;

[0148] If not, a manual recovery prompt message is output, so that the user can manually recover the fault based on the prompt message.

[0149] In some embodiments, the task testing device 1000 further includes:

[0150] A recording module is configured to record the fault information in the test knowledge base and update the test knowledge base if the fault corresponding to the fault information is not recorded in the test knowledge base.

[0151] In some embodiments, the generating module 1001 is further configured to:

[0152] Obtaining the test version information;

[0153] If the test version information does not exist in the system database, storing the test version information in the system database;

[0154] Obtaining test scenario information corresponding to the test tasks in the test task set;

[0155] Verifying the test scenario information;

[0156] If the verification passes, determining whether the test scenario information exists in the system database;

[0157] If not, the test scenario information is stored in the system database, and the test scenario information corresponding to the next test task is obtained, and the step of verifying the test scenario information is returned to execute;

[0158] The test task set is generated according to the test scenario information corresponding to each of the test tasks.

[0159] In some embodiments, the task testing device 1000 further includes:

[0160] The reporting module is used to generate a test report according to the execution result of each test task in the test task set.

[0161] Among them, each module in the above-mentioned task testing device 1000 corresponds to each step in the above-mentioned task testing method embodiment, and its functions and implementation processes will not be described here one by one.

[0162] An embodiment of the present application further provides a computer device. Please refer to FIG10 , which is a schematic block diagram of a computer device provided in an embodiment of the present application.

[0163] As shown in FIG10 , the computer device 200 may include a processor 210 and a memory 220 , wherein the processor 210 and the memory 220 are connected via a bus, such as an I2C (Inter-integrated Circuit) bus.

[0164] In some embodiments, the processor 210 may be a micro-controller unit (MCU), a central processing unit (CPU), or a digital signal processor (DSP).

[0165] In some embodiments, the memory 220 may be a Flash chip, a read-only memory (ROM) disk, an optical disk, a USB flash drive, or a mobile hard disk, etc. The memory 220 stores various computer programs for execution by the processor 210 .

[0166] The processor 210 is configured to run a computer program stored in the memory and implement the following steps when executing the computer program:

[0167] Acquire test task information and generate a test task set, wherein the test task set includes at least one test task;

[0168] When it is detected that the test environment is released, allocating the test environment to the current test task to be executed in the test task set;

[0169] Based on the task step-by-step test information corresponding to the current test task, the current test task is tested step-by-step in the test environment to obtain an execution result of the current test task.

[0170] In some embodiments, when implementing the step-by-step testing of the current test task in the test environment based on the task step-by-step testing information corresponding to the current test task, the processor 210 is configured to implement:

[0171] Acquire multiple test operations corresponding to the current test task and the execution order of the multiple test operations contained in the task step-by-step test information;

[0172] According to the execution order, each of the test operations is executed in sequence in the test environment to implement step-by-step testing of the current test task.

[0173] In some embodiments, when implementing the sequential execution of the test operations in the test environment, the processor 210 is configured to implement:

[0174] Execute the current test operation in the test environment;

[0175] If the current test operation is successfully executed, the next test operation is determined as the new current test operation according to the execution order, and the step of executing the current test operation in the test environment is returned to execution until each test operation completes the step-by-step test in the test environment;

[0176] If the current test operation fails to execute, the preconfigured test knowledge base is called to perform fault handling. After the fault handling is successful, the next test operation is determined as the new current test operation according to the execution order, and the steps of executing the current test operation in the test environment are returned to execute until each of the test operations completes step-by-step testing in the test environment.

[0177] In some embodiments, when implementing the step of calling a preconfigured test knowledge base for fault handling if the current test operation fails, the processor 210 is configured to implement:

[0178] If the current test operation fails, submit failure information;

[0179] If the fault corresponding to the fault information is recorded in the test knowledge base, recovery processing is performed on the fault based on the recovery processing information corresponding to the fault recorded in the test knowledge base.

[0180] In some embodiments, when performing the recovery process for the fault based on the fault corresponding recovery process information recorded in the test knowledge base, the processor 210 is configured to implement:

[0181] Based on the recovery processing information, determining whether the fault can be automatically recovered;

[0182] If so, automatically recover the fault;

[0183] If not, a manual recovery prompt message is output, so that the user can manually recover the fault based on the prompt message.

[0184] In some embodiments, after implementing the step of submitting the failure information if the current test operation fails, the processor 210 is configured to implement:

[0185] If the fault corresponding to the fault information is not recorded in the test knowledge base, the fault information is recorded in the test knowledge base and the test knowledge base is updated.

[0186] In some embodiments, when the test task information includes test version information and test scenario information, the processor 210 acquires the test task information, and generates a test task set, it is configured to implement:

[0187] Obtaining the test version information;

[0188] If the test version information does not exist in the system database, storing the test version information in the system database;

[0189] Obtaining test scenario information corresponding to the test tasks in the test task set;

[0190] Verifying the test scenario information;

[0191] If the verification passes, determining whether the test scenario information exists in the system database;

[0192] If not, the test scenario information is stored in the system database, and the test scenario information corresponding to the next test task is obtained, and the step of verifying the test scenario information is returned to execute;

[0193] The test task set is generated according to the test scenario information corresponding to each of the test tasks.

[0194] In some embodiments, after performing step-by-step testing on the current test task in the test environment according to the task step-by-step testing information and obtaining the execution result of the current test task, the processor 210 is configured to:

[0195] A test report is generated according to the execution result of each test task in the test task set.

[0196] An embodiment of the present application also provides a storage medium for computer-readable storage, wherein the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of any task testing method provided in the description of the embodiment of the present application.

[0197] The storage medium may be an internal storage unit of the computer device described in the aforementioned embodiment, such as a hard disk or memory of the computer device. The storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the computer device.

[0198] The embodiment of the present application provides a task testing method, computer equipment and storage medium. By acquiring test task information, a test task set is generated. The test task set includes at least one test task. When the test environment is detected to be released, a test environment is allocated to the current test task to be executed in the test task set. Based on the task step-by-step test information corresponding to the current test task, the current test task is tested step by step in the allocated test environment to obtain the execution result of the current test task. By automatically allocating the test environment to schedule task execution, a large amount of time spent on manually matching the test environment is reduced. Moreover, by performing step-by-step testing on the test task, there is no need to execute each step of the test task from beginning to end, which reduces the test task execution time and thus improves the test task execution efficiency.

[0199] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In a hardware embodiment, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As is well known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable, and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, it is well known to those skilled in the art that communication media generally embodies computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.

[0200] It should be understood that the term "and / or" used in this specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, including these combinations. It should be noted that, in this article, the terms "include", "comprise" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system that includes a series of elements includes not only those elements, but also includes other elements that are not explicitly listed, or also includes elements that are inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "including a..." does not exclude the presence of other identical elements in the process, method, article or system that includes the element.

[0201] The serial numbers of the embodiments of the present application are for descriptive purposes only and do not represent the merits of the embodiments. The above are only some embodiments of the present application, but the scope of protection of the present application is not limited thereto. Any person skilled in the art can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application shall be based on the scope of protection of the claims.

Claims

1. A task testing method, the method comprising: Acquire test task information and generate a test task set, wherein the test task set includes at least one test task; When it is detected that the test environment is released, the test environment is allocated to the current test task to be executed in the test task set; Based on the task step-by-step test information corresponding to the current test task, the current test task is tested step-by-step in the test environment to obtain an execution result of the current test task.

2. The method according to claim 1, wherein: The step-by-step testing of the current test task in the test environment based on the task step-by-step testing information corresponding to the current test task includes: Acquire multiple test operations corresponding to the current test task contained in the task step-by-step test information, and the execution order of the multiple test operations; According to the execution order, each of the test operations is executed in sequence in the test environment to implement step-by-step testing of the current test task.

3. The method according to claim 2, wherein: The performing of each of the test operations in sequence in the test environment includes: Execute the current test operation in the test environment; If the current test operation is successfully executed, the next test operation is determined as a new current test operation according to the execution order, and the step of executing the current test operation in the test environment is returned to be executed until each of the test operations completes the step-by-step test in the test environment; If the current test operation fails to execute, the preconfigured test knowledge base is called to perform fault handling. After the fault handling is successful, the next test operation is determined as the new current test operation according to the execution order, and the steps of executing the current test operation in the test environment are returned until each of the test operations completes the step-by-step testing in the test environment.

4. The method according to claim 3, wherein: If the current test operation fails, calling a preconfigured test knowledge base to handle the failure includes: If the current test operation fails, submitting failure information; If the fault corresponding to the fault information is recorded in the test knowledge base, recovery processing is performed on the fault based on the recovery processing information corresponding to the fault recorded in the test knowledge base.

5. The method according to claim 4, wherein: The performing recovery processing on the fault based on the recovery processing information corresponding to the fault recorded in the test knowledge base includes: Based on the recovery processing information, determining whether the fault can be automatically recovered; If yes, automatically recover the fault; If not, a manual recovery prompt message is outputted, so that the user can manually recover the fault based on the prompt message.

6. The method according to claim 4, wherein: If the current test operation fails, after submitting the fault information, the method further includes: If the fault corresponding to the fault information is not recorded in the test knowledge base, the fault information is recorded in the test knowledge base and the test knowledge base is updated.

7. The method according to claim 1, wherein: The test task information includes test version information and test scenario information. The acquiring of the test task information and generating a test task set include: Obtaining the test version information; If the test version information does not exist in the system database, storing the test version information in the system database; Obtaining test scenario information corresponding to the test tasks in the test task set; Verifying the test scenario information; If the verification passes, determining whether the test scenario information exists in the system database; If not, the test scenario information is stored in the system database, and the test scenario information corresponding to the next test task is obtained, and the step of verifying the test scenario information is returned to be executed; The test task set is generated according to the test scenario information corresponding to each of the test tasks.

8. The method according to any one of claims 1 to 7, wherein: After performing step-by-step testing on the current test task in the test environment according to the task step-by-step testing information and obtaining the execution result of the current test task, the method includes: A test report is generated according to the execution result of each test task in the test task set.

9. A computer device, comprising: A processor, a memory, a computer program stored in the memory and executable by the processor, and a data bus for realizing connection and communication between the processor and the memory, wherein when the computer program is executed by the processor, the steps of the task testing method as described in any one of claims 1 to 8 are realized.

10. A storage medium for computer-readable storage, wherein the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the task testing method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Call center GUI test method and system and computer readable storage medium

    CN108132886A

  • Software automatic testing method and system and computer readable storage medium

    CN108197022A

  • Enterprise-level information system automatic function testing method and enterprise-level information system automatic function testing system

    CN108845940A

  • Automatic test environment intelligent matching method based on cloud computing

    CN109634855A

  • Operating system testing method and device, equipment and readable storage medium

    CN111949546A