Task testing method, computer equipment and storage medium

By automatically allocating the test environment and step-by-step testing, the problem of inefficient testing in the existing technology is solved, and efficient testing task execution is achieved, saving time and resources.

CN119292907APending Publication Date: 2025-01-10ZTE CORP
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202310790070.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-06-28
Publication Date
2025-01-10

AI Technical Summary

Technical Problem

In the prior art, testing tasks need to be performed manually before the release of the system and software version, resulting in inefficient testing, especially when the number of test tasks is large, which is time-consuming and labor-consuming.

Method used

By obtaining test task information, generating a test task set, and automatically allocating the test environment when the test environment is released, step-by-step testing is performed in the assigned test environment based on the task step-by-step testing information, reducing manual matching and execution from beginning to end step.

Benefits of technology

Improves the efficiency of testing tasks, saves time and resources, reduces testing costs, and ensures the accuracy and reliability of the test environment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119292907A_ABST
    Figure CN119292907A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a task testing method, computer equipment and a storage medium, and belongs to the technical field of computers. The method comprises the steps that test task information is obtained, a test task set is generated, and the test task set comprises at least one test task; when it is detected that the test environment is released, allocating the test environment to a current test task to be executed in the test task set; and based on the task step-by-step test information corresponding to the current test task, performing step-by-step test on the current test task in the test environment to obtain an execution result of the current test task. According to the technical scheme, the execution efficiency of the test task is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] Nowadays, for various systems and software, each version needs to be tested before release, and the release will be made only after the test is successful to ensure normal use after release. At present, when performing various test tasks, such as system upgrade test tasks, test operations are generally performed manually, and the test process is time-consuming and labor-intensive, especially when the number of test tasks is large, the test task execution efficiency is very low.

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

[0004] The main purpose of the embodiments of the present application is to provide a task testing method, a computer device and a storage medium, aiming to improve the efficiency of executing test tasks.

[0005] In a first aspect, an embodiment of the present application provides a task testing method, the method comprising:

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

[0007] 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;

[0008] 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.

[0009] In a second aspect, an embodiment of the present application provides a computer device, the computer device comprising:

[0010] 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 realized.

[0011] 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.

[0012] The embodiment of the present application provides a task testing method, computer equipment and storage medium, which generates a test task set by acquiring test task information, wherein the test task set includes at least one test task, and when the test environment is detected to be released, the test environment is allocated to the current test task to be executed in the test task set, and 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, and the test task is tested step by step, and each step of the test task does not need to be executed from beginning to end, which reduces the test task execution time, thereby improving the test task execution efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. 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 paying any creative work.

[0014] Figure 1 A flowchart of a task testing method provided by an embodiment of the present invention;

[0015] Figure 2 A schematic diagram of the software architecture of a task testing system provided by an embodiment of the present invention;

[0016] Figure 3 A schematic diagram of a process for generating a test task set provided by an embodiment of the present invention;

[0017] Figure 4 A schematic diagram of a test task set scheduling process provided by an embodiment of the present invention;

[0018] Figure 5 A schematic diagram of a test task execution process provided by an embodiment of the present invention;

[0019] Figure 6 A schematic diagram of a process of calling a test knowledge base to perform fault processing provided by an embodiment of the present invention;

[0020] Figure 7 A flowchart of another task testing method provided by an embodiment of the present invention;

[0021] Figure 8 A schematic diagram of a process for generating a test report provided by an embodiment of the present invention;

[0022] Fig. 9 A schematic block diagram of the structure of a task testing device provided by an embodiment of the present invention;

[0023] Fig.10 A schematic block diagram of the structure of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION

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

[0025] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.

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

[0027] Currently, for various systems and software, each version needs to be tested before release, and the release will be made only after the test is successful to ensure normal use after release. At present, when executing various test tasks, such as system upgrade test tasks, test operations are generally performed manually, and the test process is time-consuming and labor-intensive. Especially when the number of test tasks is large, the test task execution efficiency is very low.

[0028] In order to solve the above problems, an embodiment of the present invention provides a task testing method, a computer device and a storage medium, aiming to improve the execution efficiency of the test task.

[0029] Some embodiments of the present invention are described in detail below in conjunction with the accompanying drawings. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.

[0030] Please refer to Figure 1 , Figure 1 A flowchart of a task testing method provided by an embodiment of the present invention.

[0031] like Figure 1 As shown, the task testing method includes steps S101 to S103.

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

[0033] Before introducing the task testing method, the software architecture of the task testing system applying the task testing method is described first. Figure 2 As shown, the task test system includes an online orchestration interface, an execution system and a test environment, wherein 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.

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

[0035] Test environment registration: the specific operation is to click Register test environment, 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 can be used for execution system scheduling later.

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

[0037] To create a task set, click the Create Task Set button, then click Add Task, set the old version, new version and other information, select the required operations from the pre-defined minimized task step-by-step test operation list and combine them to complete the creation of a test task. Repeat the above operations, and after all test tasks are created, the test task set is created.

[0038] 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.

[0039] Progress check and recovery: After executing the test task set, the user can check the execution progress of the test task set from the interface. If the execution fails and is interrupted, the user will not be affected if the fault can be automatically repaired. If the fault needs to be repaired manually and is successful, you can click Resume Execution on the interface to continue the subsequent operations. Otherwise, the test task execution fails. The user can also click the History button to view the execution status of the previously executed test task set on the History interface.

[0040] 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 realize 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.

[0041] 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.

[0042] 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.

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

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

[0045] Obtaining the test version information;

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

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

[0048] Verifying the test scenario information;

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

[0050] 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;

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

[0052] For example, Figure 3 As shown in the figure, the process of generating a test task set is as follows:

[0053] 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. Exemplarily, each test version uses the version name as a unique key value.

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

[0055] S203: modify the test version. According to the test version information input by the user, modify the test version in the system database.

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

[0057] S205. Obtain the test scenario information input by the user. The test scenario information includes but is not limited to the 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.

[0058] S206, test scenario information verification, 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.

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

[0060] S208: modify the test scenario, and modify the test scenario information in the system database according to the test scenario information input by the user.

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

[0062] 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.

[0063] S211, generating a test task set. According to at least one test scenario information obtained, generating a test task set. The test task set arrangement is completed. The test task set contains one or more test tasks.

[0064] 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 users becoming familiar with the test environment and execution process, but also improves the efficiency of creating test tasks.

[0065] 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.

[0066] When scheduling a test task set, wait for the test environment to be released. When a new test environment is detected to be released, determine whether the test environment meets the requirements of the test scenario environment information, that is, determine whether the test environment matches the current test task in the test task set. If not, continue to wait for the test environment to be released; if so, assign the test environment to the current test task.

[0067] For example, Figure 4 As shown, the process of scheduling the test task set is as follows:

[0068] S301, obtaining test task set information input by a user, or obtaining test task set information from the step of generating a test task set, wherein the test task set includes one or more test tasks.

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

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

[0071] 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.

[0072] 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.

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

[0074] Through intelligent scheduling and allocation of test environment resources, the waste of test environment resources is avoided, the test environment resource overhead is saved, the test cost and time are reduced, the utilization rate of test environment resources is improved, and the overall test efficiency is improved. At the same time, in the process of allocating the test environment, factors such as hardware type, database type, and network networking are taken into consideration to ensure the accuracy and reliability of the allocated test environment, thereby optimizing the test quality.

[0075] 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.

[0076] Exemplarily, according to the test scenario information corresponding to the current test task, the task step-by-step test information included in the test scenario information is extracted. For example, taking the current test task as a system upgrade test task as an example, the task step-by-step test information is obtained including test steps "1" and "3", wherein step "1" represents a new version download operation, and step "3" represents a pre-upgrade check operation.

[0077] According to the acquired 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, thereby further reducing the test time and improving the test efficiency.

[0078] 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:

[0079] 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;

[0080] 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.

[0081] For example, still taking the current test task as the system upgrade test task, the task step-by-step test information obtained includes test steps "1", "3", and "4", where 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 execute step "3", and finally execute step "4".

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

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

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

[0085] 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;

[0086] 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.

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

[0088] When the related test operations of the 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 solution corresponding to the fault. For example, determine whether the fault can be automatically recovered or needs manual recovery, and handle the fault based on the solution.

[0089] For example, Figure 5 As shown in the figure, the process of executing the test task is as follows:

[0090] 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.

[0091] 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.

[0092] S403, determine whether the test operation is successfully executed. If the test operation is successfully executed, execute step S406; otherwise, execute step S404.

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

[0094] S405, judging 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.

[0095] 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.

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

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

[0098] The test operations corresponding to the test tasks can be combined as needed, which facilitates the customization of the process of executing the test operations. When an exception occurs during the execution of the test operation, the test knowledge base can be used for automatic recovery, or the test operation can be continued after manual recovery based on the solution provided by the test knowledge base. The test knowledge base reduces the cost of fault location, and automatic recovery reduces the waiting time and manual operation of the test environment, thereby improving the utilization rate of the test environment and test efficiency.

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

[0100] If the current test operation fails, submitting failure information;

[0101] 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.

[0102] When the relevant test operation of the test task fails to execute, the fault information is submitted to the fault system for tracking, wherein 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, and if the test knowledge base records the fault corresponding to the fault information, then based on the corresponding recovery processing information (such as solution) recorded in the test knowledge base, the fault is recovered, such as automatically or manually, so as to improve the test efficiency and accuracy.

[0103] In some embodiments, if the current test operation fails to be executed, after submitting the fault information, the method further includes:

[0104] 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.

[0105] The information in the test knowledge base is queried. If the test knowledge base does not record the fault corresponding to the fault information, the fault information is added to the test knowledge base, and the corresponding recovery processing information, such as the solution to the fault, is recorded, and the test knowledge base is updated.

[0106] 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:

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

[0108] If yes, automatically recover the fault;

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

[0110] For example, Figure 6 As shown in the figure, the process of calling the test knowledge base for troubleshooting is as follows:

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

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

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

[0114] S504, test knowledge base update: if the fault is not recorded in the test knowledge base, the fault information is supplemented and recorded in the test knowledge base, and the processing based on the test knowledge base is unsuccessful this time.

[0115] S505, judging whether the fault can be automatically recovered, if yes, executing step S506; otherwise, executing step S507.

[0116] S506, automatic recovery processing, calling the business execution code, and recovering from the fault. After the execution is completed, the data and log collection of step S509 is executed. The processing result based on the test knowledge base is based on the automatic recovery execution result.

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

[0118] S508, manual processing by the user, waiting for the user to intervene to process 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.

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

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

[0121] When a test operation fails, the test knowledge base can be used to determine whether the failure has occurred before and find possible solutions to improve test efficiency and accuracy. The combination of automatic recovery and manual recovery strategies can better handle various failure situations that occur during the test operation execution, thereby improving test efficiency and overall test quality.

[0122] In some embodiments, Figure 7 As shown, step S104 may be included after step S103.

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

[0124] 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 according to the execution result of each test task. Exemplarily, the test report includes the execution result, timestamp and other information of each test task.

[0125] After the test report is generated, the test report can be output, for example, the test report can be sent to relevant testers.

[0126] For example, Figure 8 As shown, the process of generating a test report is as follows:

[0127] 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.

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

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

[0130] 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.

[0131] In the above embodiment, by acquiring the test task information, a test task set is generated, and the test task set includes at least one test task. When the test environment is detected to be released, the test environment is allocated to the current test task to be executed in the test task set, and 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, and the test task is tested step by step, and each step of the test task does not need to be executed from beginning to end, which reduces the test task execution time, thereby improving the test task execution efficiency.

[0132] The present invention also provides a task testing device, see Fig. 9 , Fig. 9 It is a schematic block diagram of a task testing device provided in one embodiment of the present application.

[0133] like Fig. 9 As shown, the task testing device 1000 includes a generating module 1001 , an allocating module 1002 , and a testing module 1003 .

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

[0135] An allocation module 1002, configured to allocate the test environment to a current test task to be executed in the test task set when a release of the test environment is detected;

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

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

[0138] 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;

[0139] 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.

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

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

[0142] 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;

[0143] 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.

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

[0145] If the current test operation fails, submitting failure information;

[0146] 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.

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

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

[0149] If yes, automatically recover the fault;

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

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

[0152] A recording module is used 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.

[0153] In some embodiments, the generating module 1001 is further used to:

[0154] Obtaining the test version information;

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

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

[0157] Verifying the test scenario information;

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

[0159] 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;

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

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

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

[0163] 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 repeated here one by one.

[0164] The embodiment of the invention also provides a computer device, see Fig.10 , Fig.10 It is a schematic block diagram of a computer device provided in one embodiment of the present application.

[0165] like Fig.10As shown, 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.

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

[0167] Specifically, the memory 220 may be a Flash chip, a read-only memory (ROM) disk, an optical disk, a USB disk, or a mobile hard disk, etc. The memory 220 stores various computer programs for the processor 210 to execute.

[0168] The processor 210 is used to run a computer program stored in the memory, and implements the following steps when executing the computer program:

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

[0170] 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;

[0171] 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.

[0172] In some embodiments, when the processor 210 implements the task step-by-step test information corresponding to the current test task and performs step-by-step testing on the current test task in the test environment, it is configured to implement:

[0173] 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;

[0174] 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.

[0175] In some embodiments, when implementing the sequentially executing each of the test operations in the test environment, the processor 210 is configured to implement:

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

[0177] 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;

[0178] 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.

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

[0180] If the current test operation fails, submitting failure information;

[0181] 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.

[0182] In some embodiments, when the processor 210 performs recovery processing on the fault based on the recovery processing information corresponding to the fault recorded in the test knowledge base, it is configured to implement:

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

[0184] If yes, automatically recover the fault;

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

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

[0187] 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.

[0188] In some embodiments, when the test task information includes the test version information and the test scenario information, the test task information is acquired, and the test task set is generated, the processor 210 is used to implement:

[0189] Obtaining the test version information;

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

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

[0192] Verifying the test scenario information;

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

[0194] 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;

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

[0196] In some embodiments, after implementing the step-by-step testing of 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 used to implement:

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

[0198] 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.

[0199] The storage medium may be an internal storage unit of the computer device described in the above 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 memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the computer device.

[0200] 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 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 tapes, 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 of ordinary skill in the art that communication media typically contain 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.

[0201] It should be understood that the term "and / or" used in the present 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 variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements 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 including the element.

[0202] The serial numbers of the embodiments of the present application are only for description and do not represent the advantages and disadvantages of the embodiments. The above are only specific embodiments of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field 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 protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope 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, characterized in that 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, characterized in that 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, characterized in that 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, characterized in that 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, characterized in that 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, characterized in that 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, characterized in that: 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, characterized in that: The computer device comprises: 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, characterized in that: 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

Cited By

  • Evaluation device, evaluation method, and evaluation program

    WO2026196993A1