CN107220183B - Test method and system for setting event log of server BMC (baseboard management controller) - Google Patents

Test method and system for setting event log of server BMC (baseboard management controller) Download PDF

Info

Publication number
CN107220183B
CN107220183B CN201710515064.9A CN201710515064A CN107220183B CN 107220183 B CN107220183 B CN 107220183B CN 201710515064 A CN201710515064 A CN 201710515064A CN 107220183 B CN107220183 B CN 107220183B
Authority
CN
China
Prior art keywords
log
test
strategy
linear
logs
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710515064.9A
Other languages
Chinese (zh)
Other versions
CN107220183A (en
Inventor
胥志泉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN201710515064.9A priority Critical patent/CN107220183B/en
Publication of CN107220183A publication Critical patent/CN107220183A/en
Application granted granted Critical
Publication of CN107220183B publication Critical patent/CN107220183B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3692Test management for test results analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a test method and a test system for setting a BMC event log of a server, wherein the method comprises the steps of calling a web and opening a browser webpage; executing a command of adding the log, and testing the set log strategy; and outputting a test result to generate a test log. The system comprises a test starting module, a test module and a result output module which are connected in sequence. Compared with the prior art, the method and the system have the advantages that the test for setting the event log of the BMC of the server is automatically completed, the working efficiency is improved, the log record file is generated in the test process, and the test process and the result are checked and analyzed subsequently.

Description

Test method and system for setting event log of server BMC (baseboard management controller)
Technical Field
The invention relates to the technical field of BMC (baseboard management controller) testing, in particular to a testing method and a system for setting a BMC (baseboard management controller) event log of a server.
Background
The event log test is an essential item in a BMC (Baseboard Management Controller) test as a basic test in the BMC test. The BMC event log test needs to add a large amount of logs and judge the number of the logs. The traditional test method is operated manually, the test is time-consuming and labor-consuming, the whole test process and results are not recorded, and the subsequent checking and analysis are inconvenient.
Disclosure of Invention
In order to overcome the defects in the prior art, the invention aims to provide a test method and a test system for setting a server BMC event log, so that the test is simpler, more convenient, more automatic and more efficient, and the subsequent analysis and check are convenient.
The technical scheme adopted by the invention for solving the technical problems is as follows: a test method for setting a server BMC event log is characterized in that: the method comprises the following steps:
calling a web, and opening a browser webpage;
executing a command of adding the log, and testing the set log strategy;
and outputting a test result to generate a test log file.
Further, the webdriver is used for calling the web to open the browser webpage.
Further, the log policy includes a linear policy and a loop policy, and the specific step of executing the command for adding the log and testing the set log policy includes:
judging whether the set log strategy is a linear strategy or not;
if the strategy is a linear strategy, performing linear strategy test and judging whether the test passes according to the test standard of the linear strategy;
if the test result is not the linear strategy, carrying out a loop strategy test and judging whether the test is passed according to the test standard of the loop strategy.
Further, the specific process of performing the linear strategy test is as follows:
calling a log adding command;
and according to the number of the added logs, displaying corresponding states in the log records.
Further, the test criteria of the linear strategy are:
1) the last log ID in the log file is 3639, and the state in the corresponding log record is shown as "log full";
2) when the number of logs is increased continuously, the log file is not changed, and the maximum ID is 3639.
Further, the judging whether the test passes according to the test standard of the linear strategy specifically includes: and enabling the number of the added logs to be larger than 3639, reading the maximum value of the log ID through the web, and if the maximum value is 3639 and the state in the log record shows that the log is full, the linear strategy test is passed, otherwise, the test is not passed.
Further, the specific process of performing the loop policy test is as follows:
calling a log adding command;
the log ID and log file are constantly changing as the number of logs increases.
Further, the test criteria of the loop strategy are:
1) the total number of log IDs is 3639;
2) when the number of logs is more than 3639, a new log is generated in sequence, the one with smaller ID is lost and the total number of ID is kept 3639 unchanged.
Further, the judging whether the test passes according to the test standard of the circulation strategy specifically includes: and increasing the number of the added logs to be more than 3639, reading the maximum value and the minimum value of the log ID through the web, if the minimum value of the log ID is not 1 and the difference value between the maximum value and the minimum value of the log ID is 3938, passing the loop strategy test, and otherwise, failing the test.
A test system for server BMC time log settings using the method of any of claims 1 to 9, characterized by: the device comprises a test starting module, a test module and a result output module which are connected in sequence; the test starting module is used for calling a web and opening a browser webpage; the test module is used for executing a command of adding the log and testing the set log strategy; the result output module is used for outputting a test result and generating a test log file;
the test module also comprises a log strategy judgment module, a linear strategy test module, a standard strategy test module, a test standard judgment module and a test result judgment module; the output end of the test result judging module is respectively connected with the input ends of the linear strategy testing module and the standard strategy testing module, the output ends of the linear strategy testing module, the standard strategy testing module and the test standard judging module are respectively connected with the input end of the test result judging module, and the output end of the test result judging module is connected with the output end of the result output module.
The invention has the beneficial effects that:
1. the automatic test of the BMC event log setting is carried out by automatically calling the web and adding the log command, the process is automatically completed, the time is saved, and the working efficiency is improved.
2. The test process and the test result are recorded through the log file, so that the subsequent check and analysis of the BMC time log setting are facilitated.
3. Different test processes are respectively used for the cyclic strategy and the linear strategy, different test standards are appointed according to the properties of the log strategy, and the test results are respectively analyzed and verified, so that the test processes are clearer, and the reliability of the test results is ensured.
Drawings
FIG. 1 is a flow chart of a method of the present invention;
FIG. 2 is a schematic diagram of the system architecture of the present invention;
FIG. 3 is a schematic diagram of a system test module according to the present invention.
Detailed Description
In order to clearly explain the technical features of the present invention, the following detailed description of the present invention is provided with reference to the accompanying drawings. The following disclosure provides many different embodiments, or examples, for implementing different features of the invention. To simplify the disclosure of the present invention, the components and arrangements of specific examples are described below. Furthermore, the present invention may repeat reference numerals and/or letters in the various examples. This repetition is for the purpose of simplicity and clarity and does not in itself dictate a relationship between the various embodiments and/or configurations discussed. It should be noted that the components illustrated in the figures are not necessarily drawn to scale. Descriptions of well-known components and processing techniques and procedures are omitted so as to not unnecessarily limit the invention.
As shown in fig. 1, the flow chart of the method of the present invention comprises the following steps:
s1, calling the web and opening the browser webpage;
s2, executing the command of adding log, and testing the set log strategy;
and S3, outputting the test result and generating a test log file.
In step S1, the web is called, and the opening of the browser web page is realized by webdriver, which is an automated testing tool for web, so that the browser web page is changed from traditional manual operation to automatic operation.
The log policy includes a linear policy and a loop policy, the step S2 executes a command for adding a log, and the specific step of testing the set log policy includes:
s21, judging whether the set log strategy is a linear strategy;
s22, if the strategy is a linear strategy, testing the linear strategy and judging whether the test is passed according to the test standard of the linear strategy;
and S23, if the strategy is not a linear strategy, performing a loop strategy test and judging whether the test passes according to the test standard of the loop strategy.
The specific process of performing the linear strategy test in step S22 is as follows:
calling a log adding command;
and according to the number of the added logs, displaying corresponding states in the log records.
The specific steps of performing corresponding state display in the log record according to the number of the added logs are as follows: when the number of the logs is increased to 2736, a prompt of 'SEL will be nearly full-triggered' is displayed in the log record; when the number of the logs is between 2736 and 3639, a prompt of 'the logs are full' is displayed in the log record; when 3639 logs are added, the last log record displays a prompt of "log full"; when the number of the logs and the content of the log record are not changed when the number of the logs is continuously increased, namely, after the number of the logs of the linear strategy reaches 3639, the newly added logs are not recorded.
The test criteria for the linear strategy were: 1) the last log ID in the log file is 3639, and the state in the corresponding log record is shown as "log full"; 2) when the number of logs is increased continuously, the log file is not changed, and the maximum ID is 3639. If the above criteria are met, the linear strategy passes the test, otherwise the linear strategy fails the test.
The specific steps of the loop strategy test in step S23 are as follows:
calling a log adding command;
the log ID and log file are constantly changing as the number of logs increases.
Under the circulation strategy, the number of the logs is continuously increased, the log records are not prompted in the whole process, the number of the logs is continuously increased after the number of the logs is increased to 3639, the ID of the logs is continuously increased, but the number of the logs is kept unchanged finally, namely the circulation strategy is used for continuously recording the newly increased logs.
The test criteria for the round robin strategy were: 1) the total number of log IDs is 3639; 2) when the number of logs is more than 3639, a new log is generated in sequence, the one with smaller ID is lost and the total number of ID is kept 3639 unchanged. If the above criteria are met, the loop strategy passes the test, otherwise the loop strategy fails the test.
In step S22 and step S23, it is determined whether the test has passed:
s2-1, judging whether the strategy is a linear strategy;
s2-2, if the strategy is a linear strategy, the number of the added logs is larger than 3639, the maximum value of the log ID is read through the web, if the maximum value is 3639 and the state in the log record shows that the log is full, the linear strategy test is passed, otherwise, the test is not passed;
s2-3, if the strategy is not linear, the number of the added logs is larger than 3639, the maximum value and the minimum value of the log ID are read through the web, if the minimum value of the log ID is not 1 and the difference value between the maximum value and the minimum value of the log ID is 3938, the test of the loop strategy is passed, otherwise, the test is not passed.
Testing of the function buttons including the reset button and the save button is also included prior to step S2. The test procedure for the function button is as follows: the method comprises the steps of checking a current strategy, automatically selecting another strategy, selecting a reset button, judging whether the function of the reset button is normal or not by checking whether the selected strategy is the current strategy or not, if the selected strategy is the current strategy, the function of the reset button is normal, and if the selected strategy is the other strategy, the function of the reset button is abnormal. The test procedure for the save button is: the method comprises the steps of checking a current strategy, selecting a storage button before a system automatically selects another strategy, checking whether the selected strategy is the current strategy, if the selected strategy is the current strategy, the function of the storage button is normal, and if the selected strategy is the other strategy, the function of the storage button is abnormal.
The log file in step S3 is saved in txt form, and includes records of the test procedures and test results.
As shown in fig. 2, the system structure of the present invention is schematically illustrated, and the system includes a test starting module 1, a test module 2 and a result output module 3, which are connected in sequence. The test starting module 1 is used for calling a web and opening a browser webpage; the test module 2 is used for executing a command of adding the log and testing the set log strategy; and the result output module 3 is used for outputting the test result and generating a test log file.
As shown in fig. 3, the testing module 2 further includes a log policy determining module 21, a linear policy testing module 22, a standard policy testing module 23, a testing standard determining module 24, and a testing result determining module 25. The output end of the test result judging module 21 is connected to the input ends of the linear strategy testing module 22 and the standard strategy testing module 23, respectively, the output ends of the linear strategy testing module 22, the standard strategy testing module 23 and the test standard judging module 24 are connected to the input end of the test result judging module 25, and the output end of the test result judging module 25 is connected to the result output module 3.
The log strategy judging module is used for judging whether the set log strategy is a linear strategy or a circular strategy; the linear strategy testing module is used for testing the linear strategy and storing a testing result; the loop strategy testing module is used for testing the loop strategy and storing a testing result; the test standard storage module is used for storing the test standard of the log strategy; and the test result judging module is used for comparing the test result with the test standard and judging whether the set log strategy passes the test.
The foregoing is only a preferred embodiment of the present invention, and it will be apparent to those skilled in the art that various modifications and improvements can be made without departing from the principle of the invention, and such modifications and improvements are also considered to be within the scope of the invention.

Claims (5)

1. A test method for setting a server BMC event log is characterized in that: the method comprises the following steps:
calling a web, and opening a browser webpage;
executing a command of adding the log, and testing the set log strategy;
outputting a test result and generating a test log file;
the log strategy comprises a linear strategy and a circular strategy, the specific steps of executing the command of adding the log and testing the set log strategy are as follows:
judging whether the set log strategy is a linear strategy or not;
if the strategy is a linear strategy, performing linear strategy test and judging whether the test passes according to the test standard of the linear strategy;
if the test result is not a linear strategy, carrying out a cyclic strategy test and judging whether the test passes according to the test standard of the cyclic strategy;
the specific process for carrying out the cyclic strategy test comprises the following steps:
calling a log adding command;
according to the increase of the number of the logs, the log ID and the log file are changed continuously;
the test standards of the circulation strategy are as follows:
1) the total number of log IDs is 3639;
2) when the number of the logs is more than 3639, a new log is sequentially generated, the log with the smaller ID is lost to display, and the total number of the IDs is kept 3639 unchanged;
the judging whether the test passes according to the test standard of the circulation strategy specifically comprises the following steps: and increasing the number of the added logs to be more than 3639, reading the maximum value and the minimum value of the log ID through the web, if the minimum value of the log ID is not 1 and the difference value between the maximum value and the minimum value of the log ID is 3938, passing the loop strategy test, and otherwise, failing the test.
2. The method of claim 1, wherein the method comprises: and utilizing webdriver to carry out the operation of calling the web and opening the browser webpage.
3. The method of claim 2, wherein the method comprises: the specific process for carrying out the linear strategy test is as follows:
calling a log adding command;
and according to the number of the added logs, displaying corresponding states in the log records.
4. The method of claim 3, wherein the method comprises: the test criteria for the linear strategy are:
1) the last log ID in the log file is 3639, and the state in the corresponding log record is shown as "log full";
2) when the number of logs is increased continuously, the log file is not changed, and the maximum ID is 3639.
5. The method of claim 4, wherein the method comprises: the judging whether the test passes according to the test standard of the linear strategy specifically comprises the following steps: and enabling the number of the added logs to be larger than 3639, reading the maximum value of the log ID through the web, and if the maximum value is 3639 and the state in the log record shows that the log is full, the linear strategy test is passed, otherwise, the test is not passed.
CN201710515064.9A 2017-06-29 2017-06-29 Test method and system for setting event log of server BMC (baseboard management controller) Active CN107220183B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710515064.9A CN107220183B (en) 2017-06-29 2017-06-29 Test method and system for setting event log of server BMC (baseboard management controller)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710515064.9A CN107220183B (en) 2017-06-29 2017-06-29 Test method and system for setting event log of server BMC (baseboard management controller)

Publications (2)

Publication Number Publication Date
CN107220183A CN107220183A (en) 2017-09-29
CN107220183B true CN107220183B (en) 2020-09-18

Family

ID=59951237

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710515064.9A Active CN107220183B (en) 2017-06-29 2017-06-29 Test method and system for setting event log of server BMC (baseboard management controller)

Country Status (1)

Country Link
CN (1) CN107220183B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109450723A (en) * 2018-10-11 2019-03-08 郑州云海信息技术有限公司 A kind of BMC Web network information display verifying automated testing method
CN109726130A (en) * 2019-01-02 2019-05-07 浪潮商用机器有限公司 Test macro, method, equipment and the storage medium of BMC event log strategy
CN110515804A (en) * 2019-08-29 2019-11-29 浪潮商用机器有限公司 System Event Log test method, device, equipment and the storage medium of BMC

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105893229A (en) * 2016-04-01 2016-08-24 浪潮电子信息产业股份有限公司 Method and device for testing journaling function of computer protection system

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9563544B2 (en) * 2012-01-10 2017-02-07 Sap Se Framework for automated testing of mobile apps
CN103902435A (en) * 2012-12-26 2014-07-02 鸿富锦精密工业(深圳)有限公司 System and method for recording log events in server testing
CN103973486B (en) * 2014-04-29 2018-05-25 上海上讯信息技术股份有限公司 A kind of Log Administration System based on B/S structures

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105893229A (en) * 2016-04-01 2016-08-24 浪潮电子信息产业股份有限公司 Method and device for testing journaling function of computer protection system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
可扩展事务处理***中的日志同步策略;张晨东;《中国优秀硕士学位论文全文数据库 信息科技辑》;20161015(第10期);I138-308 *

Also Published As

Publication number Publication date
CN107220183A (en) 2017-09-29

Similar Documents

Publication Publication Date Title
CN107220183B (en) Test method and system for setting event log of server BMC (baseboard management controller)
TWI533123B (en) Method and system for automated test and result comparison
CN104820640B (en) A kind of webpage test method and device
WO2016078335A1 (en) Method and apparatus for writing automatic script
CN109885499B (en) Robot automatic test system and test method
CN101593146B (en) Method and device for automatically testing page
US10459830B2 (en) Executable code abnormality detection
CN108491322A (en) Automated testing method, device and storage medium
CN102855184B (en) Android automatic test cross application device and method
CN113238930B (en) Method and device for testing software system, terminal equipment and storage medium
WO2017036068A1 (en) Method and system for realizing software automatic test
CN104572422A (en) Memory monitoring achievement method based on startup and shutdown of Linux system
CN105808417A (en) Automated testing method and proxy server
WO2021008029A1 (en) Case execution method, apparatus and device, and computer readable storage medium
CN104239168B (en) Interim card detection method and equipment
CN109656643A (en) More browser compatibility test methods, storage medium, electronic equipment and system
CN105279092A (en) Software testing method and apparatus
US20130311833A1 (en) Computing device and method for testing components of the computing device
CN104598340A (en) Detection system of hardware faults, electronic device and method
CN104615523A (en) Fatigue test method for BMC management module based on IPMI protocol
US9348728B2 (en) Trace capture of successfully completed transactions for trace debugging of failed transactions
US8458664B2 (en) Command line interface permutation executor
CN106528364B (en) The building method of automation collaborative verification platform based on memory access driving
CN111125990A (en) Method for judging result correctness of parasitic parameters
CN106971757A (en) A kind of method and system of inspection Nand Flash mass

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20200820

Address after: 215100 No. 1 Guanpu Road, Guoxiang Street, Wuzhong Economic Development Zone, Suzhou City, Jiangsu Province

Applicant after: SUZHOU LANGCHAO INTELLIGENT TECHNOLOGY Co.,Ltd.

Address before: 450018 Henan province Zheng Dong New District of Zhengzhou City Xinyi Road No. 278 16 floor room 1601

Applicant before: ZHENGZHOU YUNHAI INFORMATION TECHNOLOGY Co.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant