CN115098403A - Network environment checking and repairing method, system, device and medium for testing machine - Google Patents
Network environment checking and repairing method, system, device and medium for testing machine Download PDFInfo
- Publication number
- CN115098403A CN115098403A CN202210882827.4A CN202210882827A CN115098403A CN 115098403 A CN115098403 A CN 115098403A CN 202210882827 A CN202210882827 A CN 202210882827A CN 115098403 A CN115098403 A CN 115098403A
- Authority
- CN
- China
- Prior art keywords
- ping
- network environment
- bmc
- test
- bmcip
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000012360 testing method Methods 0.000 title claims abstract description 166
- 238000000034 method Methods 0.000 title claims abstract description 45
- 230000002159 abnormal effect Effects 0.000 claims abstract description 26
- 230000008439 repair process Effects 0.000 claims abstract description 25
- 238000007689 inspection Methods 0.000 claims description 2
- 230000008569 process Effects 0.000 description 11
- 238000004891 communication Methods 0.000 description 8
- 238000012545 processing Methods 0.000 description 5
- 230000009471 action Effects 0.000 description 3
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000001514 detection method Methods 0.000 description 3
- 230000005856 abnormality Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 2
- 238000004422 calculation algorithm Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 239000002699 waste material Substances 0.000 description 2
- 238000013461 design Methods 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3664—Environments for testing or debugging software
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/10—Active monitoring, e.g. heartbeat, ping or trace-route
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- General Health & Medical Sciences (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Health & Medical Sciences (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Cardiology (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention provides a network environment checking and repairing method, a system, a device and a medium of a testing machine, wherein the method comprises the following steps: the testing machine checks the network environment by locally sending a ping command before executing the test script; if the ping BMCIP and the OSIP are normal, the test script is continuously executed; if the ping BMCIP and the OSIP are abnormal, the test is quitted, and the test is returned to fail; if the ping BMCIP succeeds and the ping OSIP fails, checking whether the test machine is in a starting state or not by using a BMC instruction; if the power-off state is the power-off state, continuously sending a ping command to check the network environment after starting the computer; if the operation system is in the starting state, initializing and repairing the operation system, and continuously sending a ping command to check the network environment; and if the ping OSIP is successful and the ping BMCIP fails, carrying out BMC state repair and continuously sending a ping command to check the network environment.
Description
Technical Field
The invention relates to the technical field of computers, in particular to a network environment checking and repairing method, system, device and medium of a testing machine.
Background
With the advent of automated testing, more and more manual test cases are being replaced with automation. In the process of automatic testing, the precondition is to ensure that the machine configuration and the network environment before testing are normal. Wherein the machine configuration can only be completed by manual intervention, and the network problem can be automatically checked and recovered. The network environment is further divided into a BMC environment and an operating system environment.
The current test is only environment checked before the test starts, and no intervention is performed in the test process. Specifically, in the prior art, machine configuration and network environment inspection are completed before an automated testing task is started, and if a machine cannot be connected in the testing process, the testing is directly quitted and a testing failure is returned. That is to say, in the testing process, once network environment abnormality caused by conditions of power failure, network card dropping, failure in updating firmware version due to abnormal script and the like occurs, the execution of an automation task is affected, and the waste of time and machine resources is caused.
Disclosure of Invention
In view of the above problems, an object of the present invention is to provide a method, a system, a device, and a medium for checking and repairing a network environment of a tester, which can check and repair the network environment of the tester before executing a test script, thereby ensuring smooth performance of a current test.
In order to achieve the purpose, the invention is realized by the following technical scheme: a network environment checking and repairing method for a testing machine comprises the following steps:
the testing machine checks the network environment by locally sending a ping command before executing the test script;
if the ping BMCIP and the OSIP are normal, the test script is continuously executed;
if the ping BMCIP and the OSIP are not normal, the test is quitted, and the test is returned to fail;
if the ping BMCIP succeeds and the ping OSIP fails, using a BMC instruction to check whether the test machine is in a starting state; if the power-off state is the power-off state, continuously sending a ping command to check the network environment after starting the computer; if the network environment is in a starting state, initializing and repairing the operating system, and continuously sending a ping command to check the network environment;
if the ping OSIP is successful and the ping BMCIP fails, the BMC state is repaired, and a ping command is continuously sent to check the network environment.
Further, the continuing to send ping commands to check the network environment after the power-on includes:
executing a BMC starting instruction, after waiting for the first duration, pinging the OSIP again, and if the ping result is normal, continuing to execute the test script;
if the ping result is abnormal, the operating system is initialized and repaired, and a ping command is continuously sent to check the network environment.
Further, the performing the initialization repair of the operating system and continuing to send the ping command to check the network environment includes:
and after waiting for the second time length, ping the OSIP again, if the ping result is normal, continuing to execute the test script, if the ping result is abnormal, sending a BMC instruction to recover BIOS initialization and the BMC instruction to restart the machine, after waiting for the third time length, ping the OSIP again, if the ping result is normal, continuing to execute the test script, and if the result is not normal, quitting the test, and returning to test failure.
Further, the performing BMC status repair and continuing to send a ping command to check the network environment includes:
checking whether the BMC state is normal or not by sending an instruction under an operating system;
if the BMC state is normal, ping the BMCIP again after waiting for a fourth time period, and if the ping result is normal, continuing to execute the test script; if the ping result is abnormal, the BMC is restarted and then the BMCIP is ping again, and if the ping result is normal, the test script is continuously executed; if the ping result is abnormal, the BMC is re-brushed under the operating system, the BMCIP is ping again after waiting for the fifth time, if the ping result is normal, the test script is continuously executed, if the ping result is still not normal, the test is quitted, and the test failure is returned.
Further, ping BMCIP again after restarting BMC, comprising:
and setting the IP, the subnet mask and the default gateway of the BMC by using the instruction, and pinging the BMCIP again after waiting for a sixth time after restarting the BMC.
Further, the performing BMC status repair and continuing to send a ping command to check the network environment further includes:
if the BMC state is abnormal, the BMC is re-brushed under the operating system, the BMCIP is ping again after waiting for the fifth time, if the ping result is normal, the test script is continuously executed, if the ping result is still not normal, the test is quitted, and the test failure is returned.
Correspondingly, the invention also discloses a system for checking and repairing the network environment of the tester, which comprises the following components: a detecting unit for the tester checking the network environment by locally sending a ping command before executing the test script;
the execution unit is used for executing the test script when the ping BMCIP and the OSIP are both normal;
the exit unit is used for exiting the test and returning to the test failure when the ping BMCIP and the OSIP are abnormal;
the machine state checking unit is used for checking whether the test machine is in a starting state or not by using a BMC instruction when the ping BMCIP succeeds and the ping OSIP fails;
the boot unit is used for executing a BMC boot instruction when the boot unit is tested to be in a shutdown state;
the initialization unit is used for initializing and repairing the operating system;
and the repair unit is used for repairing the BMC state when the ping OSIP succeeds and the ping BMCIP succeeds.
Further, the initialization unit comprises a restart module, and the restart module is used for sending a BMC instruction to recover BIOS initialization and the BMC instruction to restart the machine; the repair unit comprises a refresh module, and the refresh module is used for refreshing BMC under the operating system.
Correspondingly, the invention discloses a network environment checking and repairing device of a testing machine, which comprises:
the memory is used for storing a network environment checking and repairing program of the tester;
a processor configured to implement the steps of the network environment checking and repairing method of the tester according to any one of the above items when executing the network environment checking and repairing program of the tester.
Correspondingly, the invention discloses a readable storage medium, wherein the readable storage medium stores a network environment checking and repairing program of a tester, and the network environment checking and repairing program of the tester is executed by a processor to realize the steps of the network environment checking and repairing method of the tester according to any one of the above items.
Compared with the prior art, the invention has the beneficial effects that: the invention provides a network environment checking and repairing method, system, device and medium of a testing machine, which can alternately use BMCIP or OSIP to check the network environment of the testing machine before a test script starts to be executed, if the network environment of the machine is good, the automatic testing step is continuously executed, if the network environment is abnormal, the repairing is carried out, and after the network environment is normal, the testing is continuously carried out, so that the testing machine achieves the aim of normal network environment. The automatic test can be efficiently operated, and the test efficiency is improved.
Therefore, compared with the prior art, the invention has prominent substantive features and remarkable progress, and the beneficial effects of the implementation are also obvious.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a process flow diagram of an embodiment of the present invention.
FIG. 2 is a system block diagram of an embodiment of the present invention.
In the figure, 1 is a detection unit; 2 is an execution unit; 3 is an exit unit; 4 is a machine state checking unit; 5 is a starting unit; 6 is an initialization unit; 7 is a repair unit; 8 is a restart module; and 9 is a refreshing module.
Detailed Description
The core of the invention is to provide a network environment checking and repairing method of a tester, in the prior art, the method is used for completing machine configuration and network environment checking before starting to execute an automatic test task, if a machine cannot be connected in the test process, the test is directly quitted, and test failure is returned. That is to say, in the testing process, once network environment abnormality caused by conditions of power failure, network card dropping, failure in updating firmware version and the like occurs, the execution of an automation task is affected, and the waste of time and machine resources is caused.
The network environment checking and repairing method of the tester provided by the invention comprises the steps that firstly, the tester checks the network environment by locally sending a ping command before executing a test script. And if the ping BMCIP and the OSIP are normal, continuously executing the test script. And if the ping BMCIP and the OSIP are abnormal, the test is quitted. Returning the test failure; if the ping BMCIP succeeds and the ping OSIP fails, checking whether the test machine is in a starting state or not by using a BMC instruction; if the power-off state is the power-off state, continuously sending a ping command to check the network environment after the power-on state is started; if the network environment is in the starting state, initializing and repairing the operating system, and continuously sending a ping command to check the network environment. If the ping OSIP is successful and the ping BMCIP fails, the BMC state is repaired, and a ping command is continuously sent to check the network environment. Therefore, the network environment of the testing machine can be checked and repaired before the test script is executed, and the smooth proceeding of the current test is ensured.
In order that those skilled in the art will better understand the disclosure, the invention will be described in further detail with reference to the accompanying drawings and specific embodiments. It is to be understood that the described embodiments are merely exemplary of the invention, and not restrictive of the full scope of the invention. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, belong to the protection scope of the present invention.
The first embodiment is as follows:
as shown in fig. 1, the present embodiment provides a method for checking and repairing a network environment of a tester, including the following steps:
s1: the tester checks the network environment by sending a ping locally before executing the test script.
S2: and if the ping BMCIP and the OSIP are normal, continuously executing the test script.
S3: if the ping BMCIP and the OSIP are abnormal, the test is quitted and the test is returned to fail.
S4: if the ping BMCIP succeeds and the ping OSIP fails, using a BMC instruction to check whether the test machine is in a starting state; if the power-off state is the power-off state, continuously sending a ping command to check the network environment after starting the computer; if the state is the starting state, initializing and repairing the operating system, and continuously sending a ping command to check the network environment.
Specifically, the method comprises the following steps:
and if the ping BMCIP succeeds and the ping OSIP fails, checking whether the test machine is in a starting state or not by using a BMC instruction.
If the terminal is in a shutdown state, executing a BMC startup instruction, after waiting for the first duration, pinging the OSIP again, and if the ping result is normal, continuing to execute the test script; and if the ping result is abnormal, ping the OSIP again after waiting for the second time length, if the ping result is normal, continuing to execute the test script, if the ping result is abnormal, sending a BMC instruction to recover BIOS initialization and the BMC instruction to restart the machine, waiting for the third time length, then ping the OSIP again, if the ping result is normal, continuing to execute the test script, if the result is still not normal, quitting the test, and returning to test failure.
And if the machine is in a starting state, ping OSIP again after waiting for the second time length, continuing to execute the test script if the ping result is normal, sending a BMC instruction to recover BIOS initialization and the BMC instruction to restart the machine if the ping result is abnormal, ping OSIP again after waiting for the third time length, continuing to execute the test script if the ping result is normal, and quitting the test and returning to test failure if the result is still not normal.
S5: if the ping OSIP succeeds and the ping BMCIP fails, the BMC state is repaired, and a ping command is continuously sent to check the network environment.
Specifically, the steps include:
if the ping OSIP is successful and the ping BMCIP fails, whether the BMC state is normal is checked by sending an instruction under the operating system.
If the BMC state is normal, ping the BMCIP again after waiting for a fourth time period, and if the ping result is normal, continuing to execute the test script; and if the ping result is abnormal, setting the IP, the subnet mask and the default gateway of the BMC by using the instruction, and after waiting for a sixth time after restarting the BMC, ping the BMCIP again. If the ping result is normal, continuing to execute the test script; if the ping result is abnormal, the BMC is re-brushed under the operating system, the BMCIP is ping again after waiting for the fifth time, if the ping result is normal, the test script is continuously executed, if the ping result is still not normal, the test is quitted, and the test failure is returned.
If the BMC state is abnormal, the BMC is re-brushed under the operating system, the BMCIP is ping again after waiting for the fifth time, if the ping result is normal, the test script is continuously executed, if the ping result is still not normal, the test is quitted, and the test failure is returned.
Based on the above description, the method can be implemented by the following script:
the embodiment provides a network environment checking and repairing method for a testing machine, which can alternately use BMCIP or OSIP to check the network environment of the testing machine before a test script starts to be executed, if the network environment of the testing machine is good, the automatic testing step is continuously executed, if the network environment is abnormal, the testing machine is repaired, and after the network environment is checked to be normal, the testing machine continues to test, so that the testing machine achieves the purpose of normal network environment. The automatic test can be efficiently operated, and the test efficiency is improved.
Example two:
based on the first embodiment, as shown in fig. 2, the present invention further discloses a network environment checking and repairing system for a testing machine, including: the device comprises a detection unit 1, an execution unit 2, an exit unit 3, a machine state checking unit 4, a starting unit 5, an initialization unit 6 and a repair unit 7.
A detection unit 1 for a tester to check a network environment by locally transmitting a ping command before executing a test script.
And the execution unit 2 is used for executing the test script when the ping BMCIP and the OSIP are both normal.
And the quitting unit 3 is used for quitting the test and returning to the test failure when the ping BMCIP and the OSIP are abnormal.
And the machine state checking unit 4 is used for checking whether the test machine is in a starting state or not by using a BMC instruction when the ping BMCIP succeeds and the ping OSIP fails.
And the starting unit 5 is used for executing a BMC starting instruction when the test is in a shutdown state.
And the initialization unit 6 is used for performing initialization repair of the operating system. Specifically, the initialization unit 6 includes a restart module 8, and the restart module 8 is configured to send a BMC instruction to resume BIOS initialization and the BMC instruction to restart the machine.
And the repair unit 7 is used for repairing the BMC state when the ping OSIP succeeds and the ping BMCIP succeeds. The repair unit 7 includes a refresh module 9, and the refresh module 9 is configured to refresh the BMC under the operating system.
The embodiment provides a network environment checking and repairing system of a testing machine, which can alternately use BMCIP or OSIP to check the network environment of the testing machine before a test script starts to be executed, if the network environment of the testing machine is good, the automatic testing step is continuously executed, if the network environment is abnormal, the testing machine is repaired, and the testing is continuously carried out after the testing machine is normally checked, so that the aim of enabling the network environment of the testing machine to be normal is fulfilled. The automatic test can be efficiently operated, and the test efficiency is improved.
Example three:
the embodiment discloses a network environment checking and repairing device of a tester, which comprises a processor and a memory; wherein the processor implements the following steps when executing the network environment checking and repairing program of the tester stored in the memory:
1. the tester checks the network environment by sending a ping locally before executing the test script.
2. And if the ping BMCIP and the OSIP are normal, continuously executing the test script.
3. And if the ping BMCIP and the OSIP are not normal, quitting the test and returning to the test failure.
4. If the ping BMCIP succeeds and the ping OSIP fails, using a BMC instruction to check whether the test machine is in a starting state; if the power-off state is the power-off state, continuously sending a ping command to check the network environment after the power-on state is started; if the network environment is in the starting state, initializing and repairing the operating system, and continuously sending a ping command to check the network environment.
5. If the ping OSIP succeeds and the ping BMCIP fails, the BMC state is repaired, and a ping command is continuously sent to check the network environment.
Further, the network environment inspecting and repairing apparatus of a tester in this embodiment may further include:
the input interface is used for acquiring network environment checking and repairing programs of the externally introduced testing machine, storing the acquired network environment checking and repairing programs of the testing machine into the memory, and also used for acquiring various instructions and parameters transmitted by external terminal equipment and transmitting the instructions and parameters into the processor, so that the processor can utilize the instructions and parameters to perform corresponding processing. In this embodiment, the input interface may 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, and the like.
And the output interface is used for outputting various data generated by the processor to the terminal equipment connected with the output interface, so that other terminal equipment connected with the output interface can acquire 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, and the like.
And the communication unit is used for establishing remote communication connection between the network environment checking and repairing device of the testing machine and the external server so that the network environment checking and repairing device of the testing machine can mount the image file into the external server. In this embodiment, the communication unit may specifically include, but is not limited to, a remote communication unit based on a wireless communication technology or a wired communication technology.
And the keyboard is used for acquiring various parameter data or instructions input by a user through real-time key cap knocking.
And the display is used for displaying relevant information in the short circuit positioning process of the power supply line of the running server in real time.
The mouse can be used for assisting a user in inputting data and simplifying the operation of the user.
Example four:
the present embodiments also disclose a readable storage medium, where the readable storage medium includes Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, a hard disk, a removable hard disk, a CD-ROM, or any other form of storage medium known in the art. The readable storage medium stores therein a network environment check and repair program for a tester, the network environment check and repair program for a tester, when executed by a processor, implementing the steps of:
1. the tester checks the network environment by sending a ping locally before executing the test script.
2. And if the ping BMCIP and the OSIP are normal, continuously executing the test script.
3. And if the ping BMCIP and the OSIP are not normal, quitting the test and returning to the test failure.
4. If the ping BMCIP succeeds and the ping OSIP fails, using a BMC instruction to check whether the test machine is in a starting state; if the power-off state is the power-off state, continuously sending a ping command to check the network environment after the power-on state is started; if the network environment is in the starting state, initializing and repairing the operating system, and continuously sending a ping command to check the network environment.
5. If the ping OSIP is successful and the ping BMCIP fails, the BMC state is repaired, and a ping command is continuously sent to check the network environment.
In summary, the present invention can check and repair the network environment of the tester before executing the test script, thereby ensuring the smooth performance of the current test.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other. The method disclosed by the embodiment corresponds to the system disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the description of the method part.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided by the present invention, it should be understood that the disclosed system, system and method can be implemented in other ways. For example, the above-described system embodiments are merely illustrative, and for example, the division of the units is only one logical functional division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed coupling or direct coupling or communication connection between each other may be through some interfaces, indirect coupling or communication connection of systems or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one position, or may be distributed on multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing unit, or each module may exist alone physically, or two or more modules are integrated into one unit.
Similarly, each processing unit in the embodiments of the present invention may be integrated into one functional module, or each processing unit may exist physically, or two or more processing units are integrated into one functional module.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
The network environment checking and repairing method, system, device and readable storage medium of the tester provided by the invention are described in detail above. The principles and embodiments of the present invention are explained herein using specific examples, which are presented only to assist in understanding the method and its core concepts. It should be noted that, for those skilled in the art, it is possible to make various improvements and modifications to the present invention without departing from the principle of the present invention, and those improvements and modifications also fall within the scope of the claims of the present invention.
Claims (10)
1. A network environment checking and repairing method for a tester is characterized by comprising the following steps:
the testing machine checks the network environment by locally sending a ping command before executing the test script;
if the ping BMCIP and the OSIP are normal, the test script is continuously executed;
if the ping BMCIP and the OSIP are not normal, the test is quitted, and the test is returned to fail;
if the ping BMCIP succeeds and the ping OSIP fails, checking whether the test machine is in a starting state or not by using a BMC instruction; if the power-off state is the power-off state, continuously sending a ping command to check the network environment after the power-on state is started; if the network environment is in a starting state, initializing and repairing the operating system, and continuously sending a ping command to check the network environment;
if the ping OSIP is successful and the ping BMCIP fails, the BMC state is repaired, and a ping command is continuously sent to check the network environment.
2. The method of claim 1, wherein continuing to send a ping command to check the network environment after the power-on comprises:
executing a BMC starting instruction, after waiting for the first duration, pinging the OSIP again, and if the ping result is normal, continuing to execute the test script;
if the ping result is abnormal, the operating system is initialized and repaired, and a ping command is continuously sent to check the network environment.
3. The network environment checking and repairing method of a tester according to claim 1 or 2, wherein the performing an operating system initialization repair and continuing to send a ping command to check the network environment comprises: and after waiting for the second time length, ping the OSIP again, if the ping result is normal, continuing to execute the test script, if the ping result is abnormal, sending a BMC instruction to recover BIOS initialization and the BMC instruction to restart the machine, after waiting for the third time length, ping the OSIP again, if the ping result is normal, continuing to execute the test script, and if the result is not normal, quitting the test, and returning to test failure.
4. The method for checking and repairing network environment of testing machine according to claim 1, wherein the performing BMC state repair and continuing to send ping command to check network environment comprises: whether the BMC state is normal is checked by sending an instruction under an operating system;
if the BMC state is normal, ping the BMCIP again after waiting for a fourth time period, and if the ping result is normal, continuing to execute the test script; if the ping result is abnormal, the BMC is restarted and then the BMCIP is ping again, and if the ping result is normal, the test script is continuously executed; if the ping result is abnormal, the BMC is re-brushed under the operating system, the BMCIP is ping again after waiting for the fifth time, if the ping result is normal, the test script is continuously executed, if the ping result is still not normal, the test is quitted, and the test failure is returned.
5. The network environment checking and repairing method of a tester according to claim 4, wherein the re-ping of BMCIP after restarting BMC comprises:
and setting the IP, the subnet mask and the default gateway of the BMC by using the instruction, and pinging the BMCIP again after waiting for a sixth time after restarting the BMC.
6. The method for checking and repairing network environment of testing machine according to claim 4, wherein the performing BMC state repair and continuing to send ping command to check network environment further comprises:
if the BMC is abnormal, the BMC is refreshed under the operating system, the BMCIP is ping again after waiting for the fifth time, if the ping result is normal, the test script is continuously executed, if the ping result is not normal, the test is quitted, and the test is returned to fail.
7. A network environment inspection and repair system for a tester, comprising:
a detecting unit for the tester checking the network environment by locally sending a ping command before executing the test script;
the execution unit is used for executing the test script when the ping BMCIP and the OSIP are both normal;
the exit unit is used for exiting the test and returning to the test failure when the ping BMCIP and the OSIP are abnormal;
the machine state checking unit is used for checking whether the test machine is in a starting-up state or not by using a BMC instruction when the ping BMCIP succeeds and the ping OSIP fails;
the boot unit is used for executing a BMC boot instruction when the test is in a shutdown state;
the initialization unit is used for initializing and repairing the operating system;
and the repair unit is used for repairing the BMC state when the ping OSIP succeeds and the ping BMCIP succeeds.
8. The system of claim 7, wherein the initialization unit comprises a restart module configured to send a BMC command to resume BIOS initialization and the BMC command to restart the machine;
the repair unit comprises a refresh module, and the refresh module is used for refreshing BMC under the operating system.
9. A network environment inspecting and repairing apparatus for a tester, comprising:
the memory is used for storing a network environment checking and repairing program of the tester;
a processor configured to implement the steps of the network environment check and repair method of a tester claimed in any one of claims 1 to 6 when executing the network environment check and repair program of the tester.
10. A readable storage medium, characterized by: the readable storage medium has stored thereon a network environment check and repair program for a tester, which when executed by a processor implements the steps of the network environment check and repair method for a tester claimed in any one of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210882827.4A CN115098403B (en) | 2022-07-26 | 2022-07-26 | Network environment checking and repairing method, system, device and medium for testing machine |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210882827.4A CN115098403B (en) | 2022-07-26 | 2022-07-26 | Network environment checking and repairing method, system, device and medium for testing machine |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115098403A true CN115098403A (en) | 2022-09-23 |
CN115098403B CN115098403B (en) | 2024-10-18 |
Family
ID=83298391
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210882827.4A Active CN115098403B (en) | 2022-07-26 | 2022-07-26 | Network environment checking and repairing method, system, device and medium for testing machine |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115098403B (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20170060671A1 (en) * | 2014-05-08 | 2017-03-02 | China Unionpay Co., Ltd. | Anomaly recovery method for virtual machine in distributed environment |
CN111130927A (en) * | 2019-12-04 | 2020-05-08 | 中国电子科技集团公司第三十研究所 | Method for automatically realizing service test of network layer communication terminal equipment |
CN111884879A (en) * | 2020-07-27 | 2020-11-03 | 深圳市元征科技股份有限公司 | Network detection method, device and related equipment |
-
2022
- 2022-07-26 CN CN202210882827.4A patent/CN115098403B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20170060671A1 (en) * | 2014-05-08 | 2017-03-02 | China Unionpay Co., Ltd. | Anomaly recovery method for virtual machine in distributed environment |
CN111130927A (en) * | 2019-12-04 | 2020-05-08 | 中国电子科技集团公司第三十研究所 | Method for automatically realizing service test of network layer communication terminal equipment |
CN111884879A (en) * | 2020-07-27 | 2020-11-03 | 深圳市元征科技股份有限公司 | Network detection method, device and related equipment |
Non-Patent Citations (1)
Title |
---|
付蝶;: "局域网常见断网故障及排除方法", 四川文理学院学报, no. 02, 10 March 2008 (2008-03-10) * |
Also Published As
Publication number | Publication date |
---|---|
CN115098403B (en) | 2024-10-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2022160756A1 (en) | Server fault positioning method, apparatus and system, and computer-readable storage medium | |
CN109510742B (en) | Server network card remote test method, device, terminal and storage medium | |
JP4746455B2 (en) | Computer apparatus, start control method, and start control program | |
CN110162435B (en) | Method, system, terminal and storage medium for starting and testing PXE of server | |
CN106547653B (en) | Computer system fault state detection method, device and system | |
CN112948190B (en) | Method, system and related device for testing hardware of server | |
CN112256505A (en) | Server stability testing method and device and related components | |
CN112506758A (en) | Firmware refreshing method and device, computer equipment and storage medium | |
CN115061885A (en) | Complete machine aging automatic test method and device, electronic equipment and storage medium | |
CN115934447A (en) | Display information acquisition method and device, electronic equipment and storage medium | |
CN113504932A (en) | Firmware data updating method and device | |
CN111858201A (en) | BMC (baseboard management controller) comprehensive test method, system, terminal and storage medium | |
CN115098403A (en) | Network environment checking and repairing method, system, device and medium for testing machine | |
CN115794525A (en) | BMC (baseboard management controller) pressure testing method, device, equipment and storage medium | |
CN115934446A (en) | Self-checking method, server, equipment and storage medium | |
CN113986635B (en) | BIOS testing method, system, storage medium and device | |
CN115168146A (en) | Anomaly detection method and device | |
CN115470056A (en) | Method, system, device and medium for troubleshooting power-on starting of server hardware | |
CN101533369A (en) | Method for checking start-up procedure and device thereof | |
CN114637669A (en) | Device management method, device and storage medium | |
CN111694587A (en) | Server PNOR firmware upgrading method, device, equipment and storage medium | |
CN113900934A (en) | Multi-mirror mixed refresh test method, system, terminal and storage medium | |
CN109684134B (en) | Method and server for rapidly deploying firmware settings among multiple devices | |
CN117149638B (en) | UI (user interface) automatic testing method and device, computer equipment and storage medium | |
CN106909489B (en) | Method and device for testing EventLog state |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant |