[go: up one dir, main page]

CN103412815B - RMC software automated testing method mainly based on expect tool - Google Patents

RMC software automated testing method mainly based on expect tool Download PDF

Info

Publication number
CN103412815B
CN103412815B CN201310346742.5A CN201310346742A CN103412815B CN 103412815 B CN103412815 B CN 103412815B CN 201310346742 A CN201310346742 A CN 201310346742A CN 103412815 B CN103412815 B CN 103412815B
Authority
CN
China
Prior art keywords
rmc
expect
host
test
software
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
CN201310346742.5A
Other languages
Chinese (zh)
Other versions
CN103412815A (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.)
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 CN201310346742.5A priority Critical patent/CN103412815B/en
Publication of CN103412815A publication Critical patent/CN103412815A/en
Application granted granted Critical
Publication of CN103412815B publication Critical patent/CN103412815B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Stored Programmes (AREA)
  • Debugging And Monitoring (AREA)

Abstract

本发明公开了一种主要基于expect工具的RMC软件的自动化测试的方法,具体步骤如下:1、搭建HOST端服务器,安装Linux系统;将HOST通过网络连接到机柜的RMC网络上;设置网络,使HOST端服务器和机柜的RMC二者联通并记录RMC IP地址;2、运行自动化测试脚本:首先创建一个配置文件,将RMC的相关项设置值保存到该文件中,然后通过expect从HOST上登入到RMC上并将RMC相关信息都抓取处理,保存到临时文件中,最后通过文本编辑工具从该临时文件中读取出RMC相关项的设置值与配置文件中的值对比,得出测试结果。本方法的使用大大简化了RMC软件的测试过程,减少了人力的投入。

The invention discloses a method for automatic testing of RMC software mainly based on the expect tool. The specific steps are as follows: 1. Build a HOST server and install a Linux system; connect the HOST to the RMC network of the cabinet through the network; set up the network so that The HOST server and the RMC of the cabinet are connected and record the RMC IP address; 2. Run the automated test script: first create a configuration file, save the setting values of RMC related items into the file, and then log in from the HOST to the Capture and process RMC-related information on the RMC, save it to a temporary file, and finally use a text editing tool to read the setting values of RMC-related items from the temporary file and compare them with the values in the configuration file to obtain the test results. The use of this method greatly simplifies the testing process of RMC software and reduces the input of manpower.

Description

一种主要基于expect工具的RMC软件的自动化测试的方法A method for automated testing of RMC software mainly based on the expect tool

技术领域technical field

本发明涉及计算机技术领域,具体涉及一种RMC软件的自动化测试的方法。The invention relates to the technical field of computers, in particular to a method for automatic testing of RMC software.

背景技术Background technique

随着IT领域技术的不断发展,技术的更新换代时间越来越短。产品开发的周期也是越来越短。在产品开发中 ,测试的重要性也是越来越得到重视。但是,由于传统的测试需要大量的人力投入,这对很多公司都有不小的挑战,特别是一些中小公司。这个时候,测试的自动化显得格外的重要。With the continuous development of technology in the IT field, the replacement time of technology is getting shorter and shorter. The product development cycle is getting shorter and shorter. In product development, the importance of testing is getting more and more attention. However, because traditional testing requires a lot of manpower input, it poses great challenges to many companies, especially some small and medium-sized companies. At this time, the automation of testing is particularly important.

RMC是属于天蝎项目上的机柜的管理模块,而天蝎项目是由阿里巴巴、百度、腾讯三方合作推动、众多服务器厂商参与的一整套整机柜服务器解决方案。英特尔担任该项目顾问。该项目将致力于推进数据中心基础架构的技术发展,和制定开放的行业规范。天蝎项目旨在共同推动行业合作、产业创新和新技术的应用,推动业界统一整机柜服务器规范、推动产业链配套和规模化生产、持续降低营运成本、提高服务器部署速度和运维效率。RMC is the management module of the cabinet belonging to the Scorpio project, and the Scorpio project is a complete set of cabinet server solutions promoted by the cooperation of Alibaba, Baidu, and Tencent, and participated by many server manufacturers. Intel served as a consultant for the project. The project will be dedicated to advancing the technical development of data center infrastructure and developing open industry specifications. The Scorpio project aims to jointly promote industry cooperation, industry innovation and the application of new technologies, promote the industry to unify the server specifications of the entire cabinet, promote industrial chain support and large-scale production, continuously reduce operating costs, and improve server deployment speed and operation and maintenance efficiency.

RMC主要两部分组成,RMC管理主板和RMC 管理软件。RMC管理软件主要遵循”机柜管理单元RMC CLI规范 Version 1.0”,其中RMC CLI定义参考SMASH SM_CLP 标准进行定义,具体参考模型为SM_CLP的“Modular System Profile”(参考文献:DSP1008)。如图2所示,采用SM_CLP的树形结构定义,便于灵活扩展。RMC mainly consists of two parts, RMC management board and RMC management software. The RMC management software mainly follows the "Rack Management Unit RMC CLI Specification Version 1.0", where the RMC CLI definition refers to the SMASH SM_CLP standard for definition, and the specific reference model is the "Modular System Profile" of SM_CLP (reference: DSP1008). As shown in Figure 2, the tree structure definition of SM_CLP is used to facilitate flexible expansion.

发明内容Contents of the invention

本发明所要解决的技术问题是减少人工干预,节省人力的投入,提高测试的速度。The technical problem to be solved by the invention is to reduce manual intervention, save manpower input, and improve testing speed.

整个测试过程主要是基于网络对HOST端对RMC单元的操作,主要基于expect工具实现测试步骤的自动化执行,测试结果的自动保存以及处理。The whole test process is mainly based on the operation of the network to the HOST end to the RMC unit, mainly based on the expect tool to realize the automatic execution of the test steps, and the automatic saving and processing of the test results.

其中,Expect是一个免费的编程工具语言,用来实现自动和交互式任务进行通信,而无需人的干预。使用它可以创建脚本用来实现对命令或程序提供输入,而这些命令和程序是期望从终端(terminal)得到输入,一般来说这些输入都需要手工输入进行的。 Expect则可以根据程序的提示模拟标准输入提供给程序需要的输入来实现交互程序执行。Among them, Expect is a free programming tool language used to realize automatic and interactive tasks to communicate without human intervention. Use it to create scripts to provide input to commands or programs, and these commands and programs expect input from the terminal (terminal). Generally speaking, these inputs require manual input. Expect can simulate the standard input according to the prompt of the program to provide the input required by the program to realize interactive program execution.

Expect脚本由一系列expect-send对组成:expect等待输出中输出特定的字符,通常是一个提示符,然后发送特定的响应。Expect scripts consist of a series of expect-send pairs: expect waits for a specific character in the output, usually a prompt, and then sends a specific response.

本发明所采取的技术方案是:一种主要基于expect工具的RMC软件的自动化测试的方法, 具体步骤如下:The technical scheme that the present invention takes is: a kind of method mainly based on the automatic testing of the RMC software of expect tool, concrete steps are as follows:

1、搭建测试环境:1. Build a test environment:

a.搭建HOST端服务器,安装Linux系统;a. Build the HOST server and install the Linux system;

b.将HOST通过网络连接到机柜的RMC网络上;b. Connect the HOST to the RMC network of the cabinet through the network;

c.设置网络,使HOST端服务器和机柜的RMC二者联通并记录RMC IP地址;c. Set up the network so that the HOST server and the RMC of the cabinet are connected and record the RMC IP address;

2、运行自动化测试脚本:2. Run the automated test script:

首先创建一个配置文件,将RMC的相关项设置值保存到该文件中,然后通过expect从HOST上登入到RMC上并将RMC相关信息都抓取处理,保存到临时文件中。最后通过文本编辑工具从该临时文件中读取出RMC相关项的设置值与配置文件中的值对比,得出测试结果。First create a configuration file, save the setting values of RMC related items into this file, and then log in to RMC from HOST through expect and capture and process RMC related information and save it to a temporary file. Finally, read the setting values of RMC-related items from the temporary file through the text editing tool and compare them with the values in the configuration file to obtain the test results.

所述文本编辑工具为awk,sed,grep或自己编译的小程序。The text editing tool is awk, sed, grep or a small program compiled by oneself.

以下是各种功能的测试:Here are the tests for various functions:

a.散热功能测试a. Heat dissipation function test

该过程主要通过expect从HOST上登入到RMC上对散热做相关设置,并记录RMC日志和风扇转速。根据不同的占空比,风扇转速应该不一致。从而判断该部分功能是否测试通过。This process mainly uses expect to log in to the RMC from the HOST to make relevant heat dissipation settings, and record the RMC log and fan speed. Depending on the duty cycle, the fan speed should be inconsistent. In order to judge whether the part of the function is tested or not.

b.电源功能测试b. Power function test

该过程主要通过expect从HOST上登入到RMC上对电源做不同的设置,根据电源状态和RMC日志判断测试是否通过This process mainly uses expect to log in to the RMC from the HOST to make different settings for the power supply, and judge whether the test is passed according to the power supply status and RMC logs.

c.节点管理功能测试c. Node management function test

该过程主要通过expect从HOST上登入到RMC上对节点做如下测试:更改IP设置,开、关节点,开节点UID等并保存RMC日志和节点状态。根据RMC日志和节点状态来判断测试是否通过。This process mainly uses expect to log in to the RMC from the HOST to do the following tests on the node: change the IP setting, open the joint node, open the node UID, etc. and save the RMC log and node status. Judge whether the test passes according to the RMC log and node status.

d.RMC管理功能测试d. RMC management function test

该过程主要通过expect从HOST上登入到RMC上对RMC system下的参数做相关设置并根据设置后的状态判断测试结果。This process mainly uses expect to log in to the RMC from the HOST to set the parameters under the RMC system and judge the test results according to the status after the settings.

e.用户测试e. User testing

该过程主要通过expect从HOST上执行不同的用户登录到RMC并执行相关命令来测试不同用户的功能是否如产品定义。This process mainly uses expect to execute different users from the HOST to log in to RMC and execute related commands to test whether the functions of different users are as defined by the product.

f.其余功能测试f. Other functional tests

该过程主要通过expect和linux脚本从HOST上执行相关命令来测试RMC中未被以上内容覆盖的功能。This process mainly uses expect and linux scripts to execute related commands from the HOST to test the functions in RMC that are not covered by the above content.

本发明的有益效果是:本方法的使用大大简化了RMC软件的测试过程,减少了人力的投入。该方法在产品开发过程的应用,真正体现测试的自动化,体现了IT技术的优势。本方法对于其他产品的测试也有特别的参考意义。The beneficial effects of the invention are: the use of the method greatly simplifies the testing process of the RMC software and reduces the input of manpower. The application of this method in the product development process truly reflects the automation of testing and the advantages of IT technology. This method also has special reference significance for the testing of other products.

附图说明Description of drawings

图1所示为整个测试架构示意图;Figure 1 shows a schematic diagram of the entire test architecture;

图2所示为RMC CLI的结构示意图图。Figure 2 is a schematic diagram of the structure of the RMC CLI.

具体实施方式detailed description

下面结合附图和具体实施例对本发明的一种主要基于expect工具的RMC软件的自动化测试的方法, 具体步骤如下:Below in conjunction with accompanying drawing and specific embodiment to a kind of method of the automated testing of the RMC software mainly based on expect tool of the present invention, concrete steps are as follows:

1、搭建测试环境:1. Build a test environment:

a.搭建HOST端服务器,安装Linux系统;a. Build the HOST server and install the Linux system;

b.将HOST通过网络连接到机柜的RMC网络上;b. Connect the HOST to the RMC network of the cabinet through the network;

c.设置网络,使HOST端服务器和机柜的RMC二者联通并记录RMC IP地址;c. Set up the network so that the HOST server and the RMC of the cabinet are connected and record the RMC IP address;

2、运行自动化测试脚本:2. Run the automated test script:

首先创建一个配置文件,将RMC的相关项设置值保存到该文件中,然后通过expect从HOST上登入到RMC上并将RMC相关信息都抓取处理,保存到临时文件中。最后通过文本编辑工具(awk,sed,grep或自己编译的小程序)从该临时文件中读取出RMC相关项的设置值与配置文件中的值对比,得出测试结果。First create a configuration file, save the setting values of RMC related items into this file, and then log in to RMC from HOST through expect and capture and process RMC related information and save it to a temporary file. Finally, use a text editing tool (awk, sed, grep or a small program compiled by yourself) to read the setting values of RMC related items from the temporary file and compare them with the values in the configuration file to obtain the test results.

以下是各种功能的测试:Here are the tests for various functions:

a.散热功能测试a. Heat dissipation function test

该过程主要通过expect从HOST上登入到RMC上对散热做相关设置,并记录RMC日志和风扇转速。根据不同的占空比,风扇转速应该不一致。从而判断该部分功能是否测试通过。This process mainly uses expect to log in to the RMC from the HOST to make relevant heat dissipation settings, and record the RMC log and fan speed. Depending on the duty cycle, the fan speed should be inconsistent. In order to judge whether the part of the function is tested or not.

b.电源功能测试b. Power function test

该过程主要通过expect从HOST上登入到RMC上对电源做不同的设置,根据电源状态和RMC日志判断测试是否通过This process mainly uses expect to log in to the RMC from the HOST to make different settings for the power supply, and judge whether the test is passed according to the power supply status and RMC logs.

c.节点管理功能测试c. Node management function test

该过程主要通过expect从HOST上登入到RMC上对节点做如下测试:更改IP设置,开、关节点,开节点UID等并保存RMC日志和节点状态。根据RMC日志和节点状态来判断测试是否通过。This process mainly uses expect to log in to the RMC from the HOST to do the following tests on the node: change the IP setting, open the joint node, open the node UID, etc., and save the RMC log and node status. Judge whether the test passes according to the RMC log and node status.

d.RMC管理功能测试d. RMC management function test

该过程主要通过expect从HOST上登入到RMC上对RMC system下的参数做相关设置并根据设置后的状态判断测试结果。This process mainly uses expect to log in to the RMC from the HOST to set the parameters under the RMC system and judge the test results according to the status after the settings.

e.用户测试e. User testing

该过程主要通过expect从HOST上执行不同的用户登录到RMC并执行相关命令来测试不同用户的功能是否如产品定义。This process mainly uses expect to execute different users from the HOST to log in to RMC and execute related commands to test whether the functions of different users are as defined by the product.

f.其余功能测试f. Other functional tests

该过程主要通过expect和linux脚本从HOST上执行相关命令来测试RMC中未被以上内容覆盖的功能。This process mainly uses expect and linux scripts to execute related commands from the HOST to test the functions in RMC that are not covered by the above content.

Claims (7)

1. a kind of method of the automatic test of the RMC software being based primarily upon expect instrument it is characterised in that:Methods described has Body step is as follows:
1) build test environment:
Build HOST end server, linux system is installed;
HOST is passed through network connection on the RMC network of rack;
Setting network, makes both RMC UNICOM of HOST end server and rack and records RMC IP address;
2)Run automatic test script:
First create a configuration file, the continuous item arranges value of RMC is saved in this document, then pass through expect from Login on RMC on HOST and all crawls of RMC relevant information are processed, be saved in temporary file, finally by text editing Instrument reads out the arranges value of RMC continuous item from this temporary file and the value in configuration file contrasts, and draws test result.
2. the method for the automatic test of a kind of RMC software being based primarily upon expect instrument according to claim 1, its It is characterised by:Described the text edit tool is awk, the small routine of sed, grep or oneself compiling.
3. the side of the automatic test of a kind of RMC software being based primarily upon expect instrument according to claim 1 and 2 Method it is characterised in that:Logined from HOST by expect and related setting is to radiating on RMC, and record RMC daily record and wind Fan rotating speed, according to different dutycycles, the change of rotation speed of the fan, judges whether heat sinking function is tested and passes through.
4. the side of the automatic test of a kind of RMC software being based primarily upon expect instrument according to claim 1 and 2 Method it is characterised in that:Logined from HOST by expect and different settings be to power supply on RMC, according to power supply status and Whether RMC daily record judges power supply function by test.
5. the side of the automatic test of a kind of RMC software being based primarily upon expect instrument according to claim 1 and 2 Method it is characterised in that:Logined from HOST by expect and following test is to node on RMC:Change IP setting, open and close Node, opens node UID and preserves RMC daily record and node state, according to RMC daily record and node state come decision node management function Test whether to pass through.
6. the side of the automatic test of a kind of RMC software being based primarily upon expect instrument according to claim 1 and 2 Method it is characterised in that:Logined from HOST by expect and related setting root are to the parameter under RMC system on RMC According to the condition adjudgement RMC management function test result after setting.
7. the side of the automatic test of a kind of RMC software being based primarily upon expect instrument according to claim 1 and 2 Method it is characterised in that:By expect, different User logs ins are executed from HOST to RMC and to execute related command and test not Function whether such as Product Definition with user.
CN201310346742.5A 2013-08-12 2013-08-12 RMC software automated testing method mainly based on expect tool Active CN103412815B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310346742.5A CN103412815B (en) 2013-08-12 2013-08-12 RMC software automated testing method mainly based on expect tool

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310346742.5A CN103412815B (en) 2013-08-12 2013-08-12 RMC software automated testing method mainly based on expect tool

Publications (2)

Publication Number Publication Date
CN103412815A CN103412815A (en) 2013-11-27
CN103412815B true CN103412815B (en) 2017-02-08

Family

ID=49605828

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310346742.5A Active CN103412815B (en) 2013-08-12 2013-08-12 RMC software automated testing method mainly based on expect tool

Country Status (1)

Country Link
CN (1) CN103412815B (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104978259B (en) * 2014-04-01 2017-11-17 中国银联股份有限公司 Mobile device software automated testing group system and its method of testing
CN103970655A (en) * 2014-05-08 2014-08-06 浪潮电子信息产业股份有限公司 Expect-based automatic server cluster testing method
CN104317714A (en) * 2014-10-29 2015-01-28 浪潮电子信息产业股份有限公司 Method for automatically testing stability of rack based on expect
CN104535940B (en) * 2015-01-16 2017-06-27 浪潮电子信息产业股份有限公司 Linux system based automatic UID lamp stability testing method
CN104506389A (en) * 2015-01-29 2015-04-08 浪潮电子信息产业股份有限公司 Integral high-density server stability testing method
CN105119746A (en) * 2015-08-27 2015-12-02 浪潮电子信息产业股份有限公司 Intelligent monitoring method for SMARTRACK whole cabinet server configuration based on RMC management
CN105468489A (en) * 2015-12-09 2016-04-06 浪潮电子信息产业股份有限公司 Rack cabinet RMC communication pressure measurement method
CN105354124A (en) * 2015-12-10 2016-02-24 浪潮电子信息产业股份有限公司 Method for improving anomaly detection efficiency of SMARTRACK system
CN107179991A (en) * 2017-05-17 2017-09-19 郑州云海信息技术有限公司 A kind of method of automatic checking Rack racks RMC stability
CN107239401B (en) * 2017-06-09 2020-09-22 苏州浪潮智能科技有限公司 An automated method for collecting basic information of the system under test for web attack testing
TWI671629B (en) * 2018-12-15 2019-09-11 英業達股份有限公司 Rack and electronic device set in the rack test system and method thereof

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7421662B1 (en) * 2005-10-11 2008-09-02 Sprint Communications Company L.P. Automating interaction with a host computing device
CN101946258A (en) * 2007-12-20 2011-01-12 惠普开发有限公司 Model based deployment of computer based business process on dedicated hardware
CN103092754A (en) * 2013-01-07 2013-05-08 上海斐讯数据通信技术有限公司 Automatic test method of long distance multi-device condition

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6898785B2 (en) * 2001-08-16 2005-05-24 Hewlett-Packard Development Company, L.P. Handling calls from relocated instrumented functions to functions that expect a return pointer value in an original address space
EP2012517A1 (en) * 2007-07-04 2009-01-07 Nokia Siemens Networks Oy Method and device for data processing and communication system comprising such device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7421662B1 (en) * 2005-10-11 2008-09-02 Sprint Communications Company L.P. Automating interaction with a host computing device
CN101946258A (en) * 2007-12-20 2011-01-12 惠普开发有限公司 Model based deployment of computer based business process on dedicated hardware
CN103092754A (en) * 2013-01-07 2013-05-08 上海斐讯数据通信技术有限公司 Automatic test method of long distance multi-device condition

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
嵌入式软件测试自动化技术研究;卫征;《中国优秀硕士学位论文全文库》;20090915;全文 *
网络协议栈软件的自动化测试研究与实现;刘渊等;《计算机工程与应用》;20050815(第15期);全文 *

Also Published As

Publication number Publication date
CN103412815A (en) 2013-11-27

Similar Documents

Publication Publication Date Title
CN103412815B (en) RMC software automated testing method mainly based on expect tool
CN106844190B (en) Test script automatic generation method and device
CN105068920B (en) Shell-based method for testing stability of rack asset information
CN101866315B (en) Test method and system of software development tool
CN104572419A (en) Method for testing dynamic power consumption of servers
CN103942099B (en) Executing tasks parallelly method and device based on Hive
CN110928783A (en) RobotFramework-based automatic test datamation reconstruction platform
CN104317714A (en) Method for automatically testing stability of rack based on expect
CN108923997B (en) Cloud service node automatic testing method and device based on python
CN106649014A (en) Automatic testing method of calculating type server which supports multiple GPUs
CN107608880A (en) A kind of automated testing method for being used for virtual platform based on data-driven
CN106598615A (en) Recipe program code generation method and recipe compiling cloud platform system
CN104391780A (en) Method for automatically checking stability of power supply redundancy function of server
CN116483730A (en) Service system automatic test method based on domestic software and hardware and open source test tool
CN104484254A (en) Method for testing influence of internal vibration of high-density cabinet on I/O (Input/Output) performance
CN104535940B (en) Linux system based automatic UID lamp stability testing method
CN104572467A (en) Method for testing performance of virtual platform database of server
CN106649018A (en) Testing method of stability of storage system with expansion cabinet
CN104820627A (en) Method for automatically testing CPU computing performance
CN108132881A (en) A kind of automated testing method and system
CN106528408A (en) Test system of nuclear power design program
CN112015963A (en) Web crawler system based on big data
CN109741780A (en) Method and system for testing SSD performance based on Linux system
CN108073487A (en) A kind of server Hostname reporting functions test method and system
CN109669827A (en) A kind of automated testing method of BIOS module TurboMode function

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C41 Transfer of patent application or patent right or utility model
TA01 Transfer of patent application right

Effective date of registration: 20161215

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

Applicant after: Zhengzhou Yunhai Information Technology Co. Ltd.

Address before: 250014 Shandong Province, Ji'nan City hi tech Development Zone, Nga Road No. 1036

Applicant before: Langchao Electronic Information Industry Co., Ltd.

C14 Grant of patent or utility model
GR01 Patent grant