Execution machine processing method and computing device

By judging its status when the execution machine is updated, avoiding interrupting the ongoing test tasks, the problems of wasted testing resources and reduced efficiency in the prior art are solved, and more efficient use of test resources is achieved.

CN119396711APending Publication Date: 2025-02-07XFUSION DIGITAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411312366.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-19
Publication Date
2025-02-07

AI Technical Summary

Technical Problem

When performing machine updates, the prior art can easily cause the ongoing test tasks to be forced to be stopped, resulting in wasted testing resources and reduced testing efficiency.

Method used

By judging the state of the executor, when the executor is in an idle state, clear the current executor and rebuild a new executor to avoid interrupting the ongoing test task.

Benefits of technology

It effectively avoids interruptions in testing tasks, saves testing resources, and improves testing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119396711A_ABST
    Figure CN119396711A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an execution machine processing method and computing equipment. The method comprises the steps that an execution machine management center obtains the state of an execution machine; if the state of the execution machine is a first state, the current execution machine is cleared, a new execution machine is created, and the first state indicates that the current execution machine does not execute the test case. Namely, according to the embodiment of the invention, by judging the state of the created execution machine, the phenomenon that the test task being executed is forcibly stopped is avoided, so that the waste of input test resources is avoided, the test resources are saved, and the test efficiency 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 server technology, and in particular to an execution machine processing method and a computing device. Background Art

[0002] A test case is a detailed description of the product (such as an electronic device or software product) testing process, which is used to verify whether the product meets the established performance requirements. As product performance is updated, the test cases also need to be revised and expanded accordingly to ensure that all new functions and updated performance are fully verified.

[0003] The execution machine refers to the test operating environment for executing test cases. In order to adapt to the update of test cases, improve test security, and adapt compatibility, the execution machine also needs to be updated. The update of the execution machine includes clearing the existing execution machine and rebuilding a new execution machine to match the latest test requirements. However, when the current execution machine is updated, there is a phenomenon that the test tasks being executed are forced to stop, resulting in a waste of test resources and reduced test efficiency. Summary of the invention

[0004] The present application provides an execution machine processing method and a computing device for saving test resources and improving test efficiency.

[0005] In order to achieve the above objectives, this application provides the following technical solutions:

[0006] In a first aspect, an embodiment of the present application provides an execution machine processing method, the method comprising: the execution machine management center obtains the status of the execution machine; if the status of the execution machine is a first status, clears the current execution machine and creates a new execution machine, the first status indicating that the current execution machine has not executed a test case.

[0007] When rebuilding the execution machine, the embodiment of the present application identifies the state of the execution machine. When the execution machine is in the first state, the current execution machine is cleared and a new execution machine is rebuilt, wherein the first state indicates that the current execution machine has not executed a test case. Therefore, the embodiment of the present application avoids the phenomenon that the test task being executed is forced to stop by judging the state of the created execution machine, thereby avoiding the waste of the invested test resources, saving test resources and improving test efficiency.

[0008] In a specific implementation, the execution machine management center obtains the status of the execution machine based on the status query interface of the execution machine. When the execution machine management center receives the trigger operation to rebuild the execution machine, it calls the status query interface of the current execution machine to query the status of the execution machine. The execution machine management center can query the status of the execution machine based on the status query interface of the execution machine without paying attention to the type of the execution machine. Therefore, this helps to rebuild and expand the execution machine. In addition, the execution machine management center can query automatically without human intervention, which improves the query efficiency and automation level.

[0009] In another specific implementation, the execution machine management center deletes the port number of the execution machine in the execution machine registry and clears the execution machine; creates a new execution machine based on the current test case, and adds the port number of the new execution machine to the execution machine registry, which is used to store the port number of the created execution machine. Therefore, when it is necessary to add, delete or modify an execution machine, it is only necessary to perform the corresponding operation on the registry, which simplifies the maintenance process.

[0010] In another specific implementation, in the process of creating a new executor, the new executor adjusts its own state to the first state. After the new executor is created, its own state is initialized, for example, the state is adjusted to an idle state. By initializing its own state, it can be ensured that each new executor is in a unified state, which is convenient for subsequent management and helps to avoid potential errors caused by the existence of the previous task state.

[0011] In another specific implementation, the new executor executes the target test case; in the process of the new executor executing the target test case, the new executor adjusts its own state to the second state, and the second state of the new executor is used to indicate that the new executor is currently executing the test case; when the execution of the target test case is completed, the new executor adjusts its own state to the first state. Among them, the executor maintains its own state without external intervention, which improves the response speed. The executor maintains its own state without occupying additional resources of the executor management center, which improves the execution efficiency of the executor management center.

[0012] In another specific implementation, after the execution of the target test case is completed, the new execution machine determines whether its own reference case version lags behind the latest test case version. The reference test case version of the execution machine is used to determine the test cases that the execution machine supports to execute; if so, the new execution machine is deregistered. The embodiment of the present application maintains the reference test case version number by the execution machine itself, and determines whether the reference test case version number is behind, which can prevent the situation where the execution machine is occupied for a long time and causes the version to lag behind and become incompatible with the latest test case.

[0013] In another specific implementation, the execution machine management center batch-clears the deregistered new execution machines and creates new execution machines to improve the clearing and creation efficiency.

[0014] In yet another specific implementation, if the target test case version lags behind or is equal to the reference test case version of the new execution machine, the new execution machine executes the target test case.

[0015] In another specific implementation, when the state of the execution machine is the second state, the execution machine management center skips the current execution machine and builds execution machines with other port numbers. The second state of the execution machine is used to indicate that the execution machine is currently executing a test case.

[0016] In a second aspect, an embodiment of the present application provides an execution machine processing device, which is applied to an execution machine management center of a computing device, and the device includes:

[0017] An acquisition unit, used to acquire the state of the execution machine;

[0018] The execution machine creation unit is used to clear the current execution machine and create a new execution machine if the state of the execution machine is a first state, and the first state indicates that the current execution machine does not execute a test case.

[0019] In a third aspect, an embodiment of the present application provides a computing device, including: a memory and a processor;

[0020] The memory is used to store programs;

[0021] The processor is used to execute the program stored in the memory. When the program stored in the memory is executed, the processor is used to execute the method as described in any one of the first aspects.

[0022] In a fourth aspect, an embodiment of the present application provides a computer storage medium for storing a computer program. When the computer program is executed, it is used to implement the method provided in any one of the implementation modes in the first aspect of the present application.

[0023] In the third aspect, the present application provides a computer program product comprising instructions, which, when executed on at least one computing device, enables the at least one computing device to implement the method provided by any one of the embodiments of the first aspect of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 A schematic diagram of a test platform provided in an embodiment of the present application;

[0025] Figure 2 A schematic diagram of a reconstructed execution machine provided in an embodiment of the present application;

[0026] Figure 3A flow chart of the execution machine processing method provided in the embodiment of the present application;

[0027] Figure 4 An interaction diagram of another execution machine processing method provided in an embodiment of the present application;

[0028] Figure 5 A schematic diagram of the structure of a batch re-construction execution machine provided in an embodiment of the present application;

[0029] Figure 6 A flow chart of a method for batch building execution machines provided in an embodiment of the present application;

[0030] Figure 7 A flowchart of another method for batch building execution machines provided in an embodiment of the present application;

[0031] Figure 8 A flow chart of another method for batch building execution machines provided in an embodiment of the present application;

[0032] Fig. 9 A schematic diagram of the structure of an execution machine processing device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0033] It should be noted that the embodiments described in this application are only part of the embodiments of this application, rather than all the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0034] First, the professional terms involved in the embodiments of the present application are explained.

[0035] (I) Execution machine

[0036] The execution machine, also known as the test operation environment, is used to execute test cases.

[0037] The execution machine can be a test operating environment created using containerization technologies such as Docker and Kubernetes, or a test operating environment based on a bare metal host, or a test operating environment based on a virtual machine, which is not specifically limited in the embodiments of the present application.

[0038] The execution machine needs to be updated regularly to improve the security of the execution machine, update the performance of the execution machine, be compatible with the updated operating system, programming language, database, etc., and support new standards and technologies. The update of the execution machine includes clearing the existing execution machine and rebuilding the new execution machine to match the latest test requirements.

[0039] (II) Test cases

[0040] A test case is a detailed description of the product testing process, which is used to verify whether the product meets the established performance requirements.

[0041] Test cases include input data, operation steps, and expected results, etc. The test cases should clearly describe the expected results of each operation step to ensure the accuracy and effectiveness of the test.

[0042] In addition, the test case also includes the test case version information, test case number, test title, test purpose and prerequisites. Among them, the test case number is used to uniquely identify each test case for easy management and tracking. The test title is used to briefly describe the purpose or functional point of the test case. The test purpose is used to clearly state the purpose of the test case, that is, which function or feature of the software is expected to be verified through this test. The prerequisites are used to list the conditions or states that must be met before executing the test case, such as specific system configuration, user permissions, data preparation, etc.

[0043] Test cases include automated test cases and manual test cases. Manual test cases are designed for manual testers, and test cases are executed through manual operation to verify the functions and performance of the software. Automated test cases are the process of automatically executing tests by writing test scripts to simulate user operations and verify expected results. The embodiments of this application illustrate automated test cases. The test cases described below all refer to automated test cases.

[0044] Currently, when the execution machine is updated, the test task being executed may be forced to stop, which not only wastes the test resources already invested, but also affects the test efficiency.

[0045] In view of this, an embodiment of the present application provides an execution machine processing method, which identifies the state of the execution machine when rebuilding the execution machine. When the execution machine is in the first state, the current execution machine is cleared and a new execution machine is rebuilt. Among them, the first state indicates that the current execution machine has not executed a test case. Therefore, the embodiment of the present application avoids the phenomenon that the test task being executed is forced to stop by judging the state of the created execution machine, thereby avoiding the waste of the test resources that have been invested, saving test resources and improving test efficiency.

[0046] The following is a detailed description of the execution machine processing method provided by the embodiment of the present application in conjunction with the accompanying drawings. Obviously, the described embodiment is only a part of the embodiment of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0047] Attached Figure 1A schematic diagram of a test platform provided in an embodiment of the present application. The execution machine processing method provided in the embodiment of the present application is executed on the test platform 100, and specifically can be executed by the execution machine management center in the test platform. The test platform 100 can be composed of one computing device or multiple computing devices, and the embodiment of the present application does not limit the specific form of the test platform.

[0048] The test platform 100 includes an execution machine management center 101 and at least one execution machine that has been created by the test platform 100, as shown in the attached Figure 1 As shown in , the test platform 100 includes execution machines 121 to 12n, where n≥1 and n is an integer.

[0049] In an embodiment of the present application, the execution machine management center 101 is used to rebuild the execution machine, and when rebuilding the execution machine, it first determines the state of the execution machine. If the state of the execution machine is the first state, that is, the current execution machine is executing a test case, the reconstruction of the execution machine is skipped. If the execution machine is not executing a test case, the execution machine is cleared and a new execution machine is rebuilt. For example, the execution machine management center 101 rebuilds a new execution machine based on the updated test case version so that the rebuilt new execution machine supports the updated test case version. Thus, the execution machine management center 101 identifies the execution machine that is executing the test case, skips the execution machine, and executes the build operation of other execution machines, thereby avoiding the phenomenon that the test task being executed is forced to stop, thereby avoiding the waste of the test resources already invested, saving test resources and improving test efficiency.

[0050] In addition, in the embodiment of the present application, the execution machine management center 101 is also used to obtain test cases from the test case sending device and send them to the execution machine to execute the test cases. The test case sending device is other equipment different from the test platform, such as a cloud server, etc., which is not specifically limited in the embodiment of the present application.

[0051] It should be noted that the system architecture and application scenarios described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Ordinary technicians in this field can know that with the evolution of the system architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0052] The following is an exemplary introduction to the execution machine processing method provided in the embodiment of the present application in conjunction with the accompanying drawings.

[0053] Embodiment 1

[0054] The execution machine management center 101 can build one execution machine at a time.

[0055] For example, Figure 2 The schematic diagram of rebuilding the execution machine 121 is shown. The execution machine management center 101 determines whether the execution machine 121 is currently executing a test case. If so, the execution machine is not rebuilt this time. If not, the execution machine is cleared and a new execution machine is rebuilt. Among them, the execution machine 121 currently has no test case being executed, the execution machine 121 is cleared, and the execution machine 131 is rebuilt. The details are as shown in the attached figure. Figure 2 As shown in (b) in .

[0056] Attached Figure 3 The flowchart of the execution machine processing method provided in the embodiment of the present application is as follows: Figure 1 The execution machine management center 101 shown is executed. The method includes the following steps:

[0057] S310: Get the status of the execution machine.

[0058] The execution machine refers to the execution machine that already exists in the test platform 100, for example, Figure 2 Execution machine 121 to execution machine 12n shown in (a).

[0059] The states of the execution machine include a busy state (i.e., the second state) and an idle state (i.e., the first state). The busy state of the execution machine means that the execution machine is executing a test case. The idle state of the execution machine means that the execution machine is not currently executing a test case.

[0060] In the embodiment of the present application, in order to prevent the executing test case from being interrupted by the rebuilt execution machine, the execution machine management center 101 first obtains the status of the constructed execution machine when rebuilding the execution machine.

[0061] The execution machine management center 101 can periodically and automatically trigger the operation of rebuilding the execution machine, for example, the period is 1 hour, 5 hours or 1 day. When the execution machine management center 101 builds the execution machine, it obtains the status of the current execution machine. Alternatively, the user triggers the operation of rebuilding the execution machine, and after the execution machine management center 101 receives the operation of rebuilding the execution machine triggered by the user, it obtains the status of the current execution machine.

[0062] In an embodiment of the present application, the execution machine management center 101 can read the status of the current execution machine through the status query interface of the current execution machine.

[0063] Exemplary description: The status query interface is Get / api / contaniers / {contaniers ID} / status. Get indicates that the function of the interface is query, contaniers indicates that the execution machine has been created, and {contaniers ID} indicates the unique identifier of the execution machine. For example, {contaniers ID} can be the port number assigned to the execution machine, and the execution machine management center 101 can control the execution machine based on the port number assigned to the execution machine. Satus indicates that it is used to obtain the status of the execution machine.

[0064] When the execution machine management center 101 receives the trigger operation of rebuilding the execution machine, it calls the status query interface of the current execution machine to query the status of the execution machine. The execution machine management center 101 can query the status of the execution machine based on the status query interface of the execution machine without paying attention to the type of the execution machine. Therefore, this helps to rebuild the execution machine and expand the execution machine. In addition, the execution machine management center 101 can automatically query without manual intervention, which improves the query efficiency and automation level.

[0065] In addition, the execution machine management center 101 can also obtain the status of the created execution machine through other methods, such as the execution machine management center 101 queries the log file of the created execution machine and determines the status of the created execution machine based on the log file, which is not specifically limited in the embodiments of the present application.

[0066] Furthermore, the embodiments of the present application also provide a variety of methods for maintaining the status of the execution machine.

[0067] In one example, the execution machine can maintain its own state. When the execution machine is executing a test case, it adjusts its own state to a busy state. When the execution machine is not currently executing a test case, it adjusts its own state to an idle state. The execution machine maintains its own state without external intervention, thereby improving the response speed. The execution machine maintains its own state without occupying additional resources of the execution machine management center 101, thereby improving the execution efficiency of the execution machine management center 101.

[0068] In another example, the execution machine management center 101 maintains the status of each execution machine. When the execution machine management center 101 sends a test case to the execution machine, the status of the execution machine is adjusted to a busy state. After receiving the test report sent by the execution machine, it indicates that the execution machine has completed the test task, and the status of the execution machine is adjusted to an idle state. The execution machine management center 101 can centrally maintain the status of all created execution machines.

[0069] S320: If the state of the execution machine is idle, clear the execution machine and rebuild a new execution machine.

[0070] The execution machine in the idle state is not currently executing any test tasks, and the execution machine management center 101 clears the execution machine without interrupting the test tasks being executed. Therefore, the execution machine management center 101 clears the current execution machine and rebuilds a new execution machine.

[0071] Reconstructing the execution machine, that is, creating a new execution machine, and registering the new execution machine in the execution machine management center 101, so that the execution machine management center 101 can control the new execution machine to execute test cases.

[0072] The present application embodiment provides a method for registering a new execution machine, including:

[0073] Step 1: The new execution machine sends a registration request to the execution machine management center 101.

[0074] Among them, the registration request is used to enable the execution machine management center 101 to register the newly created execution machine. The registration request includes the port number of the newly created execution machine. The execution machine management center registers the newly created execution machine based on the port number. Step 2: After receiving the registration request, the execution machine management center 101 registers the newly created execution machine and saves the port number of the newly created execution machine.

[0075] After the execution machine management center 101 completes the registration of the newly created execution machine, the execution machine management center 101 can save the port number of the newly created execution machine, so that the execution machine management center 101 can schedule the new execution machine based on the port number of the new execution machine.

[0076] In addition, the execution machine management center 101 may also store resource information (eg, memory), status (busy or idle), and test case version information of the newly created execution machine.

[0077] It should be noted that the execution machine that has successfully registered with the execution machine management center 101 can execute test cases. The execution machine management center 101 stores the port numbers of the successfully registered execution machines, which is equivalent to a white list. If the port number of a certain execution machine is not stored in the white list of the execution machine management center, then the execution machine cannot execute the test case.

[0078] Therefore, the execution machine can realize independent registration between multiple execution machines without affecting each other through automatic registration, which helps to improve registration efficiency and registration success rate.

[0079] In the embodiment of the present application, after the execution machine management center 101 creates a new execution machine, the new execution machine can perform the following operations to facilitate the next reconstruction:

[0080] Step 11: After the new executor is created, initialize its own state, for example, adjust the state to the idle state. By initializing its own state, you can ensure that each new executor is in a unified state, which is convenient for subsequent management and helps avoid potential errors caused by the existence of the previous task state.

[0081] Step 21: After the new execution machine sends a registration request to the execution machine management center 101, it can control its own state to be idle. For example, if the initial state is idle, this operation is no longer performed. If the initial state is empty, its own state is adjusted from empty to idle.

[0082] In addition, in the embodiment of the present application, the execution machine management center 101 stores the port number of the existing execution machine in the form of an execution machine registration table. Exemplary description: Table 1 is an execution machine registration table before the execution machine is updated provided in the embodiment of the present application. The execution machine registration table is in the form of an execution machine registration table. Figure 2 Take the example for explanation. The port number corresponding to the execution machine 121 is port 121, ... the port number corresponding to the execution machine 12n is port 12n. Thus, the execution machine management center 101 can schedule the execution machines based on the port numbers.

[0083] Table 1

[0084] Execution machine Port Number Execution machine 121 Port 121 Execution machine 122 Port 122 …… …… Executor 12n 12n port

[0085] It should be noted that the execution machine management center 101 clears the created execution machine and deletes the port number of the created execution machine from the execution machine registry.

[0086] Table 2 is an execution machine registration table after the execution machine is rebuilt according to an embodiment of the present application. Table 2 is a table obtained after the execution machine 121 is rebuilt. The newly created execution machine is the execution machine 131, and the port number corresponding to the execution machine 131 is port 131.

[0087] Table 2

[0088] Execution machine Scheduling information (port number) Execution machine 131 Port 131 Execution machine 122 Port 122 …… …… Executor 12n 12n port

[0089] It should be noted that the execution machine registry in Table 1 and Table 2 is only a schematic illustration. In actual use, the execution machine registry may also include the test case version information of the execution machine, or the resource information corresponding to the execution machine, etc. The embodiment of the present application is not specifically limited. Therefore, when it is necessary to add, delete or modify an execution machine, it is only necessary to perform the corresponding operation on the registry, which simplifies the maintenance process.

[0090] In another example, the execution machine registry may also include a status query interface. When the execution machine needs to be rebuilt, the status of the execution machine can be queried through the status query interface. When the status of the execution machine is idle, the idle execution machine is cleared first, and then a new execution machine is rebuilt.

[0091] S330: If the execution machine is in a busy state, the execution machine is not cleared.

[0092] If the status of the executor is busy, that is, the executor is executing a test task, in order to avoid interruption of the test task being executed, the current executor is not cleared and a new executor is not created, that is, the executor is skipped and other executors are rebuilt.

[0093] In the embodiment of the present application, the execution machine management center 101 can query the state of the execution machine periodically (for example, every 5 hours, 1 day, etc.), until the execution machine state is idle, then clear the current execution machine and rebuild a new execution machine. Alternatively, the execution machine management center 101 retains the current execution machine until the next execution machine is rebuilt.

[0094] Further, the execution machine management center 101 sends the test case to the new execution machine. The new execution machine executes the test case. In one example, after the execution machine management center 101 sends the test case, the state of the new execution machine is adjusted to a busy state. In another example, after the new execution machine receives the test case sent by the execution machine management center 101 and executes the test case, it adjusts its own state to a busy state.

[0095] After the new execution machine completes executing the test case, it generates a test report and uploads it to the execution machine management center 101, and the new execution machine adjusts its own state to an idle state. In one example, the execution machine management center 101 adjusts the state of the new execution machine from a busy state to an idle state. In another example, after uploading the test report, the new execution machine waits for a first preset time length, for example, the first preset time length is 10ms, 2s, etc., and adjusts the state from a busy state to an idle state. The embodiments of the present application are not specifically limited.

[0096] In summary, the embodiment of the present application provides an execution machine processing method, which identifies the state of the execution machine when rebuilding the execution machine, and when the execution machine is not in the state of executing a test case, clears the current execution machine and rebuilds a new execution machine. Therefore, the embodiment of the present application avoids the phenomenon that the test task being executed is forced to stop by judging the state of the execution machine, thereby avoiding the waste of the test resources already invested, saving test resources and improving test efficiency.

[0097] Furthermore, the execution machine in the test platform 100 may not be updated for a long time, resulting in the test case version supported by the current execution machine not being able to meet the actual test case requirements. In view of the above problems, the embodiment of the present application also provides another execution machine processing method for solving the technical problem that the execution machine has not been updated for a long time, resulting in the current test case version not being able to meet the actual test case requirements.

[0098] Attached Figure 4 Another execution machine processing method interaction diagram provided in the embodiment of the present application is applied in the attached Figure 3 After creating the new execution machine as shown, the method includes the following:

[0099] S410: The new execution machine records the reference test case version of the new execution machine.

[0100] The reference test case version refers to the latest version that the new execution machine can currently support, that is, the new execution machine can execute test cases with the same reference test case version, or test cases that lag behind the reference test case version. For example, if the reference test case version is 2.1.2, the new execution machine can execute test cases of 2.1.2, and can also execute test cases such as 1.1.2 that lag behind the reference test case version.

[0101] In an embodiment of the present application, to facilitate query, when a new execution machine is created, the reference test case version is recorded in a preset location for storage.

[0102] S420: The new execution machine is registered to the execution machine management center 101.

[0103] The embodiments of the present application do not specifically limit S410 and S420. For example, S410 and S420 may be executed simultaneously, or S420 may be executed first and then S410, or S410 may be executed first and then S420.

[0104] S430: The execution machine management center 101 controls the new execution machine to execute the test case.

[0105] If the new execution machine of the execution machine management center 101 is created and the version of the test case is not updated within the second preset time (for example, 1 hour, 3 hours, 1 day, etc., which are not specifically limited in the embodiment of the present application), there will be a problem that the test case version supported by the current execution machine cannot meet the actual test requirements. In view of this, at the moment of creation completion and while waiting for the second preset time, the execution machine management center 101 obtains the current latest version of the test case to be tested and determines whether the execution machine supports the test case.

[0106] Example 1: The execution machine management center 101 sends an acquisition request to the test case sending device to acquire the test case to be tested sent by the test case sending device. The acquisition request is used to enable the test case sending device to send the latest version of the test case to be tested to the execution machine management center 101. After the execution machine management center 101 acquires the test case to be tested sent by the test case sending device, it sends the test case to the new execution machine to control the new execution machine to execute the test case.

[0107] Example 2: The execution machine management center 101 carries the test cases itself and sends the test cases to the new execution machines to control the new execution machines to execute the test cases.

[0108] The execution machine management center 101 can control the new execution machine to execute the test case in various ways.

[0109] In one example, the execution machine management center 101 can query the state of the new execution machine, and if the state of the new execution machine is idle, call the execution machine to execute the test case. In another example, the execution machine management center 101 obtains the test case and the identification information of the test case, and the identification information of the test case corresponds to the scheduling information of the new execution machine. The execution machine management center 101 can call the new execution machine corresponding to the identification information of the test case based on the identification information of the test case to execute the test case.

[0110] S440: Query the version of the test case to be tested.

[0111] The version of the case to be tested is the version corresponding to the case to be tested.

[0112] In an example, after receiving the test case sent by the execution machine management center 101, the new execution machine queries the test case version from the test case, wherein the test case includes the test case version.

[0113] S450: If the reference test case version lags behind the version of the test case, the new execution machine is deregistered.

[0114] In the embodiment of the present application, the new execution machine determines whether the reference test case version lags behind the version of the test case to be tested. If it lags behind, it means that the test case version determined to be supported by the new execution machine is too old. For example, the reference test case version is 1.1.2, and the test case version to be tested is 2.1.2. The reference test case version lags behind the test case version, and the test case version supported by the new execution machine is outdated and cannot support the latest test case version.

[0115] In order to avoid the problem that the execution machine management center 101 distributes the test cases to the execution machines that cannot meet the test requirements, resulting in test failure, the new execution machines are deregistered.

[0116] In a specific example, the new execution machine is deregistered at the execution machine management center 101. That is, the new execution machine sends a deregistration request to the execution machine management center 101. The deregistration request is used to trigger the execution machine management center 101 to delete the port number of the new execution machine, or mark the new execution machine as unavailable. The execution machine management center 101 deletes the port number of the new execution machine, or marks the new execution machine as unavailable. The active deregistration method can be used to achieve batch deregistration of new execution machines, thereby improving deregistration efficiency.

[0117] Furthermore, the execution machine management center 101 may directly delete the deregistered execution machine, or delete it together with other created execution machines that are in idle state during the next reconstruction, which is not specifically limited in the embodiments of the present application.

[0118] Optionally, if the version of the test case to be tested is earlier than or equal to the version of the reference test case, the new execution machine is not deregistered. For example, if the reference test case version is 1.1.2 and the version of the test case to be tested is 1.1.1, the reference test case version is earlier than the version of the test case to be tested, and the new execution machine supports the current test case version, then deregistration is not required.

[0119] Furthermore, in a specific embodiment, there is also the following problem: for a new execution machine, before the next execution machine is rebuilt, the new execution machine executes the test case, and after the next reconstruction is completed, the new execution machine has not completed the test case. At this time, the reference test case version of the new execution machine may not meet the test case requirements of the current latest version. In view of this, the embodiment of the present application can also monitor the version of the test case of the current latest version after the new execution machine completes the test case, and determine whether the reference test case version of the new execution machine supports the latest version of the test case. If not, the new execution machine is deregistered. If supported, the test case issued by the execution machine management center 101 is received. Further, after the execution machine management center 101 monitors that the test case has been updated, it determines whether the reference case version of the current execution machine supports the updated test case version. If not, the status of the current execution machine is obtained, and whether to rebuild based on the status of the execution machine. In this way, the execution machine managed by the execution machine management center 101 supports the latest test case version requirements.

[0120] Therefore, the embodiment of the present application maintains the reference test case version number by the execution machine itself and determines whether the reference test case version number is outdated, which can prevent the situation where the version is outdated and incompatible with the latest test case due to the execution machine being occupied for a long time.

[0121] Embodiment 2

[0122] The first embodiment described in the present application can only update one execution machine at a time. In order to improve the update efficiency, the present application provides another update method for batch updating multiple execution machines in the test platform. The number of execution machines to be updated is adjusted according to the needs, and the present application does not specifically limit it. Figure 5 Take this as an example for detailed description.

[0123] Attached Figure 5 The schematic diagram of the structure of batch rebuilding execution machines is shown. The execution machine management center 101 determines whether each execution machine is executing a test case. For multiple execution machines that are executing test cases, the execution machine is not rebuilt. For execution machines that are not currently executing tasks, the execution machine is rebuilt. Figure 5 The execution machines 121 to 12m that are not currently executing the test case are shown, and the updated execution machines are the execution machines 131 to 13m, where m is an integer greater than or equal to 1 and less than or equal to n.

[0124] The following is a method for implementing batch build test execution machines. Figure 6 ~Attached Figure 8 Provide detailed explanation.

[0125] Attached Figure 6 A flow chart of a method for batch building execution machines provided in an embodiment of the present application, the method is also applied to the test platform 100, and the method includes the following steps:

[0126] S610. The execution machine management center creates new execution machines in batches.

[0127] The execution machine management center 101 creates multiple new execution machines in parallel, and the new execution machines are used to meet the version requirements of the test cases in the current build.

[0128] S620: The new execution machine initializes its own state.

[0129] The new execution machine indicates any one of the new execution machines created in batches in step S610.

[0130] S630 , the new execution machine adjusts its own status to idle and registers with the execution machine management center 101 .

[0131] S640, the execution machine management center 101 sends the test case to the new execution machine.

[0132] When the new execution machine is successfully registered and the execution machine management center 101 executes the test case, the test case is sent to the new execution machine so that the new execution machine executes the test case.

[0133] In the embodiment of the present application, after receiving the test case sent by the test case sending device, the execution machine management center 101 controls one or more execution machines from the existing multiple execution machines to execute the test case.

[0134] In one example, after receiving a test case, the execution machine management center 101 can adapt multiple execution machines to be selected from the registered execution machines that meet the required test objectives and prerequisites based on information such as the test objectives or prerequisites in the test case, obtain the target execution machine from the multiple execution machines to be selected, and execute the test case.

[0135] In another example, the execution machine management center 101 selects an execution machine in an idle state from a plurality of execution machines to be selected as a target execution machine to execute the test case.

[0136] In another example, the execution machine management center 101 queries the status of each waiting execution machine from top to bottom based on the execution machine registration table, and selects the state of the execution machine queried first as the idle state according to the order in which the execution machine is queried.

[0137] The standby execution machine is used as the target execution machine to execute the test case.

[0138] The embodiment of the present application may also determine the execution machine to be issued by other means, which are not specifically limited in the embodiment of the present application.

[0139] S650: The new execution machine receives and executes the machine test case, and adjusts its own state to busy state.

[0140] S660: After the test task of the new execution machine is completed, the state of the new execution machine is adjusted to the idle state.

[0141] S670, the execution machine management center 101 obtains the status of the new execution machine.

[0142] When the execution machine management center 101 rebuilds the execution machine next time, it first obtains the status of the new execution machine.

[0143] It should be noted that the embodiment of the present application does not specifically limit the execution order of S640 and S670. For example, S670 may be executed first and then S640, or S640 may be executed first and then S670, or S640 and S670 may be executed simultaneously.

[0144] S680. Clear the idle execution machines in the test platform in batches, and re-execute S610.

[0145] In the embodiment of the present application, the new execution machine executing the test case sets its own state to a busy state. When the task is completed, the new execution machine executing the test case adjusts its own state from a busy state to an idle state to facilitate subsequent calls and reconstructions.

[0146] Attached Figure 7 A flowchart of another method for batch building execution machines provided in an embodiment of the present application, the method is also applied to the test platform 100, and the method includes the following steps:

[0147] S710. The execution machine management center creates new execution machines in batches.

[0148] S720. The new execution machine records its own reference test case version.

[0149] New Executor indicates that any of the new executors in the batch are created.

[0150] S730. The new execution machine is registered to the execution machine management center 101.

[0151] S740, the execution machine management center 101 sends the test case to the new execution machine.

[0152] When the new execution machine is successfully registered and the execution machine management center 101 executes the test case, the test case is sent to the new execution machine so that the new execution machine executes the test case.

[0153] S750. The new execution machine determines whether the reference test case version is outdated.

[0154] Specifically, the new execution machine determines whether the reference test case version lags behind the version of the test case, and if so, it indicates lag, otherwise, it indicates not lag.

[0155] S760: If yes, the new execution machine will automatically log out at the execution machine management center.

[0156] S770. Batch clear the deregistered execution machines in the test platform and re-execute S710.

[0157] It should be noted that the embodiment of the present application does not limit the execution order of steps S740 and S770. For example, S740 is executed first and then S770. If S770 can be executed first and then S740, they can also be executed simultaneously.

[0158] For the execution machine with outdated version, it is actively deregistered in the execution machine management center 101. This helps to solve the technical problem that the execution machine may not be updated for a long time, resulting in the test case version supported by the current execution machine not meeting the actual test case requirements.

[0159] Attached Figure 8A flowchart of another method for batch building execution machines provided in an embodiment of the present application, the method is also applied to the test platform 100, and the method includes the following steps:

[0160] S810. The execution machine management center creates new execution machines in batches.

[0161] S820. The new executor initializes its own state and records its own reference test case version.

[0162] New Executor indicates that any of the new executors in the batch are created.

[0163] S830. The new execution machine is registered to the execution machine management center 101.

[0164] S840, the execution machine management center 101 sends the test case to the new execution machine.

[0165] When the new execution machine is successfully registered and the execution machine management center 101 executes the test case, the test case is sent to the new execution machine so that the new execution machine executes the test case.

[0166] S850: The new execution machine receives and executes the test case, and adjusts its own state to a busy state.

[0167] S860: After the new executor completes its task, it adjusts its own state to idle state.

[0168] S870. The new execution machine obtains the latest version of the test case.

[0169] Specifically, the latest version of the test case can be obtained in a new execution cycle.

[0170] S880. Determine whether the new execution machine determines whether the reference test case version lags behind the latest version of the test case. If so, execute S890.

[0171] S890. The new execution machine actively logs out of the execution machine management center 101.

[0172] S8100: During the next update, batch clear the idle execution machines or the deregistered execution machines in the test platform, and execute step S810.

[0173] It should be noted that the embodiment of the present application does not limit the execution order of steps S810 and S8100. For example, S810 is executed first and then S8100. If S8100 can be executed first and then S810, they can also be executed simultaneously.

[0174] The new executor that executes the test case sets its own state to busy state. When the task is completed, the new executor that executes the test case adjusts its own state from busy state to idle state, and determines whether the reference test case version is outdated. For executors with outdated versions, they will actively log out of the executor management center 101. This method can not only facilitate subsequent calls and reconstructions, but also help solve the technical problem that the executor may not have been updated for a long time, resulting in the test case version supported by the current executor not meeting the actual test case requirements.

[0175] In addition, the present application also provides an execution machine processing device, which is applied to the execution machine management center of the computing device. Fig. 9 This is a schematic diagram of the structure of the execution machine processing device provided in the embodiment of the present application. The device includes:

[0176] An acquisition unit 901 is used to acquire the state of the execution machine;

[0177] The execution machine creation unit 902 is used to clear the current execution machine and create a new execution machine if the state of the execution machine is a first state. The first state indicates that the current execution machine does not execute a test case.

[0178] The acquisition unit 901 and the execution machine creation unit 902 can be executed based on the execution machine processing method described in any one of the first aspects. In addition, an embodiment of the present application also provides a computer-readable storage medium, which stores instructions, and when it is run on one or more computing devices, the one or more computing devices execute the execution machine processing method of the above embodiment.

[0179] In addition, the embodiment of the present application also provides a computer program product, when the computer program product is executed by one or more computing devices, one or more computing devices execute any of the aforementioned methods for processing the listing information. The computer program product can be a software installation package, and when any of the aforementioned methods for processing the listing information is needed, the computer program product can be downloaded and executed on a computer.

[0180] Through the description of the above implementation mode, the technicians in the field can clearly understand that the present application can be implemented by means of software plus necessary general hardware, and of course, it can also be implemented by special hardware including special integrated circuits, special CPUs, special memories, special components, etc. In general, all functions completed by computer programs can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be various, such as analog circuits, digital circuits or special circuits. However, for the present application, software program implementation is a better implementation mode in more cases. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer floppy disk, a U disk, a mobile hard disk, a ROM, a RAM, a disk or an optical disk, etc., including a number of instructions to enable a computer device (which can be a personal computer, a training device, or a network device, etc.) to execute the method of each embodiment of the present application.

[0181] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.

[0182] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, a computer, a training device or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, training device or data center. The computer-readable storage medium can be any available medium that a computer can store or a data storage device such as a training device, a data center, etc. that includes one or more available media integration. Available media can be magnetic media, (e.g., floppy disk, hard disk, tape), optical media (e.g., DVD), or semiconductor media (e.g., solid-state hard disk (SSD)), etc.

[0183] The system architecture and business scenarios described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. A person of ordinary skill in the art can appreciate that with the evolution of network architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

Claims

1. An execution machine processing method, characterized in that: The method comprises: The execution machine management center obtains the status of the execution machine; When the state of the execution machine is a first state, the execution machine management center clears the execution machine and creates a new execution machine, and the first state indicates that the execution machine currently does not execute any test case.

2. The method according to claim 1, characterized in that: The execution machine management center obtains the state of the execution machine, including: The execution machine management center obtains the status of the execution machine based on the status query interface of the execution machine.

3. According to the method of claim 1, the execution machine management center clears the execution machine, comprising: The execution machine management center deletes the port number of the execution machine in the execution machine registration table and clears the execution machine; The step of creating a new execution machine includes: The new execution machine is created based on the current test case, and the port number of the new execution machine is added to the execution machine registry, where the execution machine registry is used to store the port number of the created execution machine.

4. The method according to claim 1, characterized in that: The method further comprises: In the process of creating a new execution machine, the new execution machine adjusts its own state to the first state.

5. The method according to claim 4, characterized in that: The method further comprises: The new execution machine executes the target test case; During the process of the new execution machine executing the target test case, the new execution machine adjusts its own state to a second state, and the second state of the new execution machine is used to indicate that the new execution machine is currently executing the test case; After the execution of the target test case is completed, the new execution machine adjusts its own state to the first state.

6. The method according to claim 5, characterized in that: The method further comprises: When the execution of the target test case is completed, the new execution machine determines whether its own reference case version lags behind the latest test case version, and the reference test case version of the execution machine is used to determine the test cases that the execution machine supports to execute; If so, the execution machine management center cancels the new execution machine.

7. The method according to claim 6, characterized in that: The method further comprises: The execution machine management center batch clears the deregistered new execution machines and creates new execution machines.

8. The method according to claim 5, characterized in that: The new execution machine executes the target test case, including: If the target test case version lags behind or is equal to the reference test case version of the new execution machine, the new execution machine executes the target test case.

9. The method according to claim 1, characterized in that: The method further comprises: When the state of the execution machine is the second state, the execution machine management center skips the current execution machine and constructs execution machines with other port numbers. The second state of the execution machine is used to indicate that the execution machine is currently executing a test case.

10. A computing device, characterized in that include: Memory and processor; The memory is used to store programs; The processor is used to execute the program stored in the memory. When the program stored in the memory is executed, the processor is used to execute the method according to any one of claims 1 to 9.