CN108829594A - The method and system of automatic test BMC web assets information function under a kind of Linux - Google Patents

The method and system of automatic test BMC web assets information function under a kind of Linux Download PDF

Info

Publication number
CN108829594A
CN108829594A CN201810581678.1A CN201810581678A CN108829594A CN 108829594 A CN108829594 A CN 108829594A CN 201810581678 A CN201810581678 A CN 201810581678A CN 108829594 A CN108829594 A CN 108829594A
Authority
CN
China
Prior art keywords
assets information
test
script
bmc web
bmc
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201810581678.1A
Other languages
Chinese (zh)
Inventor
武秋星
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhengzhou Yunhai Information Technology Co Ltd
Original Assignee
Zhengzhou Yunhai Information 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 Zhengzhou Yunhai Information Technology Co Ltd filed Critical Zhengzhou Yunhai Information Technology Co Ltd
Priority to CN201810581678.1A priority Critical patent/CN108829594A/en
Publication of CN108829594A publication Critical patent/CN108829594A/en
Pending legal-status Critical Current

Links

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
    • G06F11/3672Test management

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 embodiment of the invention discloses a kind of method and system of automatic test BMC web assets information function under linux, the method includes:BMC web is logged in by RESTful interface remote;According to the path URL of BMC web assets information module, corresponding server assets information is obtained;The reading service device assets information under linux system;The server assets information got by RESTful interface is compared with the server assets information read under linux system;It tests and passes through if consistent;Otherwise test crash.BMC web information test method of the invention and system, the automation batch testing of BMC web assets information is realized by batch testing script, and automatically generate test result, save the testing time, the fault that artificial repetitive operation generates is avoided, provides very big convenience to research and development test and later maintenance.

Description

The method and system of automatic test BMC web assets information function under a kind of Linux
Technical field
The present embodiments relate to server the field of test technology, automatic test under a kind of linux is related in particular to The method and system of BMC web assets information function.
Background technique
With the continuous development of cloud computing, requirement of the various information technology to server is higher and higher, and server is determined Inhibition and generation demand is also more and more.Exploitation and production phase in server, producer need BMC, particularly customization to server The BMC web page of change carries out functional test.Traditional BMC web test method is generally logged in by tester by browser Then BMC web manually carries out inspection test item by item.It is this to be needed largely in such a way that browser logs in BMC web test Man-machine interactively operation, heavy workload and testing efficiency is low is difficult to carry out batch testing.
The expansible platform management API of Redfish is a kind of new specification, and it is fixed to be accessed using RESTful Interface Semantic Data of the justice in model format are suitable for large-scale server, such as from independent clothes for executing band external system management Device be engaged in the server environment of rack and blade type, while being also applied for large-scale cloud environment.
Based on the above issues, the method that the present invention proposes automatic test BMC web assets information function under a kind of linux And system, it carries out checking test item by item by browser without artificial, realizes that the automatic test of server B MC and batch are surveyed Examination.
Summary of the invention
A kind of method of automatic test BMC web assets information function under linux is provided in the embodiment of the present invention and is System, solves the problems, such as that tester's heavy workload, testing efficiency are low in existing test job.
In order to solve the above-mentioned technical problem, the embodiment of the invention discloses following technical solutions:
First aspect present invention provides a kind of method of automatic test BMC web assets information function under Linux, institute The method of stating includes the following steps:
BMC web is logged in by RESTful interface remote;
According to the path URL of BMC web assets information module, corresponding server assets information is obtained;
The reading service device assets information under linux system;
The server assets information got by RESTful interface is provided with the server read under linux system Information is produced to be compared;
If consistent, test passes through;Otherwise, test crash.
Based on above scheme, this method does following optimization:
Further, it is read under the server assets information that will be obtained by RESTful interface and linux system It further include following step after server assets information is compared:The order of all execution is integrated into shape in shell script At automatic test script, test result is automatically generated by executing test script, and test result is stored in journal file In.
Further, the order by all execution is integrated into shell script and is formed after automatic test script, It further include following step:Different BMC IP address is given, each BMC IP address executes an automatic test script, then All test scripts are executed parallel and get up to be formed batch testing script, carry out server money by executing batch testing script Produce the batch testing of information.
The method of automatic test BMC web assets information function, described in linux system under Linux as described above The server assets information of lower reading, including CPU assets information, memory assets information, network interface card assets information and RAID card assets Information.
Second aspect of the present invention provides a kind of system of automatic test BMC web assets information function under Linux, institute The system of stating includes:
RESTful interface login module logs in BMC web by RESTful interface for remotely controlling machine;
URL assets information obtains module and obtains corresponding server for the path URL according to BMC web assets information Assets information;
Linux assets information obtains module, for the reading service device assets information under linux system;
Assets information comparison module, for by the URL assets information server assets information that gets of acquisition module with Linux assets information obtains the server assets information that module is read and is compared;If the two compares unanimously, test passes through; Otherwise, test crash.
Further, the system also includes test script generation modules, for the order of all execution to be integrated into Automatic test script is formed in shell script.
Further, the system also includes batch testing script generation modules, for by multiple and different BMC IP The automatic test script that location executes gets up to be formed batch testing script parallel.
The technical solution that embodiments herein provides includes following beneficial effect:
The method of automatic test BMC web assets information function under a kind of Linux provided by the embodiments of the present application, including BMC web is logged in by RESTful interface;Corresponding server assets information is obtained according to the path URL;Under linux system Reading service device assets information;The server assets information that will be obtained by RESTful interface with read under linux system It compares;It tests and passes through if consistent;Otherwise, test crash.The BMC web information test method of the embodiment of the present application, by criticizing It measures test script and realizes the automation batch testing of BMC web assets information, and automatically generate test result, without manually passing through Browser logs in BMC web and carries out checking test item by item, saves the testing time, and avoids the mistake that artificial repetitive operation generates Accidentally, very big convenience is provided to research and development test and later maintenance.
The system of automatic test BMC web assets information function, Neng Goushi under a kind of Linux of second aspect of the present invention The test method of existing first aspect, and obtain identical effect.
Detailed description of the invention
The drawings herein are incorporated into the specification and constitutes part of specification, shows the implementation for meeting the application Example, and together with specification it is used to explain the principle of the application.
Fig. 1 is automatic test BMC web assets information functional method under a kind of Linux provided by the embodiments of the present application Flow diagram;
Fig. 2 is automatic test BMC web assets information function system under a kind of Linux provided by the embodiments of the present application Structural schematic diagram;
Appended drawing reference:1-RESTful interface login module, 2-URL assets information obtain module, 3-Linux assets information Obtain module, 4- assets information comparison module, 5- test script generation module, 6- batch testing script generation module.
Specific embodiment
Technical solution in order to enable those skilled in the art to better understand the present invention, below in conjunction with of the invention real The attached drawing in example is applied, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described implementation Example is only a part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, this field is common Technical staff's every other embodiment obtained without making creative work, all should belong to protection of the present invention Range.
Fig. 1 is the side of automatic test BMC web assets information function under a kind of Linux provided by the embodiments of the present application Method, as shown in Figure 1, the method for the present embodiment include the following steps:
S1, BMC web is logged in by RESTful interface using curl order using long-range control machine;Specific instructions are as follows:
curl-c${COOKIE_FILE}-k https://${IP}/api/session-X POST--data" Username=$ { USERNAME } &password=$ { PASSWORD }
S2, according to the path URL of BMC web assets information module, obtain corresponding server assets information;It is specific to obtain Mode is as follows:
(1)URL:The path /api/status/cpu_info//CPU information URL, for obtaining CPU title, frequency, power consumption Etc. information, specific instructions are as follows,
Curl'https://192.168.0.10/api/status/cpu_info'-H'Cookie:QSESSIONID= ea60063331080cdef22xqUZUXtQTKg;Refresh_disable=1'-H'Accept-Encoding:gzip, deflate,br'-H'Accept-Language:enUS,en;Q=0.8'-H'User-Agent:Mozilla/5.0(X11; Linuxx86_64)AppleWebKit/537.36(KHTML,like Gecko)Chrome/60.0.3112.90Safari/ 537.36'-H'Accept:*/*'-H'Referer:https://192.168.0.10/main.html'-H'X- Requested-With:XMLHttpRequest'-H'Connection:keep-alive'-H'X-CSRFTOKEN: ZtHdaZHD'--compressed--insecure
(2)URL:/ api/status/device_inventory//the path extrapolation equipment list information URL, for obtaining Network interface card, the information such as RAID card, specific instructions are as follows,
curl'https://192.168.0.10/api/status/device_inventory'-H'Pragma:no- cache'-H'Accept-Encoding:gzip,deflate,br'-H'Accept-Language:en-US,en;Q=0.8'- H'User-Agent:Mozilla/5.0(X11;Linux x86_64)AppleWebKit/537.36(KHTML,like Gecko)Chrome/60.0.3112.90Safari/537.36'-H'Accept:*/*'-H'CacheControl:no- cache'-H'X-Requested-With:XMLHttpRequest'-H'Cookie:QSESSIONID= ea60063331080cdef22xqUZUXtQTKg;Refresh_disable=1'-H'Connection:keep-alive'- H'Referer:https://192.168.0.10/main.html'-H'X-CSRFTOKEN:ZtHdaZHD'-- compressed–insecure
(3)URL:/ api/status/memory_info//memory information path, for obtaining memory model, capacity, frequency Rate, the information such as manufacturer, specific instructions are as follows,
curl'https://192.168.0.10/api/status/memory_info'-H'Pragma:no-cache'- H'Accept-Encoding:gzip,deflate,br'-H'AcceptLanguage:en-US,en;Q=0.8'-H'User- Agent:Mozilla/5.0(X11;Linuxx86_64)AppleWebKit/537.36(KHTML,like Gecko)
Chrome/60.0.3112.90Safari/537.36'-H'Accept:*/*'-H'CacheControl:no- cache'-H'X-Requested-With:XMLHttpRequest'-H'Cookie:QSESSIONID= ea60063331080cdef22xqUZUXtQTKg;Refresh_disable=1'-H'Connection:keep-alive'- H'Referer:https://192.168.0.10/main.html'-H'X-CSRFTOKEN:ZtHdaZHD'-- compressed–insecure
S3, the reading service device assets information under linux system;Specific reading manner is as follows:
(1) CPU assets information is read, reading order is:cat/proc/cpuinfo
(2) memory assets information is read, reading order is:cat/proc/meminfo
(3) network interface card assets information is read, reading order is:lspci|grep–i eth
(4) RAID card assets information is read, reading order is:lspci|grep–i raid
S4, by the server assets information got in the S2 by RESTful interface and the S3 in Linux system The lower server assets information read of system is compared, if comparing unanimously, test passes through;Otherwise, test crash.
S5, it the order of above-mentioned all execution is integrated into shell script forms automatic test script, by executing survey Training originally automatically generates test result, and test result is stored in journal file.
S6, different BMC IP address is given, each BMC IP address executes an automatic test script, then by institute Some test scripts execute parallel gets up to be formed batch testing script, carries out server assets letter by executing batch testing script The batch testing of breath.
Fig. 2 is that automatic test BMC web assets information function is under a kind of Linux provided by the embodiments of the present application System, as shown in Figure 2, the test macro of the present embodiment include RESTful interface login module 1, and URL assets information obtains module 2, Linux assets information obtains module 3, assets information comparison module 4, test script generation module 5, batch testing script generation mould Block 6;
RESTful interface login module 1 logs in BMC by RESTful interface using curl order for remotely controlling machine web;
URL assets information obtains module 2 and obtains corresponding service for the path URL according to BMC web assets information Device assets information;
Linux assets information obtains module 3, for the reading service device assets information under linux system;
Assets information comparison module 4, for by the URL assets information server assets information that gets of acquisition module with Linux assets information obtains the server assets information that module is read and is compared;If the two compares unanimously, test passes through; Otherwise, test crash;
Test script generation module 5 forms automatic test for the order of all execution to be integrated into shell script Script;
Batch testing script generation module 6, the automatic test script for executing multiple and different BMC IP address Get up to form batch testing script parallel.
Specifically, the URL assets information, which obtains module 2, determines the path URL of BMC web assets information module such as Under:
(1)URL:/ api/status/cpu_info, for obtaining CPU title, frequency, the information such as power consumption;
(2)URL:/ api/status/device_inventory, for obtaining network interface card, the information such as RAID card;
(3)URL:/ api/status/memory_info, for obtaining memory model, capacity, frequency, the information such as manufacturer.
Further, the Linux assets information obtains the reading service device assets information under linux system of module 3 It orders as follows:
(1) cat/proc/cpuinfo, for reading CPU assets information;
(2) cat/proc/meminfo, for reading memory assets information;
(3) lspci | grep-i eth, for reading network interface card assets information;
(4) lspci | grep-i raid, for reading RAID card assets information.
The above is only a specific embodiment of the invention, is made skilled artisans appreciate that or realizing this hair It is bright.Various modifications to these embodiments will be apparent to one skilled in the art, as defined herein General Principle can be realized in other embodiments without departing from the spirit or scope of the present invention.Therefore, of the invention It is not intended to be limited to the embodiments shown herein, and is to fit to and the principles and novel features disclosed herein phase one The widest scope of cause.

Claims (7)

1. a kind of method of automatic test BMC web assets information function under Linux, which is characterized in that include the following steps:
BMC web is logged in by RESTful interface remote;
According to the path URL of BMC web assets information module, corresponding server assets information is obtained;
The reading service device assets information under linux system;
The server assets information got by RESTful interface is believed with the server assets read under linux system Breath is compared;
If consistent, test passes through;Otherwise, test crash.
2. the method for automatic test BMC web assets information function, feature exist under Linux according to claim 1 In the server assets information read under the server assets information that will be obtained by RESTful interface and linux system It further include following step after being compared:
The order of all execution is integrated into shell script and forms automatic test script, it is automatic by executing test script Test result is generated, and test result is stored in journal file.
3. the method for automatic test BMC web assets information function, feature exist under Linux according to claim 2 In it further includes following steps that the order by all execution, which is integrated into shell script and is formed after automatic test script, Suddenly:
Different BMC IP address is given, each BMC IP address executes an automatic test script, then by all surveys Examination script parallel execution gets up to form batch testing script, and batch of server assets information is carried out by executing batch testing script Measure examination.
4. the method for automatic test BMC web assets information function, feature exist under Linux according to claim 1 In, the server assets information read under linux system, including CPU assets information, memory assets information, network interface card money Produce information and RAID card assets information.
5. the system of automatic test BMC web assets information function under a kind of Linux, which is characterized in that the system comprises:
RESTful interface login module logs in BMC web by RESTful interface for remotely controlling machine;
URL assets information obtains module and obtains corresponding server assets for the path URL according to BMC web assets information Information;
Linux assets information obtains module, for the reading service device assets information under linux system;
Assets information comparison module, server assets information and Linux for getting URL assets information acquisition module provide The server assets information that data obtaining module is read is produced to be compared;If the two compares unanimously, test passes through;Otherwise, it surveys Examination failure.
6. the system of automatic test BMC web assets information function, feature exist under Linux according to claim 5 In the system also includes test script generation modules, are formed certainly for the order of all execution to be integrated into shell script Dynamicization test script.
7. the system of automatic test BMC web assets information function, feature exist under Linux according to claim 6 In the system also includes batch testing script generation modules, the automation for executing multiple and different BMC IP address Test script gets up to be formed batch testing script parallel.
CN201810581678.1A 2018-06-07 2018-06-07 The method and system of automatic test BMC web assets information function under a kind of Linux Pending CN108829594A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810581678.1A CN108829594A (en) 2018-06-07 2018-06-07 The method and system of automatic test BMC web assets information function under a kind of Linux

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810581678.1A CN108829594A (en) 2018-06-07 2018-06-07 The method and system of automatic test BMC web assets information function under a kind of Linux

Publications (1)

Publication Number Publication Date
CN108829594A true CN108829594A (en) 2018-11-16

Family

ID=64144710

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810581678.1A Pending CN108829594A (en) 2018-06-07 2018-06-07 The method and system of automatic test BMC web assets information function under a kind of Linux

Country Status (1)

Country Link
CN (1) CN108829594A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109510742A (en) * 2019-01-25 2019-03-22 郑州云海信息技术有限公司 A kind of server network interface card remote test method, device, terminal and storage medium
CN109992504A (en) * 2019-03-07 2019-07-09 苏州浪潮智能科技有限公司 A kind of server Redfish test method, system, terminal and storage medium
CN110659166A (en) * 2019-09-03 2020-01-07 苏州浪潮智能科技有限公司 Method and equipment for testing BMC asset information function
CN110795339A (en) * 2019-09-29 2020-02-14 苏州浪潮智能科技有限公司 Method, device and medium for testing configuration program code of server
CN110928771A (en) * 2019-10-30 2020-03-27 苏州浪潮智能科技有限公司 Method and system for timed automatic batch test of Rest interfaces
CN110941522A (en) * 2019-11-22 2020-03-31 英业达科技有限公司 Pressure testing method, system, medium and device of baseboard management controller

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1797366A (en) * 2004-12-30 2006-07-05 英业达股份有限公司 Method and system for testing computer platform
US20100205600A1 (en) * 2009-02-06 2010-08-12 Inventec Corporation Simulation method for realizing large batches and different kinds of baseboard management controllers using a single server
CN104639370A (en) * 2015-02-02 2015-05-20 浪潮电子信息产业股份有限公司 Method for acquiring system PCI-E equipment information through out-of-band management
CN105068920A (en) * 2015-07-17 2015-11-18 浪潮电子信息产业股份有限公司 Shell-based method for testing stability of rack asset information
CN105893261A (en) * 2016-04-01 2016-08-24 浪潮电子信息产业股份有限公司 Method for automatically testing stability of BMC (baseboard management controller) of server
US20170024303A1 (en) * 2015-07-24 2017-01-26 American Megatrends, Inc. System and method of runtime downloading of debug code and diagnostics tools in an already deployed baseboard management controller (bmc) devices
CN107590392A (en) * 2017-08-14 2018-01-16 大唐高鸿信安(浙江)信息科技有限公司 Utilize the system and method for script verification hardware integrity
CN107688539A (en) * 2017-09-08 2018-02-13 郑州云海信息技术有限公司 A kind of BMC Web test systems

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1797366A (en) * 2004-12-30 2006-07-05 英业达股份有限公司 Method and system for testing computer platform
US20100205600A1 (en) * 2009-02-06 2010-08-12 Inventec Corporation Simulation method for realizing large batches and different kinds of baseboard management controllers using a single server
CN104639370A (en) * 2015-02-02 2015-05-20 浪潮电子信息产业股份有限公司 Method for acquiring system PCI-E equipment information through out-of-band management
CN105068920A (en) * 2015-07-17 2015-11-18 浪潮电子信息产业股份有限公司 Shell-based method for testing stability of rack asset information
US20170024303A1 (en) * 2015-07-24 2017-01-26 American Megatrends, Inc. System and method of runtime downloading of debug code and diagnostics tools in an already deployed baseboard management controller (bmc) devices
CN105893261A (en) * 2016-04-01 2016-08-24 浪潮电子信息产业股份有限公司 Method for automatically testing stability of BMC (baseboard management controller) of server
CN107590392A (en) * 2017-08-14 2018-01-16 大唐高鸿信安(浙江)信息科技有限公司 Utilize the system and method for script verification hardware integrity
CN107688539A (en) * 2017-09-08 2018-02-13 郑州云海信息技术有限公司 A kind of BMC Web test systems

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109510742A (en) * 2019-01-25 2019-03-22 郑州云海信息技术有限公司 A kind of server network interface card remote test method, device, terminal and storage medium
CN109510742B (en) * 2019-01-25 2022-02-18 郑州云海信息技术有限公司 Server network card remote test method, device, terminal and storage medium
CN109992504A (en) * 2019-03-07 2019-07-09 苏州浪潮智能科技有限公司 A kind of server Redfish test method, system, terminal and storage medium
CN110659166A (en) * 2019-09-03 2020-01-07 苏州浪潮智能科技有限公司 Method and equipment for testing BMC asset information function
CN110659166B (en) * 2019-09-03 2022-08-02 苏州浪潮智能科技有限公司 Method and equipment for testing BMC asset information function
CN110795339A (en) * 2019-09-29 2020-02-14 苏州浪潮智能科技有限公司 Method, device and medium for testing configuration program code of server
CN110928771A (en) * 2019-10-30 2020-03-27 苏州浪潮智能科技有限公司 Method and system for timed automatic batch test of Rest interfaces
CN110941522A (en) * 2019-11-22 2020-03-31 英业达科技有限公司 Pressure testing method, system, medium and device of baseboard management controller

Similar Documents

Publication Publication Date Title
CN108829594A (en) The method and system of automatic test BMC web assets information function under a kind of Linux
US12010178B2 (en) Intelligent edge computing platform with machine learning capability
KR102471665B1 (en) Edge Intelligence Platform and Internet of Things Sensor Stream System
US10402253B2 (en) Methods and systems to detect and classify changes in a distributed computing system
US20200267242A1 (en) Cloud assisted behavioral automated testing
CN104518924B (en) Automatic testing and result comparison method and system
US11023349B2 (en) Load test framework
CN111124850A (en) MQTT server performance testing method, system, computer equipment and storage medium
US20150067153A1 (en) Remote monitoring of data facility in real-time using wireless sensor network
US20100153780A1 (en) Techniques for generating a reusable test script for a multiple user performance test
CN110750458A (en) Big data platform testing method and device, readable storage medium and electronic equipment
CN104932974B (en) A kind of script conversion method and device
US10073755B2 (en) Tracing source code for end user monitoring
US20110161395A1 (en) Synthetic transaction monitoring and management of scripts
CN102411526A (en) Test method of mainboard of blade server
CN105487859B (en) A kind of big data component WEB dispositions methods based on template
CN107003931B (en) Decoupling test validation from test execution
CN109254922A (en) A kind of automated testing method and device of server B MC Redfish function
Jiang et al. Design of software-defined gateway for industrial interconnection
Wang et al. A model-based framework for cloud API testing
Chen et al. FRL-MFPG: Propagation-aware fault root cause location for microservice intelligent operation and maintenance
CN109783295A (en) Test macro self-test method for producing software and device based on configuration
CN109766228A (en) Verification method and device on a kind of line based on interface
CN111125005B (en) Method, system and equipment for optimizing IO performance of HDFS distributed file system
Song et al. Transformer Equipment Temperature Monitoring Based on the Network Framework of Django

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20181116