Project test methods, computer devices, storage media and programs
By automatically querying and encapsulating test scripts on the client, and using target containers to run in multiple operating systems, the problem of low manual testing efficiency is solved, efficient multi-operating system testing is achieved, and the degree of automation and process reusability are improved. .
Patent Information
- Application Number
- CN202410748709.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-12
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2044-06-12
AI Technical Summary
During the server development and testing process, manually testing the compatibility of hardware and software with multiple operating systems takes a lot of time, and test scripts are dependent on the execution environment, resulting in increased repetitive work and low efficiency.
Send test instructions through the client, automatically query and encapsulate the test script into the target container, realize testing without manual intervention in multiple operating systems, use the target container to run the test script, monitor and send the test process and logs.
It improves the automation of project testing, shortens the testing time cycle, and saves testing time. When the test script or project changes, the test process can be reused by simply editing the operating system collection list, which improves portability and usability.
Smart Images

Figure CN118331886B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of computer technology, and in particular, relates to a project testing method, a computer device, a storage medium and a program. Background Art
[0002] During the server development and testing process, there are often some development and testing requirements that require verification of the compatibility of hardware and software on multiple operating systems. This requires testing on multiple operating system environments. However, as operating systems are updated more and more quickly, the types and number of operating systems are also increasing.
[0003] If manual testing is used for this type of test, the device needs to be powered off and the system disk needs to be replaced or the operating system needs to be switched. The test script needs to be manually copied to the target device for testing. The test results also need to be manually saved and integrated. There is a lot of repetitive work in this process, which often takes a lot of time. Summary of the invention
[0004] The present application provides a project testing method, a computer device, a storage medium and a program.
[0005] Some embodiments of the present application provide a project testing method, the method comprising:
[0006] In response to a test instruction sent by a client, determining a test item specified by the test instruction;
[0007] Searching the operating system set list for the operating system and the test script corresponding to the test item;
[0008] Encapsulating the test script into a target container to obtain an encapsulated test script;
[0009] The test item is tested in the operating system using the packaged test script.
[0010] Optionally, encapsulating the test script into a target container to obtain an encapsulated test script includes:
[0011] The test script is copied to a designated directory, and the test script is encapsulated using a target container.
[0012] Optionally, after testing the test item in the operating system using the packaged test script, the method further includes:
[0013] When there are multiple test items, it is determined whether all test items have been tested; if there are untested test items, the test process is continued using the next test item.
[0014] Optionally, after testing the test item in the operating system using the packaged test script, the method further includes:
[0015] The test process is monitored, and the monitored test progress is sent to the client according to a target time interval.
[0016] Optionally, after testing the test item in the operating system using the packaged test script, the method further includes:
[0017] When all test items have completed testing, the collected test logs are sent to the client.
[0018] Optionally, the method further comprises:
[0019] The correspondence between the test items and the test scripts, and the correspondence between the test scripts and the required compatible operating systems are established in advance to obtain the operating system set list.
[0020] Some embodiments of the present application provide another project testing method, the method comprising:
[0021] Receive a test instruction input by a user, determine the test item indicated by the test instruction and the operating system for running the test item;
[0022] Sending a test instruction to a server based on the test item and the test item, so that the server performs the item test based on the above-mentioned test method;
[0023] Receive the test result sent by the server and display the test result.
[0024] Optionally, after sending a test instruction to a server based on the test item and the test item, the method further includes:
[0025] Receive test data generated during the test process sent by the server, and display the test data.
[0026] Optionally, after sending a test instruction to a server based on the test item and the test item, the method further includes:
[0027] A test log sent by the server after the test is completed is received, and the test log is displayed.
[0028] Optionally, after determining the test item indicated by the test instruction and the operating system running the test item, the method further includes:
[0029] When the operating system is not installed in the current test environment, a test error message is displayed.
[0030] Optionally, the method further comprises:
[0031] When receiving a test suspension instruction input by a user, forwarding the test suspension instruction to the server.
[0032] Some embodiments of the present application provide a project testing system, the system comprising: a client and a server;
[0033] The client is used to execute the steps of the above-mentioned project testing method;
[0034] The server is used to execute the steps of the above-mentioned project testing method.
[0035] Some embodiments of the present application provide a project testing device, the device comprising:
[0036] A response module, used to respond to the test instruction sent by the client and determine the test items specified by the test instruction;
[0037] A test module, used for searching an operating system set list for an operating system and a test script corresponding to the test item;
[0038] Encapsulating the test script into a target container to obtain an encapsulated test script;
[0039] The test item is tested in the operating system using the packaged test script.
[0040] Optionally, the test module is further used to:
[0041] The test script is copied to a designated directory, and the test script is encapsulated using a target container.
[0042] Optionally, the test module is further used to:
[0043] When there are multiple test items, it is determined whether all test items have been tested; if there are untested test items, the test process is continued using the next test item.
[0044] Optionally, the test module is further used to:
[0045] The test process is monitored, and the monitored test progress is sent to the client according to a target time interval.
[0046] Optionally, the test module is further used to:
[0047] When all test items have completed testing, the collected test logs are sent to the client.
[0048] Optionally, the test module is further used to:
[0049] The correspondence between the test items and the test scripts, and the correspondence between the test scripts and the required compatible operating systems are established in advance to obtain the operating system set list.
[0050] Some embodiments of the present application provide another project testing device, the device comprising:
[0051] An input module, used to receive a test instruction input by a user, determine the test item indicated by the test instruction and an operating system for running the test item;
[0052] A processing module, used for sending a test instruction to a server based on the test item and the test item, so that the server performs the item test based on the above-mentioned test method;
[0053] Receive the test result sent by the server and display the test result.
[0054] Optionally, the processing module is further used to:
[0055] Receive test data generated during the test process sent by the server, and display the test data.
[0056] Optionally, the processing module is further used to:
[0057] A test log sent by the server after the test is completed is received, and the test log is displayed.
[0058] Optionally, the processing module is further used to:
[0059] When the operating system is not installed in the current test environment, a test error message is displayed.
[0060] Optionally, the processing module is further used to:
[0061] When receiving a test suspension instruction input by a user, forwarding the test suspension instruction to the server.
[0062] Some embodiments of the present application provide a computer device, including: a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the project testing method as described above.
[0063] Some embodiments of the present application provide a computer-readable storage medium having a computer program / instruction stored thereon, which implements the steps of the project testing method as described above when the computer program / instruction is executed by a processor.
[0064] Some embodiments of the present application provide a computer program product, including a computer program / instruction, which implements the steps of the project testing method when executed by a processor.
[0065] The project testing method, computer device, storage medium and program provided in some embodiments of the present application automatically query the required test scripts based on the test items and operating system selected by the user, and run the test scripts in the operating system after encapsulating them with a target container, so that the execution of the test scripts is independent of the operating system environment, thereby realizing project testing under multiple operating systems. No manual intervention is required during the test, which improves the automation level of project testing, shortens the test time cycle, saves test time and solves the dependence of the test script on the execution environment. In addition, when the test script or test item changes, this test system only needs to edit the operating system set list, and the entire test process can be reused, thereby improving the portability and usability of the test process.
[0066] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. 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.
[0068] Figure 1 The following schematically shows a structural diagram of a project testing system provided by some embodiments of the present application;
[0069] Figure 2 The following schematically shows a flow chart of a project testing method provided in some embodiments of the present application;
[0070] Figure 3 One of the logical schematic diagrams of a project testing method provided by some embodiments of the present application is schematically shown;
[0071] Figure 4 The second logical diagram of a project testing method provided in some embodiments of the present application is schematically shown;
[0072] Figure 5The second logical diagram of another project testing method provided by some embodiments of the present application is schematically shown;
[0073] Figure 6 The structure diagram of a project testing device provided in some embodiments of the present application is schematically shown;
[0074] Figure 7 The structure diagram of another project testing device provided in some embodiments of the present application is schematically shown;
[0075] Figure 8 A block diagram schematically shows a computer device for executing the method according to some embodiments of the present application;
[0076] Fig. 9 A storage unit for holding or carrying program codes for implementing methods according to some embodiments of the present application is schematically shown. DETAILED DESCRIPTION
[0077] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings 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.
[0078] Figure 1 The schematic diagram of the structure of a network system provided by the present application is schematically shown, including: the system includes: a server 10 and a client 20;
[0079] The server 10 is used to receive a test instruction input by a user, determine the test item indicated by the test instruction and the operating system running the test item. Send a test instruction to the server based on the test item and the test item, so that the server performs a test method provided in some embodiments of the present application to perform a project test. Receive a test result sent by the server and display the test result.
[0080] The client 20 is used to respond to the test instruction sent by the client, determine the test item specified by the test instruction, query the operating system and test script corresponding to the test item in the operating system set list, encapsulate the test script into the target container to obtain the encapsulated test script, and use the encapsulated test script to test the test item in the operating system.
[0081] It should be noted that the server and the client are electronic devices with functions such as data processing, data transmission, and data storage. The difference is that the client is installed with a GUI (Graphical User Interface) for displaying functional options and related data required for the test, while the server is pre-installed with the operating system required for the test, or is connected to a system disk with the operating system required for the test installed.
[0082] In an embodiment of the present application, before testing, it is necessary to first construct a list of operating system sets. The operating systems involved in the list should be the collection of all operating systems involved in all test scripts. The operating systems in different projects or test scripts must be included in the set list. For different projects, the relationship between all test scripts and the operating systems to be compatible is constructed. Under each project, each test script maintains a list of operating systems to be compatible, which serves as the default list when the user does not enter any information. A table of the corresponding operating systems in each system disk can be maintained, and firmware, such as BIOS, can be used to automatically identify the operating system installed on the current device.
[0083] Furthermore, for the client, a GUI user display interface is constructed, where a project, one or more test items, and one or more operating systems can be selected. If the operating system is not checked, the default list in 2 is used for testing. When the user inputs the operating system selection, it is necessary to verify whether the operating system has been installed in the current environment. The test process is dynamically arranged according to the user input. The GUI interface also provides control functions for the test process, and the test can be stopped at any time.
[0084] The following will describe a project testing method provided by some embodiments of the present application in combination with embodiments. Figure 1 The project shown shows the specific process of data transmission in the test system.
[0085] Figure 2 The following is a schematic diagram of a process flow of a project testing method provided by the present application, wherein the method comprises:
[0086] Step 101, in response to a test instruction sent by a client, determining a test item specified by the test instruction.
[0087] Step 102: Search the operating system set list for the operating system and the test script corresponding to the test item.
[0088] Step 103: encapsulate the test script into a target container to obtain an encapsulated test script.
[0089] Step 104: Use the packaged test script to test the test item in the operating system.
[0090] In an embodiment of the present application, a user can select the test items to be tested and the operating system to be run by the test items by inputting to the client. The test items can be one or more, and similarly, the operating systems required to run for each test item can also be one or more. Based on the test instructions sent by the user, the server queries the operating system set to see whether the test items required to participate in the test exist, and whether the operating system required to run for the test items exists in the operating system set list. If the required operating system does not exist in the operating system set list, it means that the server does not have the operating system installed. If the required operating system exists in the operating system combination, the test script to run the test item continues to be queried.
[0091] After querying the storage address of the test script, you need to copy the test script to the specified directory of the server. The test script can be encapsulated with a target container such as Docker so that the execution of the test script does not depend on the operating system environment. After the copy is completed, call the automation script to deploy the target container.
[0092] Then the test script encapsulated into the target container can be run in different operating systems, thereby implementing the test process for the test project. It is worth noting that each test requires the required test script to be copied to the specified directory of the server and encapsulated through the target container so that the test script can be successfully run in different operating systems.
[0093] The embodiment of the present application automatically queries the required test scripts based on the test items and operating system selected by the user, and encapsulates the test scripts with the target container and runs them in the operating system, so that the execution of the test scripts is independent of the operating system environment, thereby realizing project testing under multiple operating systems. No manual intervention is required during the test, which improves the automation level of project testing, shortens the test time cycle, saves test time and solves the dependence of test scripts on the execution environment. In addition, when the test script or test item changes, this test system only needs to edit the operating system set list, and the entire test process can be reused, thereby improving the portability and usability of the test process.
[0094] Optionally, the step 103 includes: copying the test script to a designated directory, and encapsulating the test script using a target container.
[0095] In the embodiment of the present application, before each test, the test script needs to be copied to the specified directory of the server. The test script can be encapsulated with a container such as Docker, so that the execution of the test script does not depend on the operating system environment. After the copy is completed, the automation script is called to deploy the Docker.
[0096] Optionally, after step 104, the method further comprises: when there are multiple test items, determining whether all test items have been tested. If there are untested test items, continue the test process with the next test item.
[0097] In the embodiments of this application, refer to Figure 3 If the user specifies multiple test items or test systems through the test instructions, the server will determine in real time whether all test items have been completed. If there are unfinished test items, the system will copy the test scripts required for the test items, and then use the test scripts to perform the test, monitor the test process in real time, and collect the monitored test data into the log. After the test is completed, the server will determine whether there are operating systems that have not been tested. If there are operating systems that have not been tested, the above test process will be repeated to continue testing. If the test of all operating systems has been completed, a test report will be automatically generated. Of course, if it is determined that all test items have been tested, a test report will be generated directly based on the test data that has been obtained.
[0098] Optionally, after step 104, the method further includes: monitoring the test process, and sending the monitored test process to the client at a target time interval.
[0099] In an embodiment of the present application, during the test process, the server will send the test progress to the client in real time according to the target time interval. The target time interval can be 30 seconds, 1 minute, etc. It can be a system default setting or a user-defined setting. It can be set according to actual needs and is not limited here.
[0100] Optionally, after step 104, the method further includes: when all test items have completed testing, sending the collected test logs to the client.
[0101] In an embodiment of the present application, after the server test is completed, the server collects log links to the GUI display interface, and echoes the test results to switch the operating system: the operating system is switched through virtual machine related software.
[0102] Optionally, the method further comprises: pre-establishing a correspondence between test items and test scripts, and a correspondence between test scripts and required compatible operating systems, to obtain the operating system set list.
[0103] In the embodiment of the present application, a set list of operating systems is first constructed. The operating systems involved in the list should be the collection of all operating systems involved in all test scripts. The operating systems in different projects or test scripts must be included in the set list. For different projects, the relationship between all test scripts and the operating systems to be compatible is constructed. Under each project, each test script maintains a list of operating systems to be compatible, which is used as the default list when the user does not enter any information.
[0104] Reference Figure 4 In an achievable embodiment of the present application, the test process may be as follows:
[0105] To set up the environment, two servers are needed, one as a server to prepare a virtual machine with all the operating systems required for testing installed, and one as a client to deploy the GUI interface;
[0106] Build an operating system set list. The operating systems involved in the list should be the collection of all operating systems involved in all test scripts. The operating systems in different projects or test scripts must be included in the set list.
[0107] Build a GUI user display interface, where you can select a project, one or more test items, and one or more operating systems. If the operating system is not checked, use the default list in 2 for testing. When the user enters the operating system selection, verify whether the operating system is already installed in the current environment. Dynamically arrange the test process based on the user input;
[0108] The test process is arranged and implemented, and different operating systems corresponding to each test item are tested. The test process includes copying test scripts, executing tests, real-time monitoring, collecting logs, and switching operating systems.
[0109] Figure 5 The following is a schematic diagram of another method for testing a project provided by the present application, wherein the method comprises:
[0110] Step 201: receiving a test instruction input by a user, and determining a test item indicated by the test instruction and an operating system for running the test item.
[0111] Step 202: Send a test instruction to the server based on the test item and the test item, so that the server executes a project test according to a test method provided in some embodiments of the present application.
[0112] Step 203, receiving the test result sent by the server, and displaying the test result.
[0113] In the embodiment of the present application, the user can select the test items and operating systems to be tested in the GUI interface provided by the client. If the operating system is not checked, the default list is tested. When the user inputs the selection of the operating system, it is necessary to verify whether the current environment has installed the operating system. According to the user input, the test process is dynamically arranged. After generating the test instructions, the client will send the test instructions to the server, and the server will test the test items based on the steps of a project testing method provided in some embodiments of the present application, which will not be repeated here.
[0114] After the server completes the test items, it will send the test results to the client, and the client can display the test results on the GUI interface for the user to view.
[0115] The embodiment of the present application automatically queries the required test scripts based on the test items and operating system selected by the user, and encapsulates the test scripts with the target container and runs them in the operating system, so that the execution of the test scripts is independent of the operating system environment, thereby realizing project testing under multiple operating systems. No manual intervention is required during the test, which improves the automation level of project testing, shortens the test time cycle, saves test time and solves the dependence of test scripts on the execution environment. In addition, when the test script or test item changes, this test system only needs to edit the operating system set list, and the entire test process can be reused, thereby improving the portability and usability of the test process.
[0116] Optionally, after step 202, the method further includes: receiving test data generated during the test process sent by the server, and displaying the test data.
[0117] In an embodiment of the present application, during the test process, the server will send the test data generated during the test process to the client at a target time interval. The client can display the test data on the GUI interface so that the user can monitor the test process in real time by viewing the GUI interface.
[0118] Optionally, after step 202, the method further includes: receiving a test log sent by the server after the test is completed, and displaying the test log.
[0119] In an embodiment of the present application, the server will write the test data monitored during the test into a test log, and send the test log to the client after the test is completed, so that the client can display the test log in a GUI interface for the user to view.
[0120] Optionally, after step 201, the method further includes: displaying a test error message when the operating system is not installed in the current test environment.
[0121] In an embodiment of the present application, when the operating system selected by the user is not installed in the current test environment, that is, on the server, the client will display a test error message to the user through the GUI interface, informing the user that the operating system does not exist, thereby avoiding the test failure due to the non-existence of the operating system.
[0122] Optionally, the method further includes: upon receiving a test pause instruction input by a user, forwarding the test pause instruction to the server.
[0123] In an embodiment of the present application, after the user monitors the test process through the GUI interface of the client, the user can input a test pause command to the client, so that the client sends the test pause command to the server, and the server will stop the test process of the test item.
[0124] Figure 6 The schematic diagram of the structure of a project testing device 30 provided by the present application is shown schematically, and the device comprises:
[0125] The response module 301 is used to respond to the test instruction sent by the client and determine the test items specified by the test instruction;
[0126] A test module 302, configured to search an operating system set list for an operating system and a test script corresponding to the test item;
[0127] Encapsulating the test script into a target container to obtain an encapsulated test script;
[0128] The test item is tested in the operating system using the packaged test script.
[0129] Optionally, the testing module 302 is further used to:
[0130] The test script is copied to a designated directory, and the test script is encapsulated using a target container.
[0131] Optionally, the testing module 302 is further used to:
[0132] When there are multiple test items, it is determined whether all test items have been tested; if there are untested test items, the test process is continued using the next test item.
[0133] Optionally, the testing module 302 is further used to:
[0134] The test process is monitored, and the monitored test progress is sent to the client according to a target time interval.
[0135] Optionally, the testing module 302 is further used to:
[0136] When all test items have completed testing, the collected test logs are sent to the client.
[0137] Optionally, the testing module 302 is further used to:
[0138] The correspondence between the test items and the test scripts, and the correspondence between the test scripts and the required compatible operating systems are established in advance to obtain the operating system set list.
[0139] The embodiment of the present application automatically queries the required test scripts based on the test items and operating system selected by the user, and encapsulates the test scripts with the target container and runs them in the operating system, so that the execution of the test scripts is independent of the operating system environment, thereby realizing project testing under multiple operating systems. No manual intervention is required during the test, which improves the automation level of project testing, shortens the test time cycle, saves test time and solves the dependence of test scripts on the execution environment. In addition, when the test script or test item changes, this test system only needs to edit the operating system set list, and the entire test process can be reused, thereby improving the portability and usability of the test process.
[0140] Figure 7 The structural diagram of another project testing device 40 provided by the present application is schematically shown, and the device comprises:
[0141] The input module 401 is used to receive a test instruction input by a user, determine the test item indicated by the test instruction and the operating system for running the test item;
[0142] The processing module 402 is used to send a test instruction to the server based on the test item and the test item, so that the server can perform the project test by itself based on the above-mentioned test method;
[0143] Receive the test result sent by the server and display the test result.
[0144] Optionally, the processing module 402 is further configured to:
[0145] Receive test data generated during the test process sent by the server, and display the test data.
[0146] Optionally, the processing module 402 is further configured to:
[0147] A test log sent by the server after the test is completed is received, and the test log is displayed.
[0148] Optionally, the processing module 402 is further configured to:
[0149] When the operating system is not installed in the current test environment, a test error message is displayed.
[0150] Optionally, the processing module 402 is further configured to:
[0151] When receiving a test suspension instruction input by a user, forwarding the test suspension instruction to the server.
[0152] The embodiment of the present application automatically queries the required test scripts based on the test items and operating system selected by the user, and encapsulates the test scripts with the target container and runs them in the operating system, so that the execution of the test scripts is independent of the operating system environment, thereby realizing project testing under multiple operating systems. No manual intervention is required during the test, which improves the automation level of project testing, shortens the test time cycle, saves test time and solves the dependence of test scripts on the execution environment. In addition, when the test script or test item changes, this test system only needs to edit the operating system set list, and the entire test process can be reused, thereby improving the portability and usability of the test process.
[0153] The various component embodiments of the present application may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that a microprocessor or a digital signal processor (DSP) may be used in practice to implement some or all functions of some or all components of a computer device according to an embodiment of the present application. The present application may also be implemented as a device or device program (e.g., a computer program and a computer program product) for executing part or all of the methods described herein. Such a program implementing the present application may be stored on a non-transient computer-readable medium, or may be in the form of one or more signals. Such a signal may be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.
[0154] For example, Figure 8A computer device that can implement the method according to the present application is shown. The computer device conventionally includes a processor 510 and a computer program product or a non-transitory computer-readable medium in the form of a memory 520. The memory 520 can be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read-only memory), an EPROM, a hard disk or a ROM. The memory 520 has a storage space 530 for program code, i.e., code 531, for executing any method step in the above method. For example, the storage space 530 for program code may include individual codes 531 for implementing various steps in the above method, respectively. These program codes can be read from or written to one or more computer program products. These computer program products include program code carriers such as a hard disk, a compact disk (CD), a memory card or a floppy disk. Such a computer program product is usually as described in reference Fig. 9 The portable or fixed storage unit. The storage unit may have Figure 8 The memory 520 in the computer device of the computer device is similarly arranged as a storage segment, storage space, etc. The program code can be compressed, for example, in an appropriate form. Generally, the storage unit includes computer readable code, i.e., code 531, that is, code that can be read by a processor such as 510, which, when executed by the computer device, causes the computer device to perform the various steps in the method described above.
[0155] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
[0156] The term "one embodiment", "embodiment" or "one or more embodiments" herein means that a particular feature, structure or characteristic described in conjunction with the embodiment is included in at least one embodiment of the present application. In addition, please note that the examples of the term "in one embodiment" here do not necessarily all refer to the same embodiment.
[0157] In the description provided herein, a large number of specific details are described. However, it is understood that the embodiments of the present application can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.
[0158] In the claims, any reference signs placed between brackets shall not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present application may be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third etc. does not indicate any order. These words may be interpreted as names.
[0159] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A project testing method, characterized in that: Applicable to servers, including: In response to a test instruction sent by a client, determining a test item specified by the test instruction; Searching for operating systems and test scripts corresponding to the test items in an operating system set list; the operating system set list stores the correspondence between the test items and the test scripts, and the correspondence between the test scripts and the operating systems; Encapsulating the test script into a target container to obtain an encapsulated test script; Using the packaged test script to test the test item in the operating system; The step of encapsulating the test script into a target container to obtain the encapsulated test script includes: The test script is copied to a designated directory, and the test script in the designated directory is encapsulated using a target container to obtain an encapsulated test script.
2. The method according to claim 1, characterized in that After testing the test item in the operating system using the packaged test script, the method further includes: When there are multiple test items, it is determined whether all test items have been tested; if there are untested test items, the test process is continued using the next test item.
3. The method according to claim 2, characterized in that After testing the test item in the operating system using the packaged test script, the method further includes: The test process is monitored, and the monitored test progress is sent to the client according to a target time interval.
4. The method according to claim 2, characterized in that: After testing the test item in the operating system using the packaged test script, the method further includes: When all test items have completed testing, the collected test logs are sent to the client.
5. The method according to claim 1, characterized in that The method further comprises: The correspondence between the test items and the test scripts, and the correspondence between the test scripts and the required compatible operating systems are established in advance to obtain the operating system set list.
6. A project testing method, characterized in that: Applied to a client, the method comprises: Receive a test instruction input by a user, determine the test item indicated by the test instruction and the operating system for running the test item; Sending a test instruction to a server based on the test item and the test item, so that the server performs a project test based on the test method described in any one of claims 1 to 5; Receive the test result sent by the server and display the test result.
7. The method according to claim 6, characterized in that After sending a test instruction to a server based on the test item and the test item, the method further includes: Receive test data generated during the test process sent by the server, and display the test data.
8. The method according to claim 6, characterized in that After sending a test instruction to a server based on the test item and the test item, the method further includes: A test log sent by the server after the test is completed is received, and the test log is displayed.
9. The method according to claim 6, characterized in that After determining the test item indicated by the test instruction and the operating system running the test item, the method further includes: When the operating system is not installed in the current test environment, a test error message is displayed.
10. The method according to claim 6, characterized in that The method further comprises: When receiving a test suspension instruction input by a user, forwarding the test suspension instruction to the server.
11. A project testing system, characterized in that: The system comprises: a client and a server; The server is used to execute the steps of the project testing method described in any one of claims 1 to 5; The client is used to execute the steps of the project testing method described in any one of claims 6-10.
12. A computer device, characterized in that: include: A memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the project testing method as described in any one of claims 1 to 10.
13. A computer-readable storage medium having a computer program or instruction stored thereon, characterized in that: When the computer program or instruction is executed by a processor, the steps of the project testing method as claimed in any one of claims 1 to 10 are implemented.
14. A computer program product comprising a computer program or instructions, characterized in that When the computer program or instruction is executed by a processor, the steps of the project testing method described in any one of claims 1 to 10 are implemented.
Citation Information
Patent Citations
Test method and test device
CN115495367A
Escalated remediation
US20180211042A1
