CN115454739A - Test information acquisition method and device, computer equipment and storage medium - Google Patents

Test information acquisition method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN115454739A
CN115454739A CN202211014181.4A CN202211014181A CN115454739A CN 115454739 A CN115454739 A CN 115454739A CN 202211014181 A CN202211014181 A CN 202211014181A CN 115454739 A CN115454739 A CN 115454739A
Authority
CN
China
Prior art keywords
test
test information
information acquisition
window
log file
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.)
Pending
Application number
CN202211014181.4A
Other languages
Chinese (zh)
Inventor
孙薇
刘宝塔
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202211014181.4A priority Critical patent/CN115454739A/en
Publication of CN115454739A publication Critical patent/CN115454739A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2284Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing by power-on test, e.g. power-on self test [POST]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3466Performance evaluation by tracing or monitoring
    • G06F11/3476Data logging

Abstract

The embodiment of the disclosure relates to a test information acquisition method and device, computer equipment and a storage medium. The test information acquisition method comprises the following main steps: establishing a session window of a window manager; executing the information acquisition instruction through the session window; in the process of the test of the current round, after the network connection state with the tested object is changed from a disconnection state to a connection state, the information acquisition instruction is continuously executed through the session window according to the execution progress stored by the window manager. In the AC on-off test process, when the tested object is disconnected from the control equipment due to power failure or restart, the session program for executing the task of acquiring the test information can still continuously run in the background of the control equipment, so that the stability of acquiring the test information of the AC on-off test is improved, and the condition that the test information of certain test turns is lost is avoided.

Description

Test information acquisition method and device, computer equipment and storage medium
Technical Field
The present disclosure relates to the field of testing technologies of computer devices, and in particular, to a method and an apparatus for obtaining test information, a computer device, and a storage medium.
Background
An AC (Alternating Current) on-off test may also be referred to as an AC test or an on-off test, which is often applied to detect the reliability of a server.
For a series of problems such as downtime, black screen or disk dropping in the restarting process of a system of a server, when a tester cannot analyze the problem on the basis of the existing test information, the tester generally selects to repeat the previous test and hopes to reproduce the problem, and at the moment, the tester usually records the test information in a SOL (Serial Over Lan, serial port accessed through network) printing mode.
However, in the AC on-off test process, multiple rounds of tests are usually required, that is, the server needs multiple rounds of steps of repeatedly performing power-off and power-on restart, and a conventional automatic test thread running on the control device is easily affected by network interruption between the control device and the server, so that SOL printing interruption occurs, and test information of some rounds of tests is lost.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a test information acquisition method, apparatus, computer device, and storage medium capable of stably acquiring AC on-off test information.
In a first aspect, an embodiment of the present disclosure provides a method for acquiring test information, where the method includes:
responding to an operation instruction of the window manager, and establishing a conversation window for running in a background;
establishing network connection with the tested object through a session window, and acquiring test information output by a remote serial port of the tested object; the test information comprises a test log of the tested object in the power-on and power-off test process;
and when the obtained test information contains the specific identification character, saving the record file of the test in the current round.
In some embodiments, the object to be tested is a server, and the obtaining of the test information output by the remote serial port of the object to be tested includes:
and acquiring a test log in a register of a basic input and output system of the tested object through a remote serial port.
In some embodiments, establishing a network connection with a measurand includes:
and establishing network connection with the substrate management controller of the object to be tested according to the pre-stored Internet protocol address, user name and password of the substrate management controller.
In some embodiments, the test information obtaining method further comprises: and writing the test information output from the remote serial port of the tested object into a log file corresponding to the session window. When the obtained test information contains the specific identification character, the record file of the test in the current round is saved, and the method comprises the following steps:
when the specific identification character exists in the log file, modifying the name of the log file;
and saving the log file with the modified name as a record file of the test of the current round.
In some embodiments, the test information obtaining method further includes: and judging whether the terminal position in the log file has a specific identification character or not. When the specific identification character exists in the log file, modifying the name of the log file, including: when a specific identification character exists at the end position in the log file, the name of the log file is modified.
In some embodiments, determining whether a particular identification character is present at an end location within the log file comprises:
after the system of the tested object is restarted every time, whether the terminal position in the log file has the specific identification character or not is judged.
In some embodiments, the test information obtaining method further includes:
detecting the power state of the object to be detected;
when the obtained test information contains the specific identification character, stopping accessing the remote serial port of the tested object, and closing the session window;
and when the current round of test is a non-last round of test and the power state of the tested object is detected to be a power-off state, after waiting for a preset time, returning to the step of responding to an operation instruction of the window manager and establishing a session window for running in a background so as to execute the test information acquisition operation of a new round of test.
In a second aspect, an embodiment of the present disclosure provides a test information acquiring apparatus, including:
the session window establishing module is used for responding to an operation instruction of the window manager and establishing a session window which runs in a background;
the test information acquisition module is used for establishing network connection with the tested object through the session window and acquiring test information output by a remote serial port of the tested object; the test information comprises a test log of the tested object in the power-on and power-off test process;
and the file storage module is used for storing the record file of the current test when the acquired test information contains the specific identification character.
In a third aspect, the disclosed embodiments provide a computer device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program:
responding to an operation instruction of the window manager, and establishing a conversation window for running in a background;
establishing network connection with the tested object through a session window, and acquiring test information output by a remote serial port of the tested object; the test information comprises a test log of the tested object in the power on and power off test process;
and when the acquired test information contains the specific identification character, saving the record file of the test in the current round.
In a fourth aspect, the disclosed embodiments provide a computer-readable storage medium having a computer program stored thereon, the computer program, when executed by a processor, implementing the steps of:
responding to an operation instruction of the window manager, and establishing a conversation window for running in a background;
establishing network connection with the tested object through a session window, and acquiring test information output by a remote serial port of the tested object; the test information comprises a test log of the tested object in the power on and power off test process;
and when the obtained test information contains the specific identification character, saving the record file of the test in the current round.
According to the test information acquisition method, the test information acquisition device, the computer equipment and the storage medium, during implementation, a background running session window is established through the window manager to execute a task of acquiring test information, in the AC on-off test process, when a tested object is disconnected from a control device due to power failure or restart, a session program for executing the task of acquiring the test information can still continuously run in the background of the control device, and after network connection is recovered, new test information is continuously acquired on the original progress of the control device on the test information of the tested object, so that the stability of the test information acquisition of the AC on-off test is improved, and the condition that the test information of certain test rounds is lost is avoided; by identifying the judgment of the specific identification characters, the method is beneficial to automatically storing the record file of each test without manual intervention or intervention in the process of multi-test, and the test efficiency is also improved.
Drawings
FIG. 1 is a diagram of an application environment for a method of test information acquisition in some embodiments;
FIG. 2 is a flow diagram illustrating a method for obtaining test information in some embodiments;
FIG. 3 is a flowchart of steps involved in modifying log file names in some embodiments;
FIG. 4 is a block diagram of a test information acquisition device in some embodiments;
FIG. 5 is a diagram of the internal structure of a computer device in some embodiments;
FIG. 6 is a diagram of an internal structure of yet another computer device in some embodiments.
Detailed Description
In order to make the objects, technical solutions and advantages of the present disclosure more clearly understood, the present disclosure is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present disclosure and are not intended to limit the present disclosure.
The test information acquisition method provided by the embodiment of the disclosure can be applied to the application environment shown in fig. 1. Among them, the control device 101 can communicate with the object under test 102 through a network. The control device 101 may acquire test information output by the object 102 through a remote serial port. The control device 101 may be a server or a terminal. The object 102 may be a server or a terminal. The server may be implemented by a single server or a server cluster composed of a plurality of servers, and the terminal may be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices.
Taking the example of the application of the test information acquisition method to the control device 101 in fig. 1 as an example, in some embodiments, the control device 101 is a terminal, as shown in fig. 2, the test information acquisition method includes steps S201, S202, and S203 that the control device 101 can perform, and the steps are explained below.
Step S201, a new session window of the window manager is created.
The window manager, which may also be referred to as a window management tool, is software running on a computer. The window manager is a tmux (Terminal Multiplexer) or other window managers with session management and automatic session recovery functions, and these window managers can ensure that the task executed by the current session window continues to run even in the case of abnormal network drop, and ensure that the work site is not lost.
The conversation window is used to record, manage conversation messages or execute incoming conversation instructions. After the session window is newly built, the session window can be graphically rendered and displayed on the display screen.
In general, the window manager may respond to the operation of the new session window, such as the operation of triggering the widget of the window manager for the new session window by the user through an information input component, such as a mouse or a keyboard, or by running a preset script program, so as to execute step S201. The preset script program can be used for controlling the window manager to automatically execute corresponding instructions without manual intervention, for example, the window manager can be controlled to newly establish a session window, the configuration file of the window manager can be changed, and some instructions can be input into the session window and run through the session window.
Step S202, the information acquisition instruction is executed through the conversation window. The information obtaining instruction is used for instructing to obtain the test information output by the remote serial port of the object 102 to be tested.
Generally, a user can input an information acquisition instruction in the session window through an information input component such as a mouse or a keyboard, so that the session window executes the information acquisition instruction. In addition, a pre-stored information acquisition instruction can be automatically input into the conversation window by running a preset script program.
The remote Serial port may be SOL (Serial Over Lan, serial port accessed through network) or other Serial port capable of accessing the tested object remotely through network.
Generally, the control device 101 may establish a remote network connection with the object under test 102 in advance, so that when the control device 101 executes an information acquisition instruction through the session window, a test information acquisition request is sent to the object under test 102, and after receiving the test information acquisition request, the object under test 102 outputs the test information through a remote serial port and sends the test information to the control device 101. It can be seen that the information acquisition instruction is used to instruct the control apparatus 101 to acquire test information to the object 102 to be tested.
The test information includes a test log generated by the object 102 during the AC on-off test.
Step S203, in the process of the current round of test, after the network connection state with the object 102 is changed from the disconnection state to the connection state, the information acquisition instruction is continuously executed through the session window according to the execution progress saved by the window manager.
In the AC on-off test process, multiple rounds of tests are usually performed, that is, the tested object 102 needs multiple rounds of steps of repeatedly performing power-off and power-on restart. Under normal conditions, in each round of test process, the object to be tested 102 executes the test task of the round, and will automatically disconnect the network connection with the control device 101, then power off, power on, restart, and enter the system again. However, sometimes the situation of abnormal disconnection occurs due to a failure of the object under test 102 itself or due to other reasons in the network between the control device 101 and the object under test 102, and at this time, in the present round of test, the process of the control device 101 to acquire the test information will have to be interrupted. Due to the adoption of the window manager, the work process corresponding to the information acquisition instruction operated through the session window is stored, and after the control device 101 and the tested object 102 recover the network connection next time, the information acquisition instruction can be continuously executed on the basis of the completed progress.
The network connection state is a disconnection state, which indicates that the network connection between the control device 101 and the object 102 to be tested is disconnected; the network connection state is a connected state, which indicates that the network connection between the control device 101 and the object to be measured is not disconnected.
The execution progress stored by the window manager represents the running progress of the process for acquiring the test information stored by the window manager, or represents the execution progress of the information acquisition instruction. For example, there may be several test items corresponding to a certain round of test, and when the test of a part of the test items is completed, an event that the network connection state is a disconnection state occurs, at this time, the control device 101 cannot continue to acquire the test information of the remaining test items. And according to the execution progress stored by the window manager, namely the progress information of the test information corresponding to part of the test items is stored, after the network connection state is changed into the connected state, the information acquisition instruction can be continuously executed through the session window so as to continuously acquire the test information of the rest of the test items.
Generally, the object 102 to be tested may run an AC on-off test program by itself, and the control device 101 may not participate in controlling the object 102 to perform operations such as power-off and power-on restart, and only needs to obtain test information of the object 102 to be tested. In some optional embodiments, the control device 101 may also write a control instruction for controlling the object under test 102 to execute a corresponding test item into a preset script program, and by running the script program, input a test control instruction in the session window, and run the test control instruction through the session window, so that the object under test 102 executes the test control instruction, thereby performing the AC on-off test. The instruction for controlling the test includes an instruction for controlling the object under test 102 to perform a plurality of power-on and power-off tests, for example, controlling the object under test 102 to perform a power-on operation or a power-off operation. At this time, if a network interrupt occurs during a certain round of test, the instruction for controlling the test may be continuously executed through the session window according to the execution progress saved by the window manager. Therefore, the execution progress held by the window manager may include the execution progress of the information acquisition instruction of the control apparatus 101, or the execution progress of the instruction of the control test of the control apparatus 101.
In the test information acquisition method, during implementation, a session window running in a background is established through a window manager, a task of acquiring test information is executed, in the AC on-off test process, when a tested object is disconnected from a control device due to power failure or restart, a session program executing the task of acquiring the test information can still continuously run in the background of the control device, and after network connection is recovered, new test information is continuously acquired on the original progress of the control device on the test information of the tested object, so that the stability of acquiring the test information of the AC on-off test is improved, and the condition that the test information of certain test rounds is lost is avoided; by identifying the judgment of the specific identification characters, the method is beneficial to automatically storing the record file of each test without manual intervention or intervention in the process of multi-test, and the test efficiency is also improved.
Take the operating system adopted by the control device 101 as a Linux system and the window manager as tmux as an example. Here, the mounting method of tmux is briefly described.
First, tmux may be installed using the yum (Yellow Dog Update Manager, a software package Manager developed to resolve package dependencies).
Second, a tmux plug-in tmux-restore may be installed for the saving of the tmux session. tmux-cururrent may save information such as current session, panel partition, etc., and may also be configured to recover the execution progress of some instructions.
In addition, the contents of the following commands may be added to the configuration file of tmux:
set-g@plugin'tmux-plugins/tpm'
set-g@plugin'tmux-plugins/tmux-sensible'
run-b'~/.tmux/plugins/tpm/tpm’
set-option-gprefix2`
run-shell~/.tmux/tmux-resurrect/resurrect.tmux。
the name of the configuration file for tmux is usually suffixed with ". Tmux.conf".
Subsequently, the configuration file of tmux may be reloaded to make it effective, and at this time, tmux may be used to newly create a session window.
In some optional embodiments, the object under test 102 is a server, and the information obtaining instruction is used to instruct to obtain, through a remote serial port, a test log in a register of a Basic Input Output System (BIOS) of the object under test 102. The bios may be a set of programs that are fixed on a ROM (Read-Only Memory) chip on a motherboard in the computer, and stores the most important bios programs, a self-test program after power-on, and a system self-start program.
In some embodiments, the test information acquisition method further includes the steps of: and executing the network connection instruction through the session window. The network connection instruction is used for instructing to establish network connection with the baseboard management controller of the tested object 102 according to the pre-stored internet protocol address, the pre-stored user name and the pre-stored password of the baseboard management controller. Specifically, the object 102 to be tested includes a baseboard management controller, and the network connection instruction is used to instruct the control device 101 to establish a network connection with the baseboard management controller of the object 102 to be tested according to an Internet Protocol Address (IP), a user name, and a password of the baseboard management controller. In some alternative embodiments, the internet protocol address, the user name, and the password of the bmc may be pre-written into the configuration file of the window manager, and the network connection instruction is used to instruct the bmc to read the internet protocol address, the user name, and the password from the configuration file of the window manager, so as to establish a network connection with the bmc of the dut 102.
In general, the information acquisition instruction may be executed after the network connection instruction is executed to cause the control device 101 to perform network connection with the object 102 to be tested.
In some embodiments, as shown in fig. 3, the test information obtaining method may further include the steps of:
step S301, writing the acquired test information into a log file corresponding to a session window;
step S302, when the preset identification characters exist in the log file, the name of the log file is modified;
and step S303, saving the log file with the modified name as a record file of the current test.
Generally, the content of the session may be saved in a log file corresponding to the session window, and taking tmux as an example, the content of the session may be saved in a log file with a name of "tmux-client-xxx.log", where "xxx" represents a specific character that may be generated by definition or by default, and the log file may be a file automatically generated by the window manager and used for storing the content of the session by default. In order to distinguish the test information corresponding to each round of test, the test information corresponding to each round of test may be saved in a log file. For example, the test information of the current round of test is written into a log file which is generated by a window manager in a default mode, after the current round of test is completed, the name of the log file is modified and then the log file is stored as a recording file of the current round of test; the test information of the next round of test can be continuously written into the default generated log file, after the next round of test is completed, the name of the log file is modified and then the log file is used as a recording file of the next round of test to be stored.
Generally, for the AC on-off test, since the steps performed in each test round may be the same, the corresponding test information will carry the same identification characters after each test round is completed. Therefore, when the preset identification characters exist in the log file, the fact that the test information of the current test is obtained is judged, and the test information obtained in the future belongs to the next test can be judged.
Different types, configurations of test objects 102, and different flows of AC on-off testing may correspond to different identification characters, which may generally indicate the end of the test round recorded in the test information of the registers of the bios. Taking the preset identification character as "enableltrolscrubartendofpost callback" as an example, if the corresponding test information has "enableltrolscrubartendofpost callback" when each round of test is finished, the log file with the name of "tmux-client-xxx.log" character can be detected accordingly, and if "enableltscrubartendofpost callback" is detected from the log file, the completion of the acquisition of the test information of the round of test can be judged. In other alternative embodiments, other preset identification characters may also be used, and are not limited herein.
For the complete test information of a round of test, after the test information is written into the log file corresponding to the session window, a predetermined identification character usually exists at the end in the log file. In some embodiments, the test information obtaining method further includes: and judging whether the tail end position in the log file has the identification character or not. When the preset identification characters exist in the log file, the method for modifying the name of the log file comprises the following steps: when a specific identification character exists at the end position in the log file, the name of the log file is modified.
In some optional embodiments, determining whether a specific identification character exists at an end position within the log file comprises: after the system of the tested object is restarted each time, whether the terminal position in the log file has the specific identification character or not is judged.
The terminal position may refer to a plurality of lines at the end in the log file, a last string of characters at the end in the log file, or a position where a certain number of characters at the end in the log file are located.
In some embodiments, the test information obtaining method may further include the steps of:
detecting the power state of the object 102;
when the acquired test information contains the specific identification character, stopping accessing the remote serial port of the object to be tested 102 and closing the session window;
when the current test is a non-final test and the power state of the tested object 102 is detected to be a power-off state, after waiting for a preset time, returning to the step of responding to an operation instruction of the window manager and establishing a session window for running in a background so as to execute the test information acquisition operation of a new test.
The power states include a power-up state and a power-down state. When the tested object 102 executes a plurality of rounds of AC power-on and power-off tests, when the current round of tests is a non-last round of tests and the current round of tests is completed, the tested object 102 needs to execute a power-off operation, then executes a power-on operation, and restarts to enter a next round of tests, namely a new round of tests. When the obtained test information contains the specific identification character, the test in the current round is finished, at this time, the access to the remote serial port of the tested object 102 can be stopped, the corresponding session window is closed, and the name of the corresponding log file is modified and stored as the record file of the test in the current round. Meanwhile, when detecting that the power state of the object 102 is a power-off state, the preset duration may be waited, and then step S201 and step S202 are continuously executed to start the test information acquisition of the next test; of course, after continuing to execute step S201 and step S202, step S203 may also be continued.
The aforementioned preset time period may be 15 seconds, 20 seconds or other time period, and may be generally set according to the time required by the object under test 102 from the time of performing the power-off operation, the time of performing the power-on operation to the time of activating the board management controller. The step S201 is executed again after waiting for the preset duration, which is beneficial to saving computer operating resources and avoiding the situation that the control device 101 frequently sends a network connection request to the object 102 to be tested when the object 102 to be tested is not powered on or the baseboard management controller is not activated.
In some optional embodiments, the power state of the object under test 102 is detected, when the power state is a power-on state and the acquired test information includes a specific identifier character, the access to the remote serial port of the object under test 102 is stopped, the object under test 102 is controlled to perform a power-off operation through the session window, and then the session window is closed. Firstly, the access to the remote serial port is stopped, and then the tested object 102 is controlled to execute the power-off operation, so that the program for obtaining the test information can be more reasonable.
In some optional embodiments, the number of the objects to be tested may be multiple, and the multiple objects to be tested include the object to be tested 102, in this case, the control device 101 may establish a network connection with the multiple objects to be tested, respectively, and perform the test information obtaining method in the above embodiment for each object to be tested. At this time, the control device may establish a plurality of session windows, each of which corresponds to a certain round of testing of one of the objects to be tested. Therefore, the AC on-off test can be simultaneously performed on a plurality of tested objects, the test information of the plurality of tested objects can be efficiently acquired by using the control equipment 101, and the control equipment required by the test link can be saved.
It should be understood that although the steps in the flowcharts of fig. 2 and 3 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps shown in fig. 2 and 3, as well as other embodiments, relate to steps that are not performed in the exact order in which they are performed unless explicitly stated herein, and may be performed in other orders. Moreover, at least a portion of the steps of the foregoing embodiments may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of performing the sub-steps or stages is not necessarily sequential, but may be performed alternately or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
In some embodiments, as shown in fig. 4, there is provided a test information obtaining apparatus 400, including a session window establishing module 401, a test information obtaining module 402, and a file saving module 403, where:
a session window establishing module 401, configured to respond to an operation instruction to the window manager, and establish a session window for running in a background;
a test information acquisition module 402, configured to establish a network connection with a tested object through a session window, and acquire test information output by a remote serial port of the tested object; the test information comprises a test log of the tested object in the power-on and power-off test process;
the file saving module 403 is configured to save a record file of the current round of test when the obtained test information includes the specific identifier character.
In some embodiments, the object to be tested is a server, and the information obtaining instruction is used to instruct to obtain the test log in the register of the bios of the object to be tested through a remote serial port.
In some embodiments, the test information acquiring apparatus 400 further includes a network connection module (not shown) for executing the network connection instruction through the session window. And the network connection instruction is used for indicating that network connection is established with the baseboard management controller of the tested object according to the pre-stored Internet protocol address, the user name and the password of the baseboard management controller.
In some embodiments, the test information acquisition apparatus 400 further includes:
an information writing module (not shown) for writing the acquired test information into a log file corresponding to the session window;
a name modification module (not shown) for modifying the name of the log file when a preset identification character exists in the log file;
and an information saving module (not shown) for saving the log file with the modified name as a record file of the current test.
In some embodiments, the test information acquiring apparatus 400 further includes a determining module (not shown) for determining whether the identification character exists at the end position in the log file. Correspondingly, the name modification module comprises a log file name modification unit, and the log file name modification unit is used for modifying the name of the log file when a specific identification character exists at the tail end position in the log file.
In some embodiments, the determining module includes a specific identification character determining unit, configured to determine whether a specific identification character exists at an end position in the log file after each restart of the system of the object under test.
In some embodiments, the test information acquisition apparatus 400 further includes:
a power state detection module (not shown) for detecting a power state of the object to be measured;
a session window closing module (not shown) for stopping accessing the remote serial port of the tested object and closing the session window when the obtained test information contains the specific identification character;
and a program returning module (not shown) for returning to the step of establishing a session window for running in the background in response to an operation instruction to the window manager after waiting for a preset time period when the current test is a non-last test and the power state of the tested object is detected to be a power-off state, so as to execute a test information acquisition operation of a new test.
For specific limitations of the test information acquisition apparatus 400, reference may be made to the above limitations of the test information acquisition method, which are not described herein again. The modules in the test information acquiring apparatus 400 may be wholly or partially implemented by software, hardware, or a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In some embodiments, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 5. The computer device comprises a processor, a memory and a network interface which are connected through a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The nonvolatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement the test information acquisition method in any of the embodiments.
In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 6. The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operating system and the computer program to run on the non-volatile storage medium. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement the test information acquisition method in any of the embodiments. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on a shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the configurations shown in fig. 5 or 6 are merely block diagrams of portions of configurations associated with embodiments of the present disclosure, and do not constitute limitations on the computing devices to which embodiments of the present disclosure may be applied, as a particular computing device may include more or less components than shown, or combine certain components, or have a different arrangement of components.
In some embodiments, there is provided a computer device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program:
a session window of a window manager is newly established;
executing the information acquisition instruction through the session window; the information acquisition instruction is used for indicating to acquire test information output by a remote serial port of the object to be tested;
in the process of the current round of test, after the network connection state of the tested object is changed from a disconnection state to a connection state, the information acquisition instruction is continuously executed through the session window according to the execution progress stored by the window manager.
In other embodiments, the processor, when executing the computer program, may also implement other steps of the test information acquisition method herein.
In some embodiments, there is provided a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of:
establishing a session window of a window manager;
executing the information acquisition instruction through the session window; the information acquisition instruction is used for indicating to acquire test information output by a remote serial port of the tested object;
in the process of the current round of test, after the network connection state of the tested object is changed from a disconnection state to a connection state, the information acquisition instruction is continuously executed through the session window according to the execution progress stored by the window manager.
In one embodiment, the computer program, when executed by the processor, may also implement other steps of the test information acquisition method herein.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a non-volatile computer-readable storage medium, and can include the processes of the embodiments of the methods described above when the computer program is executed. Any reference to memory, storage, databases, or other media used in the embodiments provided in the disclosure may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), rambus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above examples only express several embodiments of the present disclosure, and the description thereof is more specific and detailed, but not to be construed as limiting the scope of the present disclosure. It should be noted that, for those skilled in the art, various changes and modifications can be made without departing from the concept of the present disclosure, and these changes and modifications are all within the scope of the present disclosure. Therefore, the protection scope of the present disclosure should be subject to the appended claims.

Claims (10)

1. A test information acquisition method, characterized in that the method comprises:
establishing a session window of a window manager;
executing an information acquisition instruction through the conversation window; the information acquisition instruction is used for indicating to acquire test information output by a remote serial port of the object to be tested;
in the process of the current round of test, after the network connection state with the tested object is changed from a disconnection state to a connection state, the information acquisition instruction is continuously executed through the conversation window according to the execution progress saved by the window manager.
2. The method of claim 1, wherein the object under test is a server, and the information obtaining instruction is used to instruct to obtain, through the remote serial port, a test log in a register of a basic input output system of the object under test.
3. The method of claim 2, further comprising:
executing a network connection instruction through the session window; and the network connection instruction is used for indicating that network connection is established with the baseboard management controller of the tested object according to the prestored Internet protocol address, the prestored user name and the prestored password of the baseboard management controller.
4. The method of claim 1, further comprising:
writing the obtained test information into a log file corresponding to the session window;
when the preset identification characters exist in the log file, modifying the name of the log file;
and saving the log file with the modified name as a record file of the test of the current round.
5. The method of claim 4, further comprising: judging whether the terminal position in the log file has the identification character or not;
when the preset identification character exists in the log file, modifying the name of the log file, including: and modifying the name of the log file when the specific identification character exists at the tail end position in the log file.
6. The method of claim 5, wherein the determining whether the specific identification character is present at the end position in the log file comprises:
and after the system of the tested object is restarted every time, judging whether the terminal position in the log file has the specific identification character or not.
7. The method according to any one of claims 1 to 6, further comprising:
detecting the power state of the measured object;
when the acquired test information contains a specific identification character, stopping accessing the remote serial port of the tested object, and closing the session window;
and when the current test is a non-final test and the power state of the tested object is detected to be a power-off state, after waiting for a preset time, returning to the step of responding to an operation instruction of the window manager and establishing a session window for running in a background so as to execute the test information acquisition operation of a new test.
8. A test information acquisition apparatus, characterized in that the apparatus comprises:
the session window establishing module is used for responding to an operation instruction of the window manager and establishing a session window which runs in a background;
the test information acquisition module is used for establishing network connection with the tested object through the session window and acquiring test information output by a remote serial port of the tested object; the test information comprises a test log of the tested object in the power-on and power-off test process;
and the file storage module is used for storing the record file of the current test when the obtained test information contains the specific identification character.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method of any of claims 1 to 7 are implemented when the computer program is executed by the processor.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.
CN202211014181.4A 2022-08-23 2022-08-23 Test information acquisition method and device, computer equipment and storage medium Pending CN115454739A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211014181.4A CN115454739A (en) 2022-08-23 2022-08-23 Test information acquisition method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211014181.4A CN115454739A (en) 2022-08-23 2022-08-23 Test information acquisition method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115454739A true CN115454739A (en) 2022-12-09

Family

ID=84298201

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211014181.4A Pending CN115454739A (en) 2022-08-23 2022-08-23 Test information acquisition method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115454739A (en)

Similar Documents

Publication Publication Date Title
TWI470420B (en) Dubugging method and computer system using the smae
CN112506758A (en) Firmware refreshing method and device, computer equipment and storage medium
CN111338698A (en) Method and system for accurately booting server by BIOS (basic input output System)
CN111984490A (en) Warning device, method, equipment and medium for illegal operating system starting item
JP4886558B2 (en) Information processing device
CN113315675B (en) White box switch U-Boot automatic testing method, system and storage medium
WO2022217484A1 (en) Method and apparatus for testing vehicle-mounted sensor system, and computer device
CN112433769A (en) BMC starting method and device, computer equipment and storage medium
CN114138587B (en) Method, device and equipment for verifying reliability of server power firmware upgrade
CN115454739A (en) Test information acquisition method and device, computer equipment and storage medium
CN112199282B (en) Fuzzy test method, device and equipment for office software
JP7426269B2 (en) Information processing equipment and information processing system
CN111400113B (en) Complete machine self-checking method, device and system of computer system
WO2019169615A1 (en) Method for accessing code sram, and electronic device
JP2015130023A (en) Information recording device, information processor, information recording method and information recording program
CN114385379B (en) Method, system, terminal and storage medium for detecting on-board information refreshing
JPH0962534A (en) Self-diagnostic method for electronic computer
CN116954820A (en) Dump file management method, device, computer equipment and storage medium
CN115454744A (en) Test control method, system, device, computer equipment and storage medium
CN115686960A (en) Test method, test device, electronic equipment and storage medium
CN116643967A (en) Method, system, device and medium for verifying BIOS repair result
CN114780311A (en) D3hot state forward and backward test method and device based on Linux system
CN117221160A (en) Detection method, first node and computer readable storage medium
CN115114053A (en) Hard disk reliability test method, system, storage medium and equipment
CN113821387A (en) KVM function keep-alive test method, device, equipment and medium

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