Test information acquisition method and device, computer device and storage medium

By using the window manager to create a background session window during AC connectivity testing, the problem of test information loss caused by network interruption was solved, and the effect of stably obtaining server test information was achieved.

CN115454739BActive Publication Date: 2026-02-17INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211014181.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-23
Publication Date
2026-02-17
Estimated Expiration
2042-08-23

AI Technical Summary

Technical Problem

During AC connectivity testing, traditional automated testing threads are easily affected by network interruptions, leading to the loss of test information. Existing technologies cannot reliably obtain test information from the server.

Method used

By establishing a background session window and utilizing a window manager such as tmux, the stability of the remote serial port connection can be achieved. Specific identifier characters can be identified to automatically save test log files, ensuring that test information can continue to be obtained after the network is restored.

Benefits of technology

It improves the stability of test information acquisition in AC power-on/off testing, avoids test information loss, improves test efficiency, and eliminates the need for manual intervention.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115454739B_ABST
    Figure CN115454739B_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure relate to a test information acquisition method and device, computer equipment and a storage medium. The test information acquisition method comprises the following main steps: a session window of a new window manager is created; an information acquisition instruction is executed through the session window; during the current test, after the network connection state with the tested object changes from a disconnected state to a connected state, the information acquisition instruction is continued to be executed through the session window according to the execution progress saved by the window manager. During the AC on-off test, when the tested object is disconnected from the control device due to power failure or restart, the session program for executing the task of acquiring test information can still run continuously in the background of the control device, improving the stability of the test information acquisition of the AC on-off test and avoiding the loss of test information in some test rounds.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer equipment testing technology, and in particular to a method, apparatus, computer equipment, and storage medium for acquiring test information. Background Technology

[0002] AC (Alternating Current) continuity test, also known as AC test or power-on / off test, is often used to test the reliability of servers.

[0003] When a server system experiences a series of problems such as crashes, black screens, or disk failures during a restart, and testers are unable to analyze the problem based on existing test information, they will generally choose to repeat the previous test in hopes of reproducing the problem. In this case, test information is usually recorded by printing SOL (Serial Over LAN, serial port accessed via network).

[0004] However, since AC continuity testing usually requires multiple rounds of testing, meaning the server needs to repeatedly execute the power-off and power-on restart steps, traditional automated test threads running on the control device are easily affected by network interruptions between the control device and the server, resulting in SOL printing interruptions and the loss of test information from some rounds of testing. Summary of the Invention

[0005] Therefore, it is necessary to provide a test information acquisition method, apparatus, computer equipment, and storage medium that can reliably acquire AC on / off test information to address the above-mentioned technical problems.

[0006] In a first aspect, embodiments of this disclosure provide a method for obtaining test information, the method comprising:

[0007] In response to commands to the window manager, create a session window for running in the background;

[0008] Through the session window, a network connection is established with the object under test to obtain the test information output remotely by the object under test; the test information includes the test log of the object under test during the power-on and power-off test process;

[0009] If the obtained test information contains specific identifier characters, save the record file for this round of testing.

[0010] In some embodiments, the object under test is a server, and the test information output by the remote serial port of the object under test is obtained, including:

[0011] The test logs in the registers of the basic input / output system of the object under test are obtained via a remote serial port.

[0012] In some embodiments, establishing a network connection with the object under test includes:

[0013] Establish a network connection with the baseboard management controller of the object under test based on the pre-stored Internet Protocol address, username and password of the baseboard management controller.

[0014] In some embodiments, the test information acquisition method further includes: writing test information output from the remote serial port of the object under test into a log file corresponding to the session window. When the acquired test information contains specific identifier characters, the record file for this round of testing is saved, including:

[0015] If a specific identifier character exists in the log file, modify the name of the log file;

[0016] Save the renamed log file as the record file for this round of testing.

[0017] In some embodiments, the test information acquisition method further includes: determining whether a specific identifier character exists at the end of the log file. If the specific identifier character exists in the log file, the name of the log file is modified, including: modifying the name of the log file when the specific identifier character exists at the end of the log file.

[0018] In some embodiments, determining whether a specific identifier character exists at the end of the log file includes:

[0019] After each system restart, check if a specific identifier character exists at the end of the log file.

[0020] In some embodiments, the test information acquisition method further includes:

[0021] Detect the power status of the object under test;

[0022] If the obtained test information contains specific identifier characters, stop accessing the remote serial port of the object under test and close the session window;

[0023] In this round of testing, which is not the final round, and when the power status of the tested object is detected to be off, after waiting for a preset time, the process returns to the step of responding to the operation command of the window manager, establishing a session window for running in the background, and performing the test information acquisition operation for the new round of testing.

[0024] In a second aspect, embodiments of this disclosure provide a test information acquisition apparatus, the apparatus comprising:

[0025] The session window creation module is used to create a session window that runs in the background in response to operation commands from the window manager.

[0026] The test information acquisition module is used to establish a network connection with the object under test through a session window and acquire the test information output remotely by the object under test; the test information includes the test log of the object under test during the power-on and power-off test process;

[0027] The file saving module is used to save the record file of this round of testing when the obtained test information contains specific identifier characters.

[0028] In a third aspect, embodiments of this disclosure provide a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps:

[0029] In response to commands to the window manager, create a session window for running in the background;

[0030] Through the session window, a network connection is established with the object under test to obtain the test information output remotely by the object under test; the test information includes the test log of the object under test during the power-on and power-off test process;

[0031] If the obtained test information contains specific identifier characters, save the record file for this round of testing.

[0032] In a fourth aspect, embodiments of this disclosure provide a computer-readable storage medium having a computer program stored thereon, the computer program performing the following steps when executed by a processor:

[0033] In response to commands to the window manager, create a session window for running in the background;

[0034] Through the session window, a network connection is established with the object under test to obtain the test information output remotely by the object under test; the test information includes the test log of the object under test during the power-on and power-off test process;

[0035] If the obtained test information contains specific identifier characters, save the record file for this round of testing.

[0036] The aforementioned test information acquisition method, apparatus, computer equipment, and storage medium, during implementation, establish a background session window through a window manager to execute the task of acquiring test information. During AC power-on / off testing, when the tested object loses its network connection with the control device due to power failure or restart, the session program executing the task of acquiring test information can still continue to run in the background of the control device. Furthermore, after the network connection is restored, it continues to acquire new test information based on the original progress of the control device's test information for the tested object, improving the stability of test information acquisition in AC power-on / off testing and avoiding the loss of test information in certain test rounds. By recognizing specific identifier characters, it is beneficial to automatically save the record file of each round of testing without manual intervention during multiple rounds of testing, thus improving testing efficiency. Attached Figure Description

[0037] Figure 1 This is a diagram illustrating the application environment of the test information acquisition method in some embodiments;

[0038] Figure 2 This is a flowchart illustrating the test information acquisition method in some embodiments;

[0039] Figure 3 This is a flowchart illustrating the steps involved in modifying the log file name in some embodiments;

[0040] Figure 4 This is a structural block diagram of the test information acquisition device in some embodiments;

[0041] Figure 5 This is an internal structural diagram of a computer device in some embodiments;

[0042] Figure 6 This is an internal structural diagram of another computer device in some embodiments. Detailed Implementation

[0043] To make the objectives, technical solutions, and advantages of this disclosure clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this disclosure.

[0044] The test information acquisition method provided in this disclosure can be applied to, for example... Figure 1In the application environment shown, the control device 101 can communicate with the object under test 102 via a network. The control device 101 can acquire test information output by the object under test 102 through a remote serial port. The control device 101 can be a server or a terminal. The object under test 102 can be either a server or a terminal. The server mentioned in this document can be a standalone server or a server cluster composed of multiple servers. The terminal mentioned in this document can be, but is not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices.

[0045] Applying test information acquisition methods Figure 1 Taking the control device 101 as an example, in some embodiments, the control device 101 is a terminal, such as... Figure 2 As shown, the test information acquisition method includes steps S201, S202 and S203 that can be executed by the control device 101. Each step will be described in detail below.

[0046] Step S201: Create a new session window for the window manager.

[0047] A window manager, also known as a window management tool, is software that runs on a computer. The window manager discussed in this article refers to tmux (Terminal Multiplexer) or other window managers with session management and automatic session recovery functions. These window managers can ensure that tasks executed in the current session window continue to run even in the event of an abnormal network outage, ensuring that the work is not lost.

[0048] The session window is used to record and manage session messages or execute entered session commands. After creating a new session window, it can be graphically rendered and displayed on the screen.

[0049] Typically, the window manager can respond to the operation of creating a new session window by executing step S201. This operation can be triggered either by the user inputting information via a mouse or keyboard, causing the window manager to manipulate its controls for creating the session window, or by running a pre-set script. The pre-set script, as described herein, can be used to control the window manager to automatically execute corresponding instructions without manual intervention. For example, it can control the window manager to create new session windows, modify the window manager's configuration file, and input and execute instructions through the session window.

[0050] Step S202: Execute the information acquisition command through the session window. The information acquisition command instructs the acquisition of test information output from the remote serial port of the object under test 102.

[0051] Typically, users can input information retrieval commands within the session window using input components such as the mouse or keyboard, causing the session window to execute those commands. Alternatively, pre-set scripts can be run to automatically input pre-stored information retrieval commands into the session window.

[0052] The remote serial port can be SOL (Serial Over LAN, a serial port accessed via a network) or other serial ports that allow remote access to the object under test via a network.

[0053] Typically, the control device 101 can establish a remote network connection with the object under test 102 beforehand. When the control device 101 executes an information acquisition command through a session window, it sends a test information acquisition request to the object under test 102. Upon receiving the test information acquisition request, the object under test 102 outputs the test information via a remote serial port and sends it to the control device 101. Therefore, the information acquisition command instructs the control device 101 to acquire test information from the object under test 102.

[0054] The aforementioned test information includes the test logs generated by the tested object 102 during the AC continuity test.

[0055] Step S203: During this round of testing, after the network connection status with the tested object 102 changes from disconnected to connected, the information acquisition command continues to be executed through the session window according to the execution progress saved by the window manager.

[0056] During AC continuity testing, multiple rounds of testing are typically required, meaning the device under test (DUT) 102 needs to repeatedly execute power-off and power-on restart steps. Normally, in each round of testing, after completing the test task, DUT 102 automatically disconnects from the network connection with control device 101, then powers off, then powers on and restarts, re-entering the system. However, sometimes due to a fault in DUT 102 itself, or due to other reasons causing an abnormal disconnection between control device 101 and DUT 102, the process of acquiring test information by control device 101 during that round of testing must be interrupted. Because a window manager is used, the workflow corresponding to the information acquisition instructions run through the session window is saved. After the network connection between control device 101 and DUT 102 is restored, the information acquisition instructions can continue to be executed based on the completed progress.

[0057] A network connection status of "disconnected" indicates that the network connection between the control device 101 and the object under test 102 is disconnected; a network connection status of "connected" indicates that the network connection between the control device 101 and the object under test is continuous.

[0058] The execution progress saved by the window manager represents the running progress of the process acquiring test information, or the execution progress of the information acquisition command. For example, a round of testing may correspond to several test items. When completing a portion of the test items, an event occurs where the network connection status is disconnected. At this time, the control device 101 will be unable to continue acquiring test information for the remaining test items. However, according to the execution progress saved by the window manager, which saves the progress information of acquiring test information for a portion of the test items, once the network connection status becomes connected, the information acquisition command can be continued through the session window to acquire test information for the remaining test items.

[0059] Typically, the device under test (DUT) 102 can run the AC continuity test program itself, and the control device 101 does not need to participate in controlling the DUT 102 to perform operations such as power-off and power-on restarts; it only needs to acquire the test information of the DUT 102. In some optional embodiments, the control device 101 can also write the control instructions for controlling the DUT 102 to perform corresponding test items into a pre-set script program. By running this script program, the control test instructions are input in the session window, and the control test instructions are executed through the session window, causing the DUT 102 to execute these control test instructions, thereby performing the AC continuity test. The control test instructions include instructions for controlling the DUT 102 to perform multiple rounds of continuity tests, such as controlling the DUT 102 to perform power-on or power-off operations. In this case, if a network interruption occurs during a certain round of testing, the control test instructions can be continued through the session window according to the execution progress saved by the window manager. Therefore, the execution progress saved by the window manager can include both the execution progress of the information acquisition instructions of the control device 101 and the execution progress of the control test instructions of the control device 101.

[0060] In the above-described method for acquiring test information, during implementation, a background session window is established through the window manager to execute the task of acquiring test information. During AC power-on / off testing, when the tested object loses its network connection with the control device due to power failure or restart, the session program executing the task of acquiring test information can still continue to run in the background of the control device. After the network connection is restored, it continues to acquire new test information on the original progress of the control device's test information for the tested object, improving the stability of test information acquisition in AC power-on / off testing and avoiding the loss of test information in certain test rounds. By recognizing specific identifier characters, it is beneficial to automatically save the record file of each round of testing without manual intervention during multiple rounds of testing, which also improves testing efficiency.

[0061] Taking the control device 101 as an example, which uses Linux as its operating system and tmux as its window manager, the installation method of tmux will be briefly explained here.

[0062] First, you can use the yum (Yellow Dog Update Manager, a package manager developed to resolve package dependencies) tool to install tmux.

[0063] Secondly, you can install the tmux plugin tmux-resurrent to save tmux sessions. tmux-resurrent can save the current session, panel layout, and other information, and can also be configured to restore the execution progress of certain commands.

[0064] Alternatively, you can add the following command to the tmux configuration file:

[0065] set-g@plugin'tmux-plugins / tpm'

[0066] set-g@plugin'tmux-plugins / tmux-sensible'

[0067] run-b'~ / .tmux / plugins / tpm / tpm'

[0068] set-option-gprefix2`

[0069] run-shell~ / .tmux / tmux-resurrect / resurrect.tmux.

[0070] tmux configuration files are usually named with the suffix ".tmux.conf".

[0071] Subsequently, you can reload the tmux configuration file to make it effective. At this point, you can use tmux to create a new session window.

[0072] In some optional implementations, the object under test 102 is a server, and the information acquisition instruction is used to instruct the acquisition of the test log in the registers of the Basic Input Output System (BIOS) of the object under test 102 via a remote serial port. The BIOS can be a set of programs embedded in a ROM (Read-Only Memory) chip on the motherboard of the computer, which stores the computer's most important basic input / output programs, power-on self-test programs, and system startup programs.

[0073] In some embodiments, the test information acquisition method further includes the following step: executing a network connection command through a session window. The network connection command instructs the device under test (DUT) 102 to establish a network connection with the DUT's baseboard management controller based on a pre-stored Internet Protocol address (IP address), username, and password. Specifically, the DUT 102 includes a baseboard management controller, and the network connection command instructs the control device 101 to establish a network connection with the baseboard management controller based on its IP address, username, and password. In some optional embodiments, the baseboard management controller's IP address, username, and password can be pre-written into a window manager's configuration file, and the network connection command instructs the device to read the baseboard management controller's IP address, username, and password from the window manager's configuration file, thereby establishing a network connection with the baseboard management controller of the DUT 102.

[0074] Typically, the information acquisition command can be executed after the control device 101 establishes a network connection with the object under test 102 by executing the network connection command.

[0075] In some embodiments, such as Figure 3 As shown, the test information acquisition method may also include the following steps:

[0076] Step S301: Write the acquired test information into the log file corresponding to the session window;

[0077] Step S302: If a preset identifier character exists in the log file, modify the name of the log file;

[0078] Step S303: Save the renamed log file as the record file for this round of testing.

[0079] Typically, session content can be saved to the log file corresponding to the session window. Taking tmux as an example, session content can be saved to a log file with the characters "tmux-client-xxx.log" in its name, where "xxx" represents a specific character that can be customized or generated by default. This log file can be automatically generated by the window manager and used by default to store session content. To facilitate differentiation of test information for each round of testing, the test information for each round can be saved to a separate log file. For example, the test information for the current round can be written to the log file generated by the window manager by default. After the current round of testing is completed, the name of this log file is changed, and it is then saved as the record file for this round of testing. The test information for the next round of testing can continue to be written to the default log file. After the next round of testing is completed, the name of this log file is changed, and it is then saved as the record file for the next round of testing.

[0080] Typically, for AC continuity testing, since the steps performed in each round of testing can be the same, the corresponding test information will carry the same identifier character after each round of testing is completed. Therefore, based on the presence of a preset identifier character in the log file, it can be determined that the test information for the current round of testing has been obtained, and the test information obtained in the future should belong to the next round of testing.

[0081] Different types and configurations of test objects 102, as well as different AC on / off test procedures, may correspond to different identifier characters. These identifier characters recorded in the test information of the basic input / output system registers can usually indicate the end of the current test round. Taking the preset identifier character "EnablePatrolScrubatEndofPostCallback" as an example, if the corresponding test information at the end of each test round contains "EnablePatrolScrubatEndofPostCallback", then log files with names containing the characters "tmux-client-xxx.log" can be detected. If "EnablePatrolScrubatEndofPostCallback" is detected in the log file, it can be determined that the test information acquisition for this round of testing is complete. In some other optional implementations, other preset identifier characters can also be used, which are not particularly limited here.

[0082] For a complete test round, after the test information is written to the log file corresponding to the session window, a predetermined identifier character usually exists at the end of the log file. In some embodiments, the test information acquisition method further includes: determining whether an identifier character exists at the end of the log file. The step of modifying the log file name when a preset identifier character exists in the log file includes: modifying the log file name when a specific identifier character exists at the end of the log file.

[0083] In some optional implementations, determining whether a specific identifier character exists at the end of the log file includes: determining whether a specific identifier character exists at the end of the log file after each system restart of the object under test.

[0084] The aforementioned end position can refer to the last few lines in the log file, the position of the last string of characters in the log file, or the position of a certain number of characters at the end of the log file. Of course, it can also be set according to actual needs.

[0085] In some embodiments, the test information acquisition method may further include the following steps:

[0086] Detect the power status of the object under test 102;

[0087] When the obtained test information contains a specific identifier character, stop accessing the remote serial port of the tested object 102 and close the session window;

[0088] In this round of testing, which is not the final round, and when the power status of the tested object 102 is detected to be off, after waiting for a preset time, the process returns to the step of responding to the operation command of the window manager, establishing a session window for running in the background, and performing the test information acquisition operation for the new round of testing.

[0089] Power status includes power-on and power-off states. When the test object 102 performs multiple rounds of AC power-on / off tests, if the current test is not the last round and the current test is completed, the test object 102 needs to perform a power-off operation and then a power-on operation to restart and enter the next round of testing, i.e., enter a new round of testing. When the obtained test information contains specific identifier characters, it means that the current round of testing is completed. At this time, access to the remote serial port of the test object 102 can be stopped, the corresponding session window can be closed, the name of the corresponding log file can be modified, and it can be saved as the record file of this round of testing. At the same time, when the power status of the test object 102 is detected to be power-off, it can wait for a preset time and then continue to execute steps S201 and S202 to start obtaining test information for the next round of testing; of course, after continuing to execute steps S201 and S202, step S203 can also be executed.

[0090] The aforementioned preset duration can be 15 seconds, 20 seconds, or other durations, and is typically set based on the time required for the tested object 102 to complete the power-off operation, the power-on operation, and the activation of the baseboard management controller. Waiting for the preset duration before re-executing step S201 helps save computer resources and avoids the control device 101 frequently sending network connection requests to the tested object 102 while it is still not powered on or the baseboard management controller is not activated.

[0091] In some optional implementations, the power status of the object under test 102 is detected. If the power status is "power-on" and the acquired test information contains a specific identifier character, access to the remote serial port of the object under test 102 is stopped, and the object under test 102 is controlled to perform a power-off operation through the session window, and then the session window is closed. Stopping access to the remote serial port first, and then controlling the object under test 102 to perform a power-off operation, makes the test information acquisition procedure more reasonable.

[0092] In some optional implementations, there can be multiple objects under test, including object 102. In this case, control device 101 can establish network connections with each of the multiple objects under test and execute the test information acquisition method described in the previous embodiment for each object under test. The control device can then establish multiple session windows, each corresponding to a specific round of testing for one object under test. This allows for simultaneous AC continuity testing of multiple objects under test and enables efficient acquisition of test information from multiple objects under test using control device 101, saving on the control equipment required for the testing process.

[0093] It should be understood that, although Figure 2 and Figure 3 The steps in the flowchart are shown sequentially according to the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Figure 2 and Figure 3 Unless otherwise expressly stated herein, the steps illustrated and other steps involved in the embodiments are not subject to strict order restrictions and may be performed in other orders. Furthermore, at least some steps in the foregoing embodiments may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but may be performed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but may be performed alternately or in turn with other steps or at least a portion of the sub-steps or stages of other steps.

[0094] In some embodiments, such as Figure 4As shown, a test information acquisition device 400 is provided, including a session window creation module 401, a test information acquisition module 402, and a file saving module 403, wherein:

[0095] The session window creation module 401 is used to create a session window for running in the background in response to operation commands to the window manager;

[0096] The test information acquisition module 402 is used to establish a network connection with the object under test through a session window and acquire the test information output by the remote serial port of the object under test; the test information includes the test log of the object under test during the power-on and power-off test process;

[0097] The file saving module 403 is used to save the record file of this round of testing when the obtained test information contains specific identifier characters.

[0098] In some embodiments, the object under test is a server, and the information acquisition instruction is used to instruct the acquisition of test logs in the registers of the basic input / output system of the object under test via a remote serial port.

[0099] In some embodiments, the test information acquisition device 400 further includes a network connection module (not shown) for executing network connection instructions through a session window. The network connection instructions instruct the establishment of a network connection with the baseboard management controller of the object under test based on a pre-stored Internet Protocol address, username, and password of the baseboard management controller.

[0100] In some embodiments, the test information acquisition device 400 further includes:

[0101] The information writing module (not shown) is used to write the acquired test information to the log file corresponding to the session window;

[0102] The name modification module (not shown) is used to modify the name of the log file when a preset identifier character exists in the log file;

[0103] The information saving module (not shown) is used to save the renamed log file as the record file for this round of testing.

[0104] In some embodiments, the test information acquisition device 400 further includes a judgment module (not shown) for judging whether an identifier character exists at the end of the log file. Correspondingly, the name modification module includes a log file name modification unit, which is used to modify the name of the log file when a specific identifier character exists at the end of the log file.

[0105] In some embodiments, the judgment module includes a specific identifier character judgment unit, used to determine whether a specific identifier character exists at the end of the log file after each system restart of the object under test.

[0106] In some embodiments, the test information acquisition device 400 further includes:

[0107] The power status detection module (not shown) is used to detect the power status of the object under test.

[0108] The session window closing module (not shown) is used to stop accessing the remote serial port of the object under test and close the session window when the obtained test information contains specific identifier characters.

[0109] The program returns to the module (not shown). In this round of testing, which is not the last round of testing, and when the power status of the object under test is detected to be off, it waits for a preset time and then returns to the steps of responding to the operation instructions of the window manager, establishing a session window for running in the background, in order to perform the test information acquisition operation for the new round of testing.

[0110] Specific limitations regarding the test information acquisition device 400 can be found in the limitations of the test information acquisition method described above, and will not be repeated here. Each module in the aforementioned test information acquisition device 400 can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0111] In some embodiments, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 5 As shown, the computer device includes a processor, memory, and a network interface connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The network interface is used to communicate with external terminals via a network connection. When the computer program is executed by the processor, it implements the test information acquisition method in any embodiment.

[0112] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 6As shown, the computer device includes a processor, memory, network interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The network interface is used to communicate with external terminals via a network connection. When the computer program is executed by the processor, it implements the test information acquisition method in any embodiment. The display screen can be a liquid crystal display (LCD) or an electronic ink display. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the computer device casing, or an external keyboard, touchpad, or mouse.

[0113] Those skilled in the art will understand that Figure 5 or Figure 6 The structures shown are merely block diagrams of some structures related to the embodiments of this disclosure and do not constitute a limitation on the computer devices on which the embodiments of this disclosure are applied. Specific computer devices may include more or fewer components than those shown in the figures, or combine certain components, or have different component arrangements.

[0114] In some embodiments, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps:

[0115] Create a new session window for the window manager;

[0116] Through the session window, execute the information acquisition command; the information acquisition command is used to instruct the acquisition of test information output from the remote serial port of the object under test;

[0117] During this round of testing, after the network connection status with the tested object changes from disconnected to connected, the information retrieval command continues to be executed through the session window based on the execution progress saved by the window manager.

[0118] In some other embodiments, the processor may also implement other steps of the test information acquisition method described herein when executing a computer program.

[0119] In some embodiments, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, performs the following steps:

[0120] Create a new session window for the window manager;

[0121] Through the session window, execute the information acquisition command; the information acquisition command is used to instruct the acquisition of test information output from the remote serial port of the object under test;

[0122] During this round of testing, after the network connection status with the tested object changes from disconnected to connected, the information retrieval command continues to be executed through the session window based on the execution progress saved by the window manager.

[0123] In one embodiment, the computer program may also implement other steps of the test information acquisition method described herein when executed by a processor.

[0124] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The aforementioned computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this disclosure can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may 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), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0125] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0126] The above embodiments merely illustrate several implementation methods of this disclosure, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of protection of this disclosure. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this disclosure, and these all fall within the scope of protection of this disclosure. Therefore, the scope of protection of this disclosure should be determined by the appended claims.

Claims

1. A method for acquiring test information, characterized in that, The method includes: Create a new session window for the window manager; Through the session window, execute the power-on / off test information acquisition command; the information acquisition command is used to instruct the acquisition of the test log in the register of the server's basic input / output system via a remote serial port. During this round of testing, after the network connection with the server changes from disconnected to connected, the information retrieval command continues to be executed through the session window according to the execution progress saved by the window manager. The acquired test logs are written to the default log file corresponding to the session window; If a specific identifier character exists at the end of the log file, the name of the log file will be modified. Save the renamed log file as the record file for this round of testing.

2. The method according to claim 1, characterized in that, The method further includes: Through the session window, a network connection command is executed; the network connection command is used to instruct the establishment of a network connection with the baseboard management controller of the server based on the pre-stored Internet Protocol address, username and password of the baseboard management controller.

3. The method according to claim 1, characterized in that, The method further includes: After each system restart of the server, it is determined whether the specific identifier character exists at the end of the log file.

4. The method according to any one of claims 1 to 3, characterized in that, The method further includes: Detect the power status of the server; If the obtained test log contains a specific identifier character, stop accessing the server's remote serial port and close the session window; In this round of testing, which is not the final round, and when the power status of the server is detected to be off, after waiting for a preset time, the process returns to the step of establishing a session window for background operation in response to the operation command of the window manager, so as to perform the test log acquisition operation of the new round of testing.

5. A test information acquisition device, characterized in that, The device includes: The session window creation module is used to create a session window that runs in the background in response to operation commands from the window manager. The test information acquisition module is used to establish a network connection with the server through the session window and acquire the test logs located in the registers of the basic input / output system, which are remotely output by the server during the power-on / off test. The information writing module is used to write the acquired test logs into the default generated log file corresponding to the session window; The name modification module is used to modify the name of the log file when a specific identifier character exists at the end of the log file. The information saving module is used to save the renamed log file as the record file for this round of testing; The test information acquisition device is configured to: during this round of testing, after the network connection status with the server changes from disconnected to connected, continue to execute the information acquisition instruction through the session window according to the execution progress saved by the window manager.

6. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 4.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Method and system for testing mobile network application

    CN103457783A

  • AEP memory AC test method based on random power-off of power manager

    CN110008070A