A BMC automated testing method and device based on Jenkins
Through Jenkins -based BMC automation testing methods, the problem of high human consumption and low degree of automation of the existing BMC testing method, realizing the high -efficiency automation testing and intuitive results of BMC devices, and improving test efficiency and product competitiveness.
Patent Information
- Application Number
- CN202110712895.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-25
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2041-06-25
AI Technical Summary
The existing BMC testing methods have problems such as high labor consumption, low degree of automation, and unintuitive display of test results.
Adopt Jenkins -based BMC automation testing methods, deploy the Jenkins tool through client node, obtain user configuration, log in to the server node, select the test branch and process order, perform automated testing, generate log files, and display test results.
The automated testing of BMC devices is achieved, saving labor costs, and improving test efficiency. Through the Jenkins tools, the test log is to quickly locate the equipment abnormality and improve product competitiveness.
Smart Images

Figure CN113626306B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of BMC testing, and in particular relates to a BMC automatic testing method and device based on Jenkins. Background Art
[0002] Jenkins, an open source software project, is a continuous integration tool developed based on Java. BMC, short for Baseboard Manager Controller, is used to manage and monitor servers. IPMI, short for Intelligent Platform Management Interface, is an intelligent platform management interface.
[0003] BMC is the monitoring and management chip of the server. It monitors the temperature, voltage, fan, power supply, etc. of the server and makes corresponding adjustments to ensure that the server is in a healthy state. Daily testing of BMC is very important. Through testing of BMC, timely discovering and repairing BMC problems is the premise of ensuring the monitoring capability of the server. BMC testing needs to be targeted at different models and platforms. The testing methods for each model and platform are different. In addition, BMC has many functions and complex testing. Therefore, there are severe challenges for BMC testing. At present, there are two main methods for testing BMC. One is that the staff manually tests each functional module of BMC. When the number of devices is large, it will consume a lot of manpower. The second method is that professionals write automated test scripts, and testers manually execute automated scripts on the tested devices to test. This method improves the test rate and reduces the test manpower, but the test method is complex, the test results are not intuitive, and the degree of automation is low.
[0004] This is a shortcoming of the prior art. Therefore, in view of the above defects in the prior art, it is very necessary to provide a BMC automated testing method and device based on Jenkins. Summary of the invention
[0005] In view of the above-mentioned BMC test in the prior art is a prerequisite for ensuring the server monitoring capability, but the manual testing method consumes a lot of manpower, and the existing automated testing method is complex, the test result display is not intuitive, and the degree of automation is low. The present invention provides a BMC automated testing method and device based on Jenkins to solve the above technical problems.
[0006] In a first aspect, the present invention provides a BMC automated testing method based on Jenkins, comprising the following steps:
[0007] S1. Deploy the Jenkins tool on the client node, and the client node obtains the user's configuration of the test environment and the BMC device to be tested through the Jenkins tool;
[0008] S2. The client node logs in to the server node according to the BMC automated test task status and starts the automated test of the BMC device to be tested;
[0009] S3. The server node selects the corresponding test branch in the BMC automated test script according to the configuration of the BMC device to be tested, and tests each functional module of the BMC device to be tested according to the pre-set process sequence in the BMC automated test script, and then receives and parses the response results of the BMC device to be tested, and generates a server log file;
[0010] S4. The client node queries the BMC automated test task status of the server node, and after completing the test of the BMC device to be tested, collects the server log file and uploads it to the Jenkins tool to display the test results to the user.
[0011] Furthermore, the specific steps of step S1 are as follows:
[0012] S11. Deploy the Jenkins tool on the client node;
[0013] S12. The user uses the Jenkins tool to configure the client node to log in to the server node through SSH without password;
[0014] S13. The user configures the IP address and model of the BMC device to be tested through the Jenkins tool. The user can configure the IP address and model of the BMC device to be tested through the Jenkins tool to facilitate locating the BMC device to be tested and selecting the code branch in the test script.
[0015] Furthermore, the specific steps of step S2 are as follows:
[0016] S21. The client node queries the server node for the BMC automated test task status;
[0017] If the BMC automated test task status is idle, proceed to step S22;
[0018] If the BMC automated test task status is busy, exit and end;
[0019] S22. The client node pulls the highest version of the BMC automated test script from the test script library to the server node;
[0020] S23. The client node logs in to the server node through ssh without password, remotely executes the BMC automated test script, and starts the automated test of the BMC device to be tested. Setting up the password-free login ensures that the client node can log in to the server node without obstacles, ensuring the progress of the automated test.
[0021] Furthermore, the specific steps of step S22 are as follows:
[0022] S221. The client node determines whether the existing BMC automated test script of the server node is the highest version in the test script library;
[0023] If yes, go to step S23;
[0024] If not, proceed to step S222;
[0025] S222. The client node pulls the highest version of the BMC automated test script from the test script library to the server node. By confirming the version of the BMC automated test script, timely use of the automated test script after update is ensured.
[0026] Furthermore, the specific steps of step S3 are as follows:
[0027] S31. The server node executes the entry script in the BMC automated test script, and selects the test branch corresponding to the model in the BMC automated test script according to the model of the BMC device to be tested;
[0028] S32. The server node obtains the test sequence set by the process arrangement script in the BMC automated test script, and starts the sub-test scripts of each functional module in turn according to the test sequence to test each functional module of the BMC device to be tested;
[0029] S33. The server node receives the response result returned by the BMC device to be tested, parses the response result, and generates a server-side operation log file and a server-side result log file. The specific test scripts of the BMC devices to be tested of different models are different. By setting different branches in the same BMC automated test script, it is compatible with the BMC devices of different models to be tested; the server node is provided with a server-side process arrangement script to set the test order of each function of the BMC device to be tested.
[0030] Furthermore, the specific steps of step S32 are as follows:
[0031] S321. The server node enters the test branch corresponding to the model in the BMC automated test script, and obtains the corresponding process orchestration script in the test branch;
[0032] S322. The server node extracts the test sequence from the process orchestration script;
[0033] S323. The server node starts the sub-test scripts of each functional module in sequence according to the test order;
[0034] S324. The sub-test script of each functional module sends the corresponding IPMI test instruction to the BMC device under test through the interface of the server node according to the test case. The server node is provided with an interface for sending IPMI test instructions to the BMC device under test; the sub-test script of each functional module is provided with a test case for testing the function of the corresponding functional module; the tests of each functional module are independent of each other, and the test order is determined by the process arrangement script.
[0035] Furthermore, the server runs a log file to record the test process log;
[0036] The server result log file records whether each functional module test has passed. The server log file is used to provide users with the location of the fault point of the BMC device under test after the test is completed.
[0037] Furthermore, the specific steps of step S4 are as follows:
[0038] S41. The server node records the BMC automated test task status;
[0039] S42. When the BMC device under test performs automated testing normally, the server node records the BMC automated testing task status as busy;
[0040] When the automated test of a function module of the BMC device to be tested fails, and the failed function module has an impact on subsequent function module tests and the automated test task needs to be exited, the server node records the BMC automated test task status as failed;
[0041] When the automated test of a function module of the BMC device to be tested fails, but the failed function module has no impact on the test of other function modules, the server node records the failure log in the server log file and records the BMC automated test task status as busy.
[0042] When the automated test of each functional module of the BMC device to be tested is completed, the server node records the BMC automated test task status as completed;
[0043] After the server log file is uploaded to the Jenkins tool, the server node notifies the client node to record the BMC automated test task status as idle;
[0044] S43. The client node asynchronously queries the BMC automated test task status of the server node every set time period;
[0045] S44. The client node collects the server log file and uploads it to the Jenkins tool to display the test results to the user, and then updates the BMC automated test task status to idle. The server node maintains a state machine to record the BMC automated test task status to ensure the reliability of the test process. The set time period can be one minute. The client node will periodically query the BMC automated test task status. For example, when the BMC automated test task status is failed, there may be a problem with the test of a functional module, or there may be a problem with the network that causes the BMC automated test task to time out. At this time, the BMC automated test task is automatically terminated to prevent the client node from being unable to end the response of the server node due to abnormal power failure of the BMC device to be tested or the automated test task being stuck, causing the client node to wait indefinitely. Regardless of whether the BMC automated test task status is successful or failed, the server log file is collected.
[0046] Furthermore, in step S43, when the BMC automated test task status is busy, the process returns to step S41. When the BMC automated test task status is busy, it indicates that the BMC device under test is being tested, and the process returns to step S41 to wait for the test of each functional module to be completed.
[0047] In a second aspect, the present invention provides a BMC automated testing device based on Jenkins, comprising:
[0048] The test configuration module is used to deploy the Jenkins tool on the client node and set the client node to obtain the user's configuration of the test environment and the BMC device to be tested through the Jenkins tool;
[0049] The test startup module is used to set the client node to log in to the server node according to the BMC automated test task status and start the automated test of the BMC device to be tested;
[0050] The BMC test module is used to set the server node to select the corresponding test branch in the BMC automated test script according to the configuration of the BMC device to be tested, and test each functional module of the BMC device to be tested according to the process sequence pre-set in the BMC automated test script, and then receive and parse the response result of the BMC device to be tested, and generate a server log file;
[0051] The test result display module is used to set the client node to query the BMC automated test task status of the server node, and after completing the test of the BMC device to be tested, collect the server log file and upload it to the Jenkins tool to display the test results to the user.
[0052] Furthermore, the test configuration module includes:
[0053] Jenkins tool deployment unit, used to deploy Jenkins tool on client nodes;
[0054] The login configuration unit is used by users to configure SSH password-free login from the client node to the server node through the Jenkins tool;
[0055] The BMC configuration unit is used by users to configure the IP address and model of the BMC device to be tested through the Jenkins tool.
[0056] Furthermore, the test startup module includes:
[0057] The test task status query unit is used for the client node to query the BMC automated test task status from the server node;
[0058] The first test exit unit is used to exit the test when the BMC automated test task status is busy;
[0059] The test script version update unit is used for the client node to pull the highest version of the BMC automated test script from the test script library to the server node when the BMC automated test task status is idle;
[0060] The remote login unit is used for the client node to log in to the server node through SSH without password, remotely execute the BMC automated test script, and start the automated test of the BMC device to be tested.
[0061] Furthermore, the BMC test module includes:
[0062] A test branch selection unit is used for the server node to execute the entry script in the BMC automated test script, and select the test branch corresponding to the model in the BMC automated test script according to the model of the BMC device to be tested;
[0063] The test sequence acquisition unit is used for the server node to acquire the test sequence set by the process arrangement script in the BMC automated test script, and start the sub-test scripts of each functional module in turn according to the test sequence to test each functional module of the BMC device to be tested;
[0064] The test result receiving and log generating unit is used for the server node to receive the response result returned by the BMC device to be tested, parse the response result, and generate a server operation log file and a server result log file.
[0065] Furthermore, the test result display module includes:
[0066] The test task status recording unit is used for the server node to record the BMC automated test task status;
[0067] The first busy status recording unit is used for recording the BMC automated test task status as busy at the server node when the BMC device to be tested is performing automated testing normally;
[0068] The failure status recording unit is used to record the BMC automated test task status as failed when the automated test of a function module of the BMC device to be tested fails and the failed function module has an impact on the subsequent function module tests and the automated test task needs to be exited;
[0069] The second busy status recording unit is used for, when the automated test of a function module of the BMC device to be tested fails, but the failed function module has no impact on the test of other function modules, the server node records the failure log in the server log file, and records the BMC automated test task status as busy;
[0070] The completion status recording unit is used for recording the BMC automated test task status as completed when the automated test of each functional module of the BMC device to be tested is completed;
[0071] The idle status recording unit is used to notify the client node to record the BMC automated test task status as idle after the server log file is uploaded to the Jenkins tool;
[0072] A test task status query unit, used for the client node to asynchronously query the BMC automated test task status of the server node at every set time period;
[0073] The log display unit is used to collect server log files on the client node and upload them to the Jenkins tool when the BMC automated test task status is completed or failed, display the test results to the user, and then update the BMC automated test task status to idle.
[0074] The beneficial effects of the present invention are:
[0075] The Jenkins-based BMC automated testing method and device provided by the present invention realize automated testing of BMC devices to be tested, can control the testing process, are compatible with BMC testing of various models, save a lot of manpower costs, maintain the testing process state machine through the server-side node, ensure the reliability of the testing process, intuitively view the test log through the Jenkins tool interface, quickly locate the abnormal points of the BMC devices to be tested, promptly discover and solve the problems exposed by the test, and improve the competitiveness of the product.
[0076] In addition, the invention has a reliable design principle, a simple structure and a very broad application prospect.
[0077] It can be seen that compared with the prior art, the present invention has outstanding substantive features and significant progress, and the beneficial effects of its implementation are also obvious. BRIEF DESCRIPTION OF THE DRAWINGS
[0078] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0079] Figure 1 The method flow diagram of the present invention is Figure 1 ;
[0080] Figure 2 The method flow diagram of the present invention is Figure 2 ;
[0081] Figure 3 is a system schematic diagram of the present invention;
[0082] In the figure, 1-test configuration module; 1.1-Jenkins tool deployment unit; 1.2-login configuration unit; 1.3-BMC configuration unit; 2-test startup module; 2.1-test task status query unit; 2.2-first test exit unit; 2.3-test script version update unit; 2.4-remote login unit; 3-BMC test module; 3.1-test branch selection unit; 3.2-test sequence acquisition unit; 3.3-test result reception and log generation unit; 4-test result display module; 4.1-test task status recording unit; 4.2-first busy status recording unit; 4.3-failure status recording unit; 4.4-second busy status recording unit; 4.5-completion status recording unit; 4.6-idle status recording unit; 4.7-test task status query unit; 4.8-log display unit. DETAILED DESCRIPTION
[0083] In order to enable those skilled in the art to better understand the technical solutions in the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0084] Embodiment 1:
[0085] like Figure 1As shown, the present invention provides a BMC automated testing method based on Jenkins, comprising the following steps:
[0086] S1. Deploy the Jenkins tool on the client node, and the client node obtains the user's configuration of the test environment and the BMC device to be tested through the Jenkins tool;
[0087] S2. The client node logs in to the server node according to the BMC automated test task status and starts the automated test of the BMC device to be tested;
[0088] S3. The server node selects the corresponding test branch in the BMC automated test script according to the configuration of the BMC device to be tested, and tests each functional module of the BMC device to be tested according to the pre-set process sequence in the BMC automated test script, and then receives and parses the response results of the BMC device to be tested, and generates a server log file;
[0089] S4. The client node queries the BMC automated test task status of the server node, and after completing the test of the BMC device to be tested, collects the server log file and uploads it to the Jenkins tool to display the test results to the user.
[0090] Embodiment 2:
[0091] like Figure 2 As shown, the present invention provides a BMC automated testing method based on Jenkins, comprising the following steps:
[0092] S1. Deploy the Jenkins tool on the client node. The client node obtains the user's configuration of the test environment and the BMC device to be tested through the Jenkins tool. The specific steps are as follows:
[0093] S11. Deploy the Jenkins tool on the client node;
[0094] S12. The user uses the Jenkins tool to configure the client node to log in to the server node through SSH without password;
[0095] S13. The user configures the IP address and model of the BMC device to be tested through the Jenkins tool;
[0096] S2. The client node logs in to the server node according to the BMC automated test task status and starts the automated test of the BMC device to be tested. The specific steps are as follows:
[0097] S21. The client node queries the server node for the BMC automated test task status;
[0098] If the BMC automated test task status is idle, proceed to step S22;
[0099] If the BMC automated test task status is busy, exit and end;
[0100] S22. The client node pulls the highest version of the BMC automated test script from the test script library to the server node;
[0101] S23. The client node logs in to the server node through SSH without password, remotely executes the BMC automated test script, and starts the automated test of the BMC device to be tested;
[0102] S3. The server node selects the corresponding test branch in the BMC automated test script according to the configuration of the BMC device to be tested, and tests each functional module of the BMC device to be tested according to the process sequence pre-set in the BMC automated test script, and then receives and parses the response result of the BMC device to be tested, and generates a server log file; the specific steps are as follows:
[0103] S31. The server node executes the entry script in the BMC automated test script, and selects the test branch corresponding to the model in the BMC automated test script according to the model of the BMC device to be tested;
[0104] S32. The server node obtains the test sequence set by the process arrangement script in the BMC automated test script, and starts the sub-test scripts of each functional module in turn according to the test sequence to test each functional module of the BMC device to be tested;
[0105] S33. The server node receives the response result returned by the BMC device under test, parses the response result, and generates a server operation log file and a server result log file;
[0106] S4. The client node queries the BMC automated test task status of the server node, and after completing the test of the BMC device to be tested, collects the server log file and uploads it to the Jenkins tool to display the test results to the user; the specific steps are as follows:
[0107] S41. The server node records the BMC automated test task status;
[0108] S42. When the BMC device under test performs automated testing normally, the server node records the BMC automated testing task status as busy;
[0109] When the automated test of a function module of the BMC device to be tested fails, and the failed function module has an impact on subsequent function module tests and the automated test task needs to be exited, the server node records the BMC automated test task status as failed;
[0110] When the automated test of a function module of the BMC device to be tested fails, but the failed function module has no impact on the test of other function modules, the server node records the failure log in the server log file and records the BMC automated test task status as busy; when the automated test of each function module of the BMC device to be tested is completed, the server node records the BMC automated test task status as completed;
[0111] After the server log file is uploaded to the Jenkins tool, the server node notifies the client node to record the BMC automated test task status as idle;
[0112] S43. The client node asynchronously queries the BMC automated test task status of the server node every set time period;
[0113] S44. The client node collects the server log files and uploads them to the Jenkins tool, displays the test results to the user, and then updates the BMC automated test task status to idle.
[0114] Embodiment 3:
[0115] like Figure 2 As shown, the present invention provides a BMC automated testing method based on Jenkins, comprising the following steps:
[0116] S1. Deploy the Jenkins tool on the client node. The client node obtains the user's configuration of the test environment and the BMC device to be tested through the Jenkins tool. The specific steps are as follows:
[0117] S11. Deploy the Jenkins tool on the client node;
[0118] S12. The user uses the Jenkins tool to configure the client node to log in to the server node through SSH without password;
[0119] S13. The user configures the IP address and model of the BMC device to be tested through the Jenkins tool;
[0120] S2. The client node logs in to the server node according to the BMC automated test task status and starts the automated test of the BMC device to be tested. The specific steps are as follows:
[0121] S21. The client node queries the server node for the BMC automated test task status;
[0122] If the BMC automated test task status is idle, proceed to step S22;
[0123] If the BMC automated test task status is busy, exit and end;
[0124] S22. The client node pulls the highest version of the BMC automated test script from the test script library to the server node; the specific steps are as follows:
[0125] S221. The client node determines whether the existing BMC automated test script of the server node is the highest version in the test script library;
[0126] If yes, go to step S23;
[0127] If not, proceed to step S222;
[0128] S222. The client node pulls the highest version of the BMC automated test script from the test script library to the server node;
[0129] S23. The client node logs in to the server node through SSH without password, remotely executes the BMC automated test script, and starts the automated test of the BMC device to be tested;
[0130] S3. The server node selects the corresponding test branch in the BMC automated test script according to the configuration of the BMC device to be tested, and tests each functional module of the BMC device to be tested according to the process sequence pre-set in the BMC automated test script, and then receives and parses the response result of the BMC device to be tested, and generates a server log file; the specific steps are as follows:
[0131] S31. The server node executes the entry script in the BMC automated test script, and selects the test branch corresponding to the model in the BMC automated test script according to the model of the BMC device to be tested;
[0132] S32. The server node obtains the test sequence set by the process arrangement script in the BMC automated test script, and starts the sub-test scripts of each functional module in turn according to the test sequence to test each functional module of the BMC device to be tested; the specific steps are as follows:
[0133] S321. The server node enters the test branch corresponding to the model in the BMC automated test script, and obtains the corresponding process orchestration script in the test branch;
[0134] S322. The server node extracts the test sequence from the process orchestration script;
[0135] S323. The server node starts the sub-test scripts of each functional module in sequence according to the test order;
[0136] S324. The sub-test scripts of each functional module send corresponding IPMI test instructions to the BMC device under test through the interface of the server node according to the test case;
[0137] S33. The server node receives the response result returned by the BMC device under test, parses the response result, and generates a server operation log file and a server result log file; the server operation log file records the test process log; the server result log file records whether each functional module test passes; the server log file is used to provide the user with the location of the fault point of the BMC device under test after the test is completed;
[0138] S4. The client node queries the BMC automated test task status of the server node, and after completing the test of the BMC device to be tested, collects the server log file and uploads it to the Jenkins tool to display the test results to the user; the specific steps are as follows:
[0139] S41. The server node records the BMC automated test task status;
[0140] S42. When the BMC device under test performs automated testing normally, the server node records the BMC automated testing task status as busy;
[0141] When the automated test of a function module of the BMC device to be tested fails, and the failed function module has an impact on subsequent function module tests and the automated test task needs to be exited, the server node records the BMC automated test task status as failed;
[0142] When the automated test of a function module of the BMC device to be tested fails, but the failed function module has no impact on the test of other function modules, the server node records the failure log in the server log file and records the BMC automated test task status as busy.
[0143] When the automated test of each functional module of the BMC device to be tested is completed, the server node records the BMC automated test task status as completed;
[0144] After the server log file is uploaded to the Jenkins tool, the server node notifies the client node to record the BMC automated test task status as idle;
[0145] S43. The client node asynchronously queries the BMC automated test task status of the server node for each set time period;
[0146] S44. The client node collects the server log files and uploads them to the Jenkins tool, displays the test results to the user, and then updates the BMC automated test task status to idle.
[0147] Embodiment 4:
[0148] like Figure 3 As shown, the present invention provides a BMC automated testing device based on Jenkins, comprising:
[0149] Test configuration module 1 is used to deploy the Jenkins tool on the client node and set the client node to obtain the user's configuration of the test environment and the BMC device to be tested through the Jenkins tool; test configuration module 1 includes:
[0150] Jenkins tool deployment unit 1.1, used to deploy the Jenkins tool on the client node;
[0151] Login configuration unit 1.2 is used by users to configure SSH password-free login from the client node to the server node through the Jenkins tool;
[0152] BMC configuration unit 1.3, used by users to configure the IP address and model of the BMC device to be tested through the Jenkins tool;
[0153] The test start module 2 is used to set the client node to log in to the server node according to the BMC automated test task status and start the automated test of the BMC device to be tested; the test start module 2 includes:
[0154] The test task status query unit 2.1 is used for the client node to query the BMC automated test task status from the server node;
[0155] The first test exit unit 2.2 is used to exit the test when the BMC automated test task status is busy;
[0156] The test script version update unit 2.3 is used for the client node to pull the highest version of the BMC automated test script from the test script library to the server node when the BMC automated test task status is idle;
[0157] Remote login unit 2.4, used for the client node to log in to the server node through SSH without password, remotely execute the BMC automated test script, and start the automated test of the BMC device to be tested;
[0158] BMC test module 3 is used to set the server node to select the corresponding test branch in the BMC automated test script according to the configuration of the BMC device to be tested, and test each functional module of the BMC device to be tested according to the process sequence preset in the BMC automated test script, and then receive and parse the response result of the BMC device to be tested, and generate a server log file; BMC test module 3 includes:
[0159] The test branch selection unit 3.1 is used for the server node to execute the entry script in the BMC automated test script, and select the test branch corresponding to the model in the BMC automated test script according to the model of the BMC device to be tested;
[0160] The test sequence acquisition unit 3.2 is used for the server node to acquire the test sequence set by the process arrangement script in the BMC automated test script, and start the sub-test scripts of each functional module in sequence according to the test sequence to test each functional module of the BMC device to be tested;
[0161] The test result receiving and log generating unit 3.3 is used for the server node to receive the response result returned by the BMC device to be tested, parse the response result, and generate a server operation log file and a server result log file;
[0162] The test result display module 4 is used to set the client node to query the BMC automated test task status of the server node, and after completing the test of the BMC device to be tested, collect the server log file and upload it to the Jenkins tool to display the test results to the user; the test result display module 4 includes:
[0163] The test task status recording unit 4.1 is used for the server node to record the BMC automated test task status;
[0164] The first busy status recording unit 4.2 is used for recording the BMC automated test task status as busy when the BMC device under test is performing automated testing normally;
[0165] The failure status recording unit 4.3 is used for recording the BMC automated test task status as failed when the automated test of a function module of the BMC device to be tested fails and the failed function module has an impact on the subsequent function module tests and the automated test task needs to be exited;
[0166] The second busy status recording unit 4.4 is used for, when the automated test of a function module of the BMC device to be tested fails, but the failed function module has no impact on the test of other function modules, the server node records the failure log to the server log file, and records the BMC automated test task status as busy; the completion status recording unit 4.5 is used for, when the automated test of each function module of the BMC device to be tested is completed, the server node records the BMC automated test task status as completed;
[0167] The idle state recording unit 4.6 is used for the server node to notify the client node to record the BMC automated test task status as idle after the server log file is uploaded to the Jenkins tool;
[0168] The test task status query unit 4.7 is used for the client node to asynchronously query the BMC automated test task status of the server node at every set time period;
[0169] The log display unit 4.8 is used for, when the BMC automated test task status is completed, the client node collects the server log file, uploads it to the Jenkins tool, displays the test result to the user, and then updates the BMC automated test task status to idle.
[0170] Although the present invention has been described in detail by referring to the accompanying drawings and in combination with the preferred embodiments, the present invention is not limited thereto. Without departing from the spirit and essence of the present invention, a person of ordinary skill in the art may make various equivalent modifications or substitutions to the embodiments of the present invention, and these modifications or substitutions shall be within the scope of the present invention. Any person of ordinary skill in the art may easily think of changes or substitutions within the technical scope disclosed by the present invention, and these shall be within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be subject to the scope of protection of the claims.
Claims
1. A BMC automated testing method based on Jenkins, characterized in that: The steps include: S1. Deploy the Jenkins tool on the client node, and the client node obtains the user's configuration of the test environment and the BMC device to be tested through the Jenkins tool; S2. The client node logs in to the server node according to the BMC automated test task status and starts the automated test of the BMC device to be tested; S3. The server node selects the corresponding test branch in the BMC automated test script according to the configuration of the BMC device to be tested, and tests each functional module of the BMC device to be tested according to the pre-set process sequence in the BMC automated test script, and then receives and parses the response results of the BMC device to be tested, and generates a server log file; S4. The client node queries the BMC automated test task status of the server node, and after completing the test of the BMC device to be tested, collects the server log file and uploads it to the Jenkins tool to display the test results to the user; The specific steps of step S2 are as follows: S21. The client node queries the server node for the BMC automated test task status; If the BMC automated test task status is idle, proceed to step S22; If the BMC automated test task status is busy, exit and end; S22. The client node pulls the highest version of the BMC automated test script from the test script library to the server node; S23. The client node logs in to the server node through SSH without password, remotely executes the BMC automated test script, and starts the automated test of the BMC device to be tested; The specific steps of step S3 are as follows: S31. The server node executes the entry script in the BMC automated test script, and selects the test branch corresponding to the model in the BMC automated test script according to the model of the BMC device to be tested; The specific steps of step S4 are as follows: S41. The server node records the BMC automated test task status; S42. When the BMC device under test performs automated testing normally, the server node records the BMC automated testing task status as busy; When the automated test of a function module of the BMC device to be tested fails, and the failed function module has an impact on subsequent function module tests and the automated test task needs to be exited, the server node records the BMC automated test task status as failed; When the automated test of a function module of the BMC device to be tested fails, but the failed function module has no impact on the test of other function modules, the server node records the failure log in the server log file and records the BMC automated test task status as busy. When the automated test of each functional module of the BMC device to be tested is completed, the server node records the BMC automated test task status as completed; After the server log file is uploaded to the Jenkins tool, the server node notifies the client node to record the BMC automated test task status as idle; S43. The client node asynchronously queries the BMC automated test task status of the server node every set time period; S44. The client node collects the server log files and uploads them to the Jenkins tool, displays the test results to the user, and then updates the BMC automated test task status to idle.
2. The BMC automated testing method based on Jenkins according to claim 1, characterized in that: The specific steps of step S1 are as follows: S11. Deploy the Jenkins tool on the client node; S12. The user uses the Jenkins tool to configure the client node to log in to the server node through SSH without password; S13. The user configures the IP address and model of the BMC device to be tested through the Jenkins tool.
3. The BMC automated testing method based on Jenkins according to claim 1, characterized in that: Step S3 also includes the following specific steps: S32. The server node obtains the test sequence set by the process arrangement script in the BMC automated test script, and starts the sub-test scripts of each functional module in turn according to the test sequence to test each functional module of the BMC device to be tested; S33. The server node receives the response result returned by the BMC device under test, parses the response result, and generates a server operation log file and a server result log file.
4. A BMC automated testing device based on Jenkins, characterized in that: include: The test configuration module (1) is used to deploy the Jenkins tool on the client node and set the client node to obtain the user's configuration of the test environment and the BMC device to be tested through the Jenkins tool; The test start module (2) is used to set the client node to log in to the server node according to the BMC automated test task status and start the automated test of the BMC device to be tested; The BMC test module (3) is used to set the server node to select the corresponding test branch in the BMC automated test script according to the configuration of the BMC device to be tested, and to test each functional module of the BMC device to be tested according to the process sequence pre-set in the BMC automated test script, and then receive and analyze the response result of the BMC device to be tested, and generate a server log file; The test result display module (4) is used to set the client node to query the BMC automated test task status of the server node, and after completing the test of the BMC device to be tested, collect the server log file and upload it to the Jenkins tool to display the test results to the user; The test startup module (2) includes: A test task status query unit (2.1), used for the client node to query the BMC automated test task status from the server node; The first test exit unit (2.2) is used to exit the test when the BMC automated test task status is busy; The test script version update unit (2.3) is used for the client node to pull the highest version of the BMC automated test script from the test script library to the server node when the BMC automated test task status is idle; Remote login unit (2.4), used for the client node to log in to the server node through SSH without password, remotely execute the BMC automated test script, and start the automated test of the BMC device to be tested; The BMC test module (3) includes: A test branch selection unit (3.1), which is used for the server node to execute the entry script in the BMC automated test script, and select the test branch corresponding to the model in the BMC automated test script according to the model of the BMC device to be tested; The test result display module (4) includes: The test task status recording unit (4.1) is used for the server node to record the BMC automated test task status; A first busy status recording unit (4.2) is used for recording the BMC automated test task status as busy at the server node when the BMC device to be tested is performing automated testing normally; The failure status recording unit (4.3) is used to record the BMC automated test task status as failed when the automated test of a functional module of the BMC device to be tested fails and the failed functional module has an impact on the subsequent functional module tests and the automated test task needs to be exited; The second busy status recording unit (4.4) is used for recording the failure log in the server log file when the automated test of a function module of the BMC device to be tested fails, but the failed function module has no impact on the test of other function modules, and recording the BMC automated test task status as busy; The completion status recording unit (4.5) is used for recording the BMC automated test task status as completed when the automated test of each functional module of the BMC device to be tested is completed; The idle state recording unit (4.6) is used to notify the client node to record the BMC automated test task status as idle after the server log file is uploaded to the Jenkins tool; A test task status query unit (4.7), used for the client node to asynchronously query the BMC automated test task status of the server node at every set time period; The log display unit (4.8) is used to collect the server log files on the client node and upload them to the Jenkins tool when the BMC automated test task status is completed or failed, display the test results to the user, and then update the BMC automated test task status to idle.
5. The BMC automated testing device based on Jenkins as claimed in claim 4, characterized in that: The test configuration module (1) includes: Jenkins tool deployment unit (1.1), used to deploy the Jenkins tool on the client node; Login configuration unit (1.2), used by users to configure SSH password-free login from client nodes to server nodes through the Jenkins tool; The BMC configuration unit (1.3) is used by users to configure the IP address and model of the BMC device to be tested through the Jenkins tool.
6. The BMC automated testing device based on Jenkins as claimed in claim 4, characterized in that: The BMC test module (3) also includes: The test sequence acquisition unit (3.2) is used for the server node to acquire the test sequence set by the process arrangement script in the BMC automated test script, and start the sub-test scripts of each functional module in sequence according to the test sequence to test each functional module of the BMC device to be tested; The test result receiving and log generating unit (3.3) is used for the server node to receive the response result returned by the BMC device to be tested, parse the response result, and generate a server operation log file and a server result log file.
Citation Information
Patent Citations
Three-node BIOS continuous integration platform and method
CN108519951A
Method and system for automatically testing network stability of whole cabinet server
CN109450729A