Network environment inspection and repair method, system, device and medium for testing machine
By checking and repairing the network environment of the test machine before automated testing, the problem of resource waste caused by abnormal network environment in the existing technology is solved and the efficient operation of the test is ensured.
Patent Information
- Application Number
- CN202210882827.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-26
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2042-07-26
AI Technical Summary
The existing technology cannot effectively check and repair the network environment of the test machine during the automated testing process, resulting in network environment abnormalities caused by power outages, missing network cards, script abnormalities, etc., affecting the execution of automated tasks, resulting in a waste of time and resources.
Before executing the test script, check the network environment by sending the ping command. If an abnormality occurs, repair the BMCIP or OSIP, including booting, initialization, status repair and other steps. Ensure that the network environment is normal before continuing the test.
By interspersedly checking and repairing the network environment of the test machine, it ensures the smooth progress of automated testing, improves testing efficiency, and avoids waste of resources caused by network environment abnormalities.
Smart Images

Figure CN115098403B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and more particularly to a network environment inspection and repair method, system, device and medium for a test machine. Background Art
[0002] With the rise of automated testing, more and more manual test cases are replaced by automation. In the process of automated testing, the prerequisite is to ensure that the machine configuration and network environment before the test are normal. Machine configuration can only be completed by manual intervention, and network problems can be checked and restored by automation. The network environment is divided into BMC environment and operating system environment.
[0003] The current test only performs an environmental check before the test begins, and no intervention is made during the test. Specifically, the existing technology uses machine configuration and network environment checks before starting the automated test task. If the machine cannot be connected during the test, the test will be directly exited and the test failure will be returned. In other words, during the test process, once the network environment is abnormal due to power outages, network card loss, script abnormalities that lead to inability to boot, and failure to refresh the firmware version, it will affect the execution of automated tasks, resulting in a waste of time and machine resources. Summary of the invention
[0004] In view of the above problems, the purpose of the present invention is to provide a method, system, device and medium for checking and repairing the network environment of a test machine, which can check and repair the network environment of the test machine before executing the test script to ensure the smooth progress of the current test.
[0005] To achieve the above object, the present invention is implemented through the following technical solutions: a network environment inspection and repair method of a test machine, comprising:
[0006] The test machine checks the network environment by sending a ping command locally before executing the test script;
[0007] If pinging BMCIP and OSIP is normal, continue to execute the test script;
[0008] If pinging BMCIP and OSIP is abnormal, the test will be exited and the test failure will be returned;
[0009] If ping BMCIP succeeds but ping OSIP fails, use BMC command to check whether the test machine is powered on; if it is powered off, continue to send ping command to check the network environment after powering on; if it is powered on, perform operating system initialization and repair, and continue to send ping command to check the network environment;
[0010] If ping OSIP succeeds but ping BMCIP fails, repair the BMC status and continue to send ping commands to check the network environment.
[0011] Further, the ping command is continuously sent after the power-on to check the network environment, including:
[0012] Execute the BMC power-on command, wait for the first time, and ping OSIP again. If the ping result is normal, continue to execute the test script;
[0013] If the ping result is abnormal, perform operating system initialization and repair, and continue to send ping commands to check the network environment.
[0014] Further, the operating system initialization repair is performed, and the ping command is continued to be sent to check the network environment, including:
[0015] After waiting for the second time, ping OSIP again. If the ping result is normal, continue to execute the test script. If the ping result is abnormal, send BMC instructions to restore BIOS initialization and BMC instructions to restart the machine. After waiting for the third time, ping OSIP again. If the ping result is normal, continue to execute the test script. If the result is still abnormal, exit the test and return test failure.
[0016] Further, the BMC status repair is performed and the ping command is continued to be sent to check the network environment, including:
[0017] Check whether the BMC status is normal by sending commands in the operating system;
[0018] If the BMC status is normal, wait for the fourth period of time and ping BMCIP again. If the ping result is normal, continue to execute the test script; if the ping result is abnormal, restart BMC and ping BMCIP again. If the ping result is normal, continue to execute the test script; if the ping result is abnormal, re-flash BMC under the operating system, wait for the fifth period of time and ping BMCIP again. If the ping result is normal, continue to execute the test script; if the ping result is still abnormal, exit the test and return to test failure.
[0019] Further, the step of pinging the BMCIP again after restarting the BMC includes:
[0020] Use the command to set the BMC IP, subnet mask, and default gateway, and then restart the BMC and wait for the sixth period before pinging the BMC IP again.
[0021] Further, the BMC status repair and the continued sending of the ping command to check the network environment also include:
[0022] If the BMC status is abnormal, re-flash the BMC in the operating system, wait for the fifth time, and ping the BMCIP again. If the ping result is normal, continue to execute the test script. If the ping result is still abnormal, exit the test and return to test failure.
[0023] Correspondingly, the present invention also discloses a network environment checking and repairing system for a test machine, comprising: a detection unit, which is used for the test machine to check the network environment by sending a ping command locally before executing a test script;
[0024] The execution unit is used to execute the test script when the ping BMCIP and OSIP are both normal;
[0025] Exit unit, used to exit the test and return test failure when pinging BMCIP and OSIP is abnormal;
[0026] The machine status checking unit is used to check whether the test machine is powered on by using BMC instructions when pinging BMCIP succeeds and pinging OSIP fails;
[0027] The power-on unit is used to test and execute the BMC power-on command when the computer is in the power-off state;
[0028] An initialization unit, used for initializing and repairing the operating system;
[0029] The repair unit is used to repair the BMC status when the ping OSIP succeeds and the ping BMCIP succeeds.
[0030] Furthermore, the initialization unit includes a restart module, which is used to send a BMC instruction to restore BIOS initialization and a BMC instruction to restart the machine; the repair unit includes a refresh module, which is used to re-flash the BMC under the operating system.
[0031] Accordingly, the present invention discloses a network environment inspection and repair device for a test machine, comprising:
[0032] A memory, used for storing a network environment check and repair program of the test machine;
[0033] A processor is used to implement the steps of the network environment checking and repairing method of the test machine as described in any one of the above items when executing the network environment checking and repairing program of the test machine.
[0034] Correspondingly, the present invention discloses a readable storage medium, on which a network environment check and repair program of a test machine is stored. When the network environment check and repair program of the test machine is executed by a processor, the steps of the network environment check and repair method of the test machine as described in any of the above items are implemented.
[0035] Compared with the prior art, the beneficial effect of the present invention is that: the present invention provides a network environment inspection and repair method, system, device and medium for a test machine, which can intersperse the use of BMCIP or OSIP to inspect the network environment of the test machine before the test script starts to execute. If the network environment of the machine is good, the automated test steps will continue to be executed. If the network environment is abnormal, repair will be performed, and the test will continue after the inspection is normal, so that the test machine can achieve the purpose of a normal network environment. It ensures that the automated test can run efficiently and improves the test efficiency.
[0036] It can be seen that compared with the prior art, the present invention has outstanding substantive features and significant progress, and the beneficial effects of its implementation are also obvious. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0038] Attached Figure 1 It is a method flow chart of a specific implementation mode of the present invention.
[0039] Attached Figure 2 It is a system structure diagram of a specific implementation mode of the present invention.
[0040] In the figure, 1 is the detection unit; 2 is the execution unit; 3 is the exit unit; 4 is the machine status viewing unit; 5 is the startup unit; 6 is the initialization unit; 7 is the repair unit; 8 is the restart module; and 9 is the refresh module. DETAILED DESCRIPTION
[0041] The core of the present invention is to provide a network environment inspection and repair method for a test machine. In the prior art, the machine configuration and network environment inspection are completed before the automated test task is started. If the machine cannot be connected during the test, the test is directly exited and the test failure is returned. That is to say, during the test process, once the network environment is abnormal due to power failure, network card loss, script abnormality leading to inability to boot, failure to refresh the firmware version, etc., it will affect the execution of the automated task, resulting in a waste of time and machine resources.
[0042] The network environment inspection and repair method of the test machine provided by the present invention is as follows: first, the test machine checks the network environment by sending a ping command locally before executing the test script. If both ping BMCIP and OSIP are normal, continue to execute the test script. If both ping BMCIP and OSIP are abnormal, exit the test. Return to test failure; if ping BMCIP succeeds and ping OSIP fails, use the BMC instruction to check whether the test machine is in the power-on state; if it is in the power-off state, continue to send the ping command to check the network environment after powering on; if it is in the power-on state, perform operating system initialization repair, and continue to send the ping command to check the network environment. If ping OSIP succeeds and ping BMCIP fails, perform BMC status repair, and continue to send the ping command to check the network environment. It can be seen that the present invention can check and repair the network environment of the test machine before executing the test script to ensure the smooth progress of the current test.
[0043] In order to enable those skilled in the art to better understand the scheme of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than 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 the present invention.
[0044] Embodiment 1:
[0045] like Figure 1 As shown, this embodiment provides a network environment inspection and repair method for a test machine, comprising the following steps:
[0046] S1: The test machine checks the network environment by sending a ping command locally before executing the test script.
[0047] S2: If the ping results for BMCIP and OSIP are both normal, continue to execute the test script.
[0048] S3: If the ping results for BMCIP and OSIP are both abnormal, the test will be exited and the test failure will be returned.
[0049] S4: If ping BMCIP succeeds and ping OSIP fails, use the BMC command to check whether the test machine is in the power-on state; if it is in the power-off state, continue to send the ping command to check the network environment after powering on; if it is in the power-on state, perform operating system initialization and repair, and continue to send the ping command to check the network environment.
[0050] Specifically, this step includes:
[0051] If ping BMCIP succeeds but ping OSIP fails, use BMC commands to check whether the test machine is powered on.
[0052] If the machine is in shutdown state, execute the BMC power-on command, wait for the first time, and ping OSIP again. If the ping result is normal, continue to execute the test script; if the ping result is abnormal, wait for the second time and ping OSIP again. If the ping result is normal, continue to execute the test script. If the ping result is abnormal, send BMC instructions to restore BIOS initialization and BMC instructions to restart the machine. After waiting for the third time, ping OSIP again. If the ping result is normal, continue to execute the test script. If the result is still abnormal, exit the test and return test failure.
[0053] If it is in the power-on state, wait for the second time and ping OSIP again. If the ping result is normal, continue to execute the test script. If the ping result is abnormal, send BMC instructions to restore BIOS initialization and BMC instructions to restart the machine. Wait for the third time and ping OSIP again. If the ping result is normal, continue to execute the test script. If the result is still abnormal, exit the test and return test failure.
[0054] S5: If ping OSIP succeeds but ping BMCIP fails, repair the BMC status and continue to send ping commands to check the network environment.
[0055] Specifically, this step includes:
[0056] If ping OSIP succeeds but ping BMCIP fails, send commands in the operating system to check whether the BMC status is normal.
[0057] If the BMC status is normal, wait for the fourth time and ping BMCIP again. If the ping result is normal, continue to execute the test script; if the ping result is abnormal, use the command to set the BMC's IP, subnet mask and default gateway, and wait for the sixth time after restarting BMC and ping BMCIP again. If the ping result is normal, continue to execute the test script; if the ping result is abnormal, re-flash BMC under the operating system, wait for the fifth time and ping BMCIP again. If the ping result is normal, continue to execute the test script. If the ping result is still abnormal, exit the test and return to test failure.
[0058] If the BMC status is abnormal, re-flash the BMC in the operating system, wait for the fifth time, and ping the BMCIP again. If the ping result is normal, continue to execute the test script. If the ping result is still abnormal, exit the test and return to test failure.
[0059] Based on the above description, this method can be implemented through the following script:
[0060]
[0061]
[0062]
[0063]
[0064]
[0065]
[0066] This embodiment provides a method for checking and repairing the network environment of a test machine, which can intersperse BMCIP or OSIP to check the network environment of the test machine before the test script starts to execute. If the network environment of the machine is good, the automated test steps will continue to be executed. If the network environment is abnormal, repair it, and continue the test after the inspection is normal, so that the test machine can achieve the purpose of a normal network environment. It ensures that the automated test can run efficiently and improves the test efficiency.
[0067] Embodiment 2:
[0068] Based on Example 1, Figure 2 As shown, the present invention also discloses a network environment inspection and repair system for a test machine, comprising: a detection unit 1, an execution unit 2, an exit unit 3, a machine status viewing unit 4, a startup unit 5, an initialization unit 6 and a repair unit 7.
[0069] The detection unit 1 is used for the test machine to check the network environment by sending a ping command locally before executing the test script.
[0070] The execution unit 2 is used to execute the test script when the ping BMCIP and OSIP are both normal.
[0071] Exit unit 3 is used to exit the test and return test failure when both ping BMCIP and OSIP are abnormal.
[0072] The machine status checking unit 4 is used to use the BMC instruction to check whether the test machine is in the power-on state when the ping BMCIP succeeds and the ping OSIP fails.
[0073] The power-on unit 5 is used to execute the BMC power-on instruction when the test is in the power-off state.
[0074] The initialization unit 6 is used to perform initialization and repair of the operating system. Specifically, the initialization unit 6 includes a restart module 8, which is used to send a BMC instruction to restore BIOS initialization and a BMC instruction to restart the machine.
[0075] The repair unit 7 is used to repair the BMC state when the ping OSIP succeeds and the ping BMCIP is successful. The repair unit 7 includes a refresh module 9, which is used to refresh the BMC under the operating system.
[0076] This embodiment provides a network environment inspection and repair system for a test machine, which can intersperse BMCIP or OSIP to inspect the network environment of the test machine before the test script starts to execute. If the network environment of the machine is good, the automated test steps will continue to be executed. If the network environment is abnormal, repair will be performed. After the inspection is normal, the test will continue to be tested, so that the test machine can achieve the purpose of a normal network environment. This ensures that the automated test can run efficiently and improves the test efficiency.
[0077] Embodiment three:
[0078] This embodiment discloses a network environment inspection and repair device for a test machine, comprising a processor and a memory; wherein the processor implements the following steps when executing a network environment inspection and repair program for the test machine stored in the memory:
[0079] 1. The test machine checks the network environment by sending a ping command locally before executing the test script.
[0080] 2. If ping BMCIP and OSIP are both normal, continue to execute the test script.
[0081] 3. If the ping of BMCIP and OSIP is abnormal, the test will be exited and the test failure will be returned.
[0082] 4. If ping BMCIP succeeds and ping OSIP fails, use the BMC command to check whether the test machine is powered on; if it is powered off, continue to send ping commands to check the network environment after it is powered on; if it is powered on, perform operating system initialization and repair, and continue to send ping commands to check the network environment.
[0083] 5. If ping OSIP succeeds and ping BMCIP fails, repair the BMC status and continue to send ping commands to check the network environment.
[0084] Furthermore, the network environment inspection and repair device of the test machine in this embodiment may also include:
[0085] The input interface is used to obtain the network environment check and repair program of the test machine imported from the outside, and save the obtained network environment check and repair program of the test machine to the memory, and can also be used to obtain various instructions and parameters transmitted by the external terminal device, and transmit them to the processor, so that the processor can use the above various instructions and parameters to carry out corresponding processing. In this embodiment, the input interface can specifically include but is not limited to a USB interface, a serial interface, a voice input interface, a fingerprint input interface, a hard disk reading interface, etc.
[0086] The output interface is used to output various data generated by the processor to the terminal device connected thereto, so that other terminal devices connected to the output interface can obtain various data generated by the processor. In this embodiment, the output interface may specifically include but is not limited to a USB interface, a serial interface, etc.
[0087] The communication unit is used to establish a remote communication connection between the network environment inspection and repair device of the test machine and the external server, so that the network environment inspection and repair device of the test machine can mount the image file to the external server. In this embodiment, the communication unit may specifically include but is not limited to a remote communication unit based on wireless communication technology or wired communication technology.
[0088] The keyboard is used to obtain various parameter data or instructions input by the user by tapping the keycaps in real time.
[0089] The display is used to display the relevant information of the server power supply line short circuit locating process in real time.
[0090] The mouse can be used to assist users in inputting data and simplify user operations.
[0091] Embodiment 4:
[0092] This embodiment also discloses a readable storage medium, which includes random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, register, hard disk, removable hard disk, CD-ROM or any other form of storage medium known in the technical field. The readable storage medium stores a network environment check and repair program for the test machine, and when the network environment check and repair program for the test machine is executed by the processor, the following steps are implemented:
[0093] 1. The test machine checks the network environment by sending a ping command locally before executing the test script.
[0094] 2. If ping BMCIP and OSIP are both normal, continue to execute the test script.
[0095] 3. If the ping of BMCIP and OSIP is abnormal, the test will be exited and the test failure will be returned.
[0096] 4. If ping BMCIP succeeds and ping OSIP fails, use the BMC command to check whether the test machine is powered on; if it is powered off, continue to send ping commands to check the network environment after it is powered on; if it is powered on, perform operating system initialization and repair, and continue to send ping commands to check the network environment.
[0097] 5. If ping OSIP succeeds and ping BMCIP fails, repair the BMC status and continue to send ping commands to check the network environment.
[0098] In summary, the present invention can check and repair the network environment of the test machine before executing the test script, thereby ensuring the smooth progress of the current test.
[0099] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. As for the method disclosed in the embodiment, since it corresponds to the system disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0100] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0101] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, systems and methods can be implemented in other ways. For example, the system embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of systems or units, which can be electrical, mechanical or other forms.
[0102] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0103] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, or each module may exist physically separately, or two or more modules may be integrated into one unit.
[0104] Similarly, each processing unit in each embodiment of the present invention may be integrated into one functional module, or each processing unit may exist physically, or two or more processing units may be integrated into one functional module.
[0105] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0106] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0107] The network environment inspection and repair method, system, device and readable storage medium of the test machine provided by the present invention are introduced in detail above. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made to the present invention without departing from the principles of the present invention, and these improvements and modifications also fall within the scope of protection of the claims of the present invention.
Claims
1. A network environment inspection and repair method for a test machine, characterized in that: include: The test machine checks the network environment by sending a ping command locally before executing the test script; If pinging BMCIP and OSIP is normal, continue to execute the test script; If pinging BMCIP and OSIP is abnormal, the test will be exited and the test failure will be returned; If ping BMCIP succeeds but ping OSIP fails, use BMC command to check whether the test machine is powered on; If the computer is in shutdown state, continue to send ping commands to check the network environment after restarting the computer; if the computer is in startup state, perform operating system initialization and repair, and continue to send ping commands to check the network environment; If ping OSIP succeeds but ping BMCIP fails, repair the BMC status and continue to send ping commands to check the network environment; After the power-on, continue to send the ping command to check the network environment, including: Execute the BMC power-on command, wait for the first time, and ping OSIP again. If the ping result is normal, continue to execute the test script; If the ping result is abnormal, perform operating system initialization and repair, and continue to send ping commands to check the network environment; The operating system initialization repair is performed, and the ping command is continuously sent to check the network environment, including: after waiting for a second time period, pinging the OSIP again, if the ping result is normal, continuing to execute the test script, if the ping result is abnormal, sending the BMC instruction to restore the BIOS initialization and the BMC instruction to restart the machine, after waiting for a third time period, pinging the OSIP again, if the ping result is normal, continuing to execute the test script, if the result is still abnormal, exiting the test and returning the test failure; The repairing of the BMC status and continuing to send the ping command to check the network environment include: checking whether the BMC status is normal by sending an instruction under the operating system; If the BMC status is normal, wait for the fourth time and ping BMCIP again. If the ping result is normal, continue to execute the test script; if the ping result is abnormal, restart BMC and ping BMCIP again. If the ping result is normal, continue to execute the test script; if the ping result is abnormal, re-flash BMC under the operating system, wait for the fifth time and ping BMCIP again. If the ping result is normal, continue to execute the test script; if the ping result is still abnormal, exit the test and return to test failure.
2. The network environment inspection and repair method of the test machine according to claim 1, characterized in that: After restarting the BMC, ping the BMCIP again, including: Use the command to set the BMC IP, subnet mask, and default gateway, and then restart the BMC and wait for the sixth period before pinging the BMC IP again.
3. The network environment inspection and repair method of the test machine according to claim 1, characterized in that: The repairing of the BMC status and continuing to send the ping command to check the network environment also includes: If the BMC status is abnormal, re-flash the BMC in the operating system, wait for the fifth time, and ping the BMCIP again. If the ping result is normal, continue to execute the test script. If the ping result is still abnormal, exit the test and return to test failure.
4. A network environment inspection and repair system for a test machine, characterized in that: include: The detection unit is used for the test machine to check the network environment by sending a ping command locally before executing the test script; The execution unit is used to execute the test script when the ping BMCIP and OSIP are both normal; Exit unit, used to exit the test and return test failure when both ping BMCIP and OSIP are abnormal; The machine status checking unit is used to check whether the test machine is powered on by using BMC instructions when pinging BMCIP succeeds and pinging OSIP fails; The power-on unit is used to execute the BMC power-on command when the test machine is in the power-off state; An initialization unit, used for initializing and repairing the operating system; Repair unit, used to repair BMC status when pinging OSIP successfully and pinging BMCIP; The startup unit is specifically used for: Execute the BMC power-on command, wait for the first time, and ping OSIP again. If the ping result is normal, continue to execute the test script; If the ping result is abnormal, perform operating system initialization and repair, and continue to send ping commands to check the network environment; The initialization unit is specifically used for: After waiting for the second time, ping OSIP again. If the ping result is normal, continue to execute the test script. If the ping result is abnormal, send BMC instructions to restore BIOS initialization and BMC instructions to restart the machine. After waiting for the third time, ping OSIP again. If the ping result is normal, continue to execute the test script. If the result is still abnormal, exit the test and return test failure. The repair unit is specifically used for: Check whether the BMC status is normal by sending commands in the operating system; If the BMC status is normal, wait for the fourth time and ping BMCIP again. If the ping result is normal, continue to execute the test script; if the ping result is abnormal, restart BMC and ping BMCIP again. If the ping result is normal, continue to execute the test script; if the ping result is abnormal, re-flash BMC under the operating system, wait for the fifth time and ping BMCIP again. If the ping result is normal, continue to execute the test script; if the ping result is still abnormal, exit the test and return to test failure.
5. The network environment inspection and repair system of the test machine according to claim 4, characterized in that: The initialization unit includes a restart module, which is used to send a BMC instruction to restore BIOS initialization and a BMC instruction to restart the machine; The repair unit includes a refresh module, and the refresh module is used to refresh the BMC under the operating system.
6. A network environment inspection and repair device for a test machine, characterized in that: include: A memory, used for storing a network environment check and repair program of the test machine; A processor is used to implement the steps of the network environment checking and repairing method of the test machine as described in any one of claims 1 to 3 when executing the network environment checking and repairing program of the test machine.
7. A readable storage medium, characterized in that: The readable storage medium stores a network environment check and repair program for the test machine, which, when executed by a processor, implements the steps of the network environment check and repair method for the test machine as described in any one of claims 1 to 3.
Citation Information
Patent Citations
Network layer communication terminal equipment service test automation realization method
CN111130927A
Network detection method and device and related equipment
CN111884879A
