[go: up one dir, main page]

CN104461910B - It is a kind of to realize the device and method tested automatically - Google Patents

It is a kind of to realize the device and method tested automatically Download PDF

Info

Publication number
CN104461910B
CN104461910B CN201510007536.0A CN201510007536A CN104461910B CN 104461910 B CN104461910 B CN 104461910B CN 201510007536 A CN201510007536 A CN 201510007536A CN 104461910 B CN104461910 B CN 104461910B
Authority
CN
China
Prior art keywords
hardware
hardware environment
unit
software
power
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
CN201510007536.0A
Other languages
Chinese (zh)
Other versions
CN104461910A (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.)
Inspur Beijing Electronic Information Industry Co Ltd
Original Assignee
Inspur Beijing Electronic Information Industry 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 Inspur Beijing Electronic Information Industry Co Ltd filed Critical Inspur Beijing Electronic Information Industry Co Ltd
Priority to CN201510007536.0A priority Critical patent/CN104461910B/en
Publication of CN104461910A publication Critical patent/CN104461910A/en
Application granted granted Critical
Publication of CN104461910B publication Critical patent/CN104461910B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

本发明提供一种实现自动测试的装置及方法,包括:测试任务单元、软件执行单元和硬件环境单元;其中,测试任务单元,用于按照测试任务向软件执行单元和硬件环境单元发出与硬件相关的软件测试命令;硬件环境单元,用于产生与硬件相关的软件测试命令对应的硬件环境动作;软件执行单元,用于基于与硬件相关的软件测试命令的硬件环境动作,对存储系统执行所述与硬件相关的软件测试命令。本发明在完成与逻辑相关的软件测试命令基础上,通过硬件环境单元,用于产生用于执行与硬件相关的软件测试命令的硬件环境动作,为实现与硬件相关的软件测试命令的测试提供了基础,实现了对存储系统更为全面测试,提高存储系统的可靠性。

The present invention provides a device and method for realizing automatic testing, including: a test task unit, a software execution unit, and a hardware environment unit; wherein, the test task unit is used to send hardware-related information to the software execution unit and the hardware environment unit according to the test task. The software test command; the hardware environment unit is used to generate the hardware environment action corresponding to the software test command related to the hardware; the software execution unit is used to execute the storage system based on the hardware environment action of the software test command related to the hardware. Software test commands related to hardware. The present invention, on the basis of completing the logic-related software test command, uses the hardware environment unit to generate the hardware environment action for executing the hardware-related software test command, and provides a solution for realizing the test of the hardware-related software test command. The foundation realizes a more comprehensive test of the storage system and improves the reliability of the storage system.

Description

一种实现自动测试的装置及方法A device and method for realizing automatic testing

技术领域technical field

本发明涉及计算机测试技术,尤指一种基于存储系统的实现自动测试的装置及方法。The invention relates to computer testing technology, in particular to a storage system-based device and method for realizing automatic testing.

背景技术Background technique

随着软件工程技术的不断发展,软件的测试技术日臻成熟。近年来自动化软件测试工具层出不穷,从单元测试工具到自动化脚本功能测试工具,甚至基于模式识别的图形用户界面(GUI)测试工具。这些测试工具可以方便地实现对软件功能和流程的测试,从而保证软件发布时的质量。With the continuous development of software engineering technology, software testing technology is becoming more and more mature. In recent years, automated software testing tools have emerged in an endless stream, ranging from unit testing tools to automated script function testing tools, and even graphical user interface (GUI) testing tools based on pattern recognition. These testing tools can easily realize the testing of software functions and processes, so as to ensure the quality of the software when it is released.

存储系统在信息系统中有着举足轻重的地位,存储系统的Bug或者故障,轻则导致服务中断,重则导致数据的丢失,从而给用户带来极大的损失。鉴于此,在工业生产中,存储系统在出厂之前,需要对其进行全面测试评估,以尽量避免产品在上市之后出现严重质量问题。The storage system plays a pivotal role in the information system. Bugs or faults in the storage system may cause service interruption at least, or data loss at worst, which will bring great losses to users. In view of this, in industrial production, before the storage system leaves the factory, it needs to be fully tested and evaluated to avoid serious quality problems after the product is launched.

目前,针对存储系统开发的软件测试方法虽有很多,而且不尽相同,如申请号为“CN102495804A”,发明名称为“软件自动化测试方法”的在先申请,公开了一种软件自动化测试方法,大致包括:通过对自动化测试任务以及各自动化测试任务所包含的测试用例的执行顺序进行优化排序,可以有效提高整个自动化测试过程的执行效率。该测试方法能够实现对与逻辑相关的软件测试命令如偏重验证软件功能的测试,但是,不能触发软件运行硬件环境(也称物理环境)动作(如插拔操作),因此,无法对与硬件相关的软件测试命令如异常故障场景的测试。At present, although there are many software testing methods developed for storage systems, they are not the same. For example, the previous application with the application number "CN102495804A" and the invention name "Software Automation Testing Method" discloses a software automation testing method. It generally includes: by optimizing the execution sequence of the automated testing tasks and the test cases contained in each automated testing task, the execution efficiency of the entire automated testing process can be effectively improved. This test method can realize the software test command related to logic such as the test that focuses on verifying software functions, but it cannot trigger the software to run in the hardware environment (also known as the physical environment) actions (such as plugging and unplugging operations). Software testing commands such as testing of abnormal failure scenarios.

发明内容Contents of the invention

为了解决上述技术问题,本发明提供一种实现自动测试的装置及方法,能够对依赖于硬件环境的与硬件相关的软件测试命令进行测试。In order to solve the above-mentioned technical problems, the present invention provides a device and method for realizing automatic testing, capable of testing hardware-related software test commands that depend on the hardware environment.

为了达到上述发明目的,本发明公开了一种实现自动测试的装置,包括:测试任务单元、软件执行单元和硬件环境单元;其中,In order to achieve the purpose of the above invention, the present invention discloses a device for realizing automatic testing, including: a testing task unit, a software execution unit and a hardware environment unit; wherein,

测试任务单元,用于按照测试任务向软件执行单元和硬件环境单元发出与硬件相关的软件测试命令;The test task unit is used to send hardware-related software test commands to the software execution unit and the hardware environment unit according to the test task;

硬件环境单元,用于产生与硬件相关的软件测试命令对应的硬件环境动作;A hardware environment unit, configured to generate hardware environment actions corresponding to hardware-related software test commands;

软件执行单元,用于基于与硬件相关的软件测试命令的硬件环境动作,对存储系统执行所述与硬件相关的软件测试命令。The software execution unit is configured to execute the hardware-related software test command on the storage system based on the hardware environment action of the hardware-related software test command.

进一步地,硬件环境单元包括:基座、固定部件、动力装置、动力杆和硬件执行控制装置,其中,Further, the hardware environment unit includes: a base, a fixed component, a power device, a power rod and a hardware execution control device, wherein,

在所述基座的承载面固定所述固定部件和所述动力装置;fixing the fixing component and the power device on the bearing surface of the base;

所述动力装置的输出端与所述存储系统的插拔口相对;The output end of the power device is opposite to the plug-in port of the storage system;

所述动力装置的输出端与所述动力杆的固定端连接,所述动力杆的悬臂端设有与所述存储系统的插拔口相匹配的插拔件;The output end of the power device is connected to the fixed end of the power rod, and the cantilever end of the power rod is provided with a plug-in piece that matches the plug-in port of the storage system;

所述硬件执行控制装置的输入端与所述测试任务单元连接,用于接收所述测试任务单元发送的与硬件相关的软件测试命令;根据所述与硬件相关的软件测试命令生成与硬件相关的软件测试命令对应的硬件环境动作的控制信息;硬件执行控制装置的输出端与所述动力装置的信号输入端连接,用于传输所述硬件环境动作的控制信息到所述动力装置;The input terminal of the hardware execution control device is connected with the test task unit, and is used to receive the hardware-related software test command sent by the test task unit; generate the hardware-related test command according to the hardware-related software test command. The control information of the hardware environment action corresponding to the software test command; the output end of the hardware execution control device is connected to the signal input end of the power device, and is used to transmit the control information of the hardware environment action to the power device;

所述动力装置根据所述硬件环境动作的控制信息,驱动所述动力杆带动所述插拔件在所述动力杆的轴向往复运动,以获得所述与硬件相关的软件测试命令的硬件环境动作。The power device drives the power rod to drive the plug-in member to reciprocate in the axial direction of the power rod according to the control information of the hardware environment action, so as to obtain the hardware environment of the hardware-related software test command action.

进一步地,动力装置与所述动力杆之间还设有传动装置;Further, a transmission device is also provided between the power device and the power rod;

所述传动装置为液压传动装置、电磁传动装置或者齿轮传动装置。The transmission device is a hydraulic transmission device, an electromagnetic transmission device or a gear transmission device.

进一步地,固定部件以可调方式固定于所述基座的承载面。Further, the fixing component is fixed on the bearing surface of the base in an adjustable manner.

进一步地,硬件环境单元还包括位置传感器,包括的感应元件和激发元件,用于通过感应元件和激发元件监测所述动力杆与所述基座的相对位置。Further, the hardware environment unit further includes a position sensor, including a sensing element and an exciting element, for monitoring the relative position of the power rod and the base through the sensing element and the exciting element.

进一步地,位置传感器为磁性传感器或光电传感器。Further, the position sensor is a magnetic sensor or a photoelectric sensor.

进一步地,硬件环境单元还包括电磁装置,设置于为所述存储系统提供电能的连接电路中,所述硬件执行控制装置的电源模拟信号输出端与所述电磁装置的信号输入端连接,根据与硬件相关的软件测试命令,所述服务器发出控制电磁装置通断,以产生电源状态模拟信号的硬件环境动作。Further, the hardware environment unit also includes an electromagnetic device, which is arranged in the connection circuit that provides electric energy for the storage system, and the power supply analog signal output terminal of the hardware execution control device is connected to the signal input terminal of the electromagnetic device, according to the Hardware-related software test commands, the server issues hardware environment actions to control the on-off of the electromagnetic device to generate a power state simulation signal.

另一方面,本申请还提供一种实现自动测试的方法,包括:On the other hand, the present application also provides a method for realizing automatic testing, including:

按照测试任务向软件执行单元和硬件环境单元发出与硬件相关的软件测试命令;Send hardware-related software test commands to the software execution unit and hardware environment unit according to the test task;

硬件环境单元产生与硬件相关的软件测试命令对应的硬件环境动作;The hardware environment unit generates hardware environment actions corresponding to hardware-related software test commands;

基于与硬件相关的软件测试命令的硬件环境动作,对存储系统执行所述与硬件相关的软件测试命令。Based on the hardware environment action of the hardware-related software test command, the hardware-related software test command is executed on the storage system.

进一步地,产生与硬件相关的软件测试命令对应的硬件环境动作具体包括:Further, generating a hardware environment action corresponding to a hardware-related software test command specifically includes:

对所述存储系统的插拔口通过硬件环境单元执行插拔操作,产生硬件环境信息变化的动作。Perform plugging and unplugging operations on the plugging ports of the storage system through the hardware environment unit to generate an action of changing hardware environment information.

进一步地,产生与硬件相关的软件测试命令对应的硬件环境动作具体包括:Further, generating a hardware environment action corresponding to a hardware-related software test command specifically includes:

在所述存储系统提供电能的连接电路中设置电磁装置,根据与硬件相关的软件测试命令,所述硬件环境单元控制电磁装置通断,以产生不同电源状态的硬件环境动作。An electromagnetic device is provided in the connection circuit for providing electric energy by the storage system, and the hardware environment unit controls the on-off of the electromagnetic device according to the software test command related to the hardware, so as to generate hardware environment actions in different power states.

进一步地,硬件环境单元产生与硬件相关的软件测试命令对应的硬件环境动作之前,该方法还包括:Further, before the hardware environment unit generates the hardware environment action corresponding to the hardware-related software test command, the method also includes:

预先设置与硬件相关的软件测试命令对应的硬件环境动作的控制信息,以使硬件环境单元根据硬件环境动作的控制信息产生与硬件相关的软件测试命令对应的硬件环境动作。The control information of the hardware environment action corresponding to the hardware-related software test command is set in advance, so that the hardware environment unit generates the hardware environment action corresponding to the hardware-related software test command according to the control information of the hardware environment action.

与现有技术相比,本申请技术方案包括:测试任务单元、软件执行单元和硬件环境单元;其中,测试任务单元,用于按照测试任务向软件执行单元和硬件环境单元发出与硬件相关的软件测试命令;硬件环境单元,用于产生与硬件相关的软件测试命令对应的硬件环境动作;软件执行单元,用于基于与硬件相关的软件测试命令的硬件环境动作,对存储系统执行所述与硬件相关的软件测试命令。本发明在完成与逻辑相关的软件测试命令基础上,通过硬件环境单元,用于产生用于执行与硬件相关的软件测试命令的硬件环境动作,为实现与硬件相关的软件测试命令的测试提供了基础,实现了对存储系统更为全面测试,提高存储系统的可靠性。Compared with the prior art, the technical solution of the present application includes: a test task unit, a software execution unit and a hardware environment unit; wherein, the test task unit is used to send software related to the hardware to the software execution unit and the hardware environment unit according to the test task. The test command; the hardware environment unit is used to generate the hardware environment action corresponding to the software test command related to the hardware; the software execution unit is used to execute the hardware environment action based on the software test command related to the hardware to the storage system. Related software testing commands. On the basis of completing the software test command related to logic, the present invention is used to generate the hardware environment action for executing the software test command related to the hardware through the hardware environment unit, and provides for the realization of the test of the software test command related to the hardware. The foundation realizes a more comprehensive test of the storage system and improves the reliability of the storage system.

附图说明Description of drawings

图1为本发明实现自动测试的装置的结构框图;Fig. 1 is the structural block diagram that the present invention realizes the device of automatic test;

图2为本发明实现自动测试的方法的流程图;Fig. 2 is the flow chart of the method for realizing automatic testing of the present invention;

图3为本发明第一实施例实现自动测试的装置的结构框图。FIG. 3 is a structural block diagram of a device for realizing automatic testing according to the first embodiment of the present invention.

具体实施方式Detailed ways

为使本申请的目的、技术方案和优点更加清楚明白,下文中将结合附图对本申请的实施例进行详细说明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互任意组合。In order to make the purpose, technical solution and advantages of the application clearer, the embodiments of the application will be described in detail below in conjunction with the accompanying drawings. It should be noted that, in the case of no conflict, the embodiments in the present application and the features in the embodiments can be combined arbitrarily with each other.

图1为本发明实现自动测试的装置的结构框图,如图1所示,包括:测试任务单元、软件执行单元和硬件环境单元;其中,Fig. 1 is the structural block diagram of the device that realizes automatic test of the present invention, as shown in Fig. 1, comprises: test task unit, software execution unit and hardware environment unit; Wherein,

测试任务单元,用于按照测试任务向软件执行单元和硬件环境单元发出与硬件相关的软件测试命令。The test task unit is used for sending hardware-related software test commands to the software execution unit and the hardware environment unit according to the test task.

需要说明的是,测试任务单元按照测试任务所包含的测试用例控制软件测试流程,向软件执行单元和硬件环境单元发出与硬件相关的软件测试命令。属于本领域技术人员的公知常识。It should be noted that the test task unit controls the software test process according to the test cases included in the test task, and sends hardware-related software test commands to the software execution unit and the hardware environment unit. Common knowledge of those skilled in the art.

硬件环境单元,用于产生与硬件相关的软件测试命令对应的硬件环境动作。The hardware environment unit is used to generate hardware environment actions corresponding to hardware-related software test commands.

这里,硬件环境单元包括:基座、固定部件、动力装置、动力杆和硬件执行控制装置,其中,Here, the hardware environment unit includes: a base, a fixed component, a power device, a power rod and a hardware execution control device, wherein,

在基座的承载面固定固定部件和动力装置;Fix the fixed parts and the power unit on the bearing surface of the base;

动力装置的输出端与存储系统的插拔口相对;The output end of the power unit is opposite to the insertion port of the storage system;

动力装置的输出端与动力杆的固定端连接,动力杆的悬臂端设有与存储系统的插拔口相匹配的插拔件;The output end of the power device is connected to the fixed end of the power rod, and the cantilever end of the power rod is provided with a plug-in piece that matches the plug-in port of the storage system;

硬件执行控制装置的输入端与测试任务单元连接,用于接收测试任务单元发送的与硬件相关的软件测试命令;根据与硬件相关的软件测试命令生成与硬件相关的软件测试命令对应的硬件环境动作的控制信息;硬件执行控制装置的输出端与所述动力装置的信号输入端连接,用于传输硬件环境动作的控制信息到所述动力装置;The input terminal of the hardware execution control device is connected with the test task unit for receiving the hardware-related software test command sent by the test task unit; according to the hardware-related software test command, the hardware environment action corresponding to the hardware-related software test command is generated control information; the output end of the hardware execution control device is connected to the signal input end of the power device, and is used to transmit the control information of the hardware environment action to the power device;

动力装置根据硬件环境动作的控制信息,驱动动力杆带动所述插拔件在所述动力杆的轴向往复运动,以获得与硬件相关的软件测试命令的硬件环境动作。The power device drives the power rod to drive the plug-in member to reciprocate in the axial direction of the power rod according to the control information of the hardware environment action, so as to obtain the hardware environment action of the software test command related to the hardware.

需要说明的是,对与硬件相关的软件测试命令对应的与硬件相关的软件测试命令的硬件环境动作是基于本领域技术人员对与硬件相关的软件测试命令进行分析后,预先设置的由已经环境单元执行硬件环境动作的控制信息,控制信息可以作为映射表进行存储,即不同的与硬件相关的软件测试命令会对应不同的控制信息。It should be noted that the hardware environment action of the hardware-related software test command corresponding to the hardware-related software test command is based on those skilled in the art after analyzing the hardware-related software test command. The unit executes the control information of the hardware environment action, and the control information can be stored as a mapping table, that is, different hardware-related software test commands will correspond to different control information.

软件执行单元,用于基于与硬件相关的软件测试命令的硬件环境动作,对存储系统执行与硬件相关的软件测试命令。The software execution unit is configured to execute the hardware-related software test command on the storage system based on the hardware environment action of the hardware-related software test command.

需要说明的是,本发明除了与硬件相关的软件测试命令,原有的与逻辑相关的软件测试命令同样可以执行,两者不存在冲突。It should be noted that, in addition to the hardware-related software test commands in the present invention, the original logic-related software test commands can also be executed, and there is no conflict between the two.

进一步地,further,

动力装置与动力杆之间还设有传动装置;There is also a transmission device between the power device and the power rod;

传动装置为液压传动装置、电磁传动装置或者齿轮传动装置。The transmission device is a hydraulic transmission device, an electromagnetic transmission device or a gear transmission device.

固定部件以可调方式固定于基座的承载面。The fixing part is fixed on the bearing surface of the base in an adjustable manner.

进一步地,further,

硬件环境单元还包括位置传感器,包括的感应元件和激发元件,用于通过感应元件和激发元件监测动力杆与基座的相对位置;这里,通过相对位置的确定,可以保证硬件环境单元执行硬件环境动作的准确性。The hardware environment unit also includes a position sensor, including an induction element and an excitation element, which are used to monitor the relative position of the power bar and the base through the induction element and the excitation element; here, by determining the relative position, the hardware environment unit can be guaranteed to perform accuracy of movement.

优选的,位置传感器为磁性传感器或光电传感器。Preferably, the position sensor is a magnetic sensor or a photoelectric sensor.

硬件环境单元还包括电磁装置,设置于为存储系统提供电能的连接电路中,硬件执行控制装置的电源模拟信号输出端与电磁装置的信号输入端连接,根据与硬件相关的软件测试命令,服务器发出控制电磁装置通断,以产生电源状态模拟信号的硬件环境动作。The hardware environment unit also includes an electromagnetic device, which is arranged in the connecting circuit that provides electric energy for the storage system. The power supply analog signal output terminal of the hardware execution control device is connected to the signal input terminal of the electromagnetic device. According to the software test command related to the hardware, the server sends out Control the on and off of the electromagnetic device to generate the hardware environment action of the power state analog signal.

图2为本发明实现自动测试的方法的流程图,如图2所示,包括:Fig. 2 is the flow chart of the method for realizing automatic testing of the present invention, as shown in Fig. 2, comprises:

步骤200、按照测试任务向软件执行单元和硬件环境单元发出与硬件相关的软件测试命令。Step 200: Send a hardware-related software test command to the software execution unit and the hardware environment unit according to the test task.

步骤201、硬件环境单元产生与硬件相关的软件测试命令对应的硬件环境动作。Step 201, the hardware environment unit generates hardware environment actions corresponding to hardware-related software test commands.

本步骤中具体包括:This step specifically includes:

对存储系统的插拔口通过硬件环境单元执行插拔操作,产生硬件环境信息变化的动作。或,Perform plugging and unplugging operations on the plugging ports of the storage system through the hardware environment unit to generate changes in hardware environment information. or,

在存储系统提供电能的连接电路中设置电磁装置,根据与硬件相关的软件测试命令,硬件环境单元控制电磁装置通断,以产生不同电源状态的硬件环境动作。An electromagnetic device is installed in the connection circuit that the storage system provides electric energy. According to the software test command related to the hardware, the hardware environment unit controls the on-off of the electromagnetic device to generate hardware environment actions in different power states.

步骤202、基于与硬件相关的软件测试命令的硬件环境动作,对存储系统执行所述与硬件相关的软件测试命令。Step 202: Execute the hardware-related software test command on the storage system based on the hardware environment action of the hardware-related software test command.

硬件环境单元产生与硬件相关的软件测试命令对应的硬件环境动作之前,本发明方法还包括:Before the hardware environment unit generates the hardware environment action corresponding to the software test command relevant to the hardware, the inventive method also includes:

预先设置与硬件相关的软件测试命令对应的硬件环境动作的控制信息,以使硬件环境单元根据硬件环境动作的控制信息产生与硬件相关的软件测试命令对应的硬件环境动作。The control information of the hardware environment action corresponding to the hardware-related software test command is set in advance, so that the hardware environment unit generates the hardware environment action corresponding to the hardware-related software test command according to the control information of the hardware environment action.

以下通过具体实施例对本发明方法进行清楚详细的说明,实施例并不用于限定本发明。The method of the present invention will be clearly and detailedly described through specific examples below, and the examples are not intended to limit the present invention.

实施例1Example 1

图3为本发明第一实施例实现自动测试的装置的结构框图,如图3所示,自动测试装置包括:Fig. 3 is the structural block diagram of the device that realizes automatic test in the first embodiment of the present invention, as shown in Fig. 3, automatic test device comprises:

测试任务单元1、软件执行单元和硬件环境单元3;其中,测试任务单元1用于按照测试任务所包含的测试用例控制软件测试流程以及向待测试的存储系统2发出与硬件相关的软件测试命令;软件测试命令还可以包括与逻辑相关的软件测试命令。测试任务单元以配置文件方式存放测试用例。在测试时,测试任务单元读取用例配置文件后将其解析,将与逻辑相关的软件测试命令和与硬件相关的软件测试命令对应地发送至软件执行单元或硬件环境单元。与逻辑相关的软件测试命令的测试过程与现有技术相同,这里不再赘述。Test task unit 1, software execution unit and hardware environment unit 3; wherein, test task unit 1 is used to control the software test process and send hardware-related software test commands to the storage system 2 to be tested according to the test cases contained in the test task ; The software test command may also include logic-related software test commands. The test task unit stores test cases in the form of configuration files. During the test, the test task unit reads the use case configuration file and parses it, and sends the logic-related software test commands and hardware-related software test commands to the software execution unit or the hardware environment unit correspondingly. The testing process of the logic-related software testing commands is the same as that of the prior art, and will not be repeated here.

本实施例,测试任务单元将与硬件相关的软件测试命令发送至硬件环境单元3,硬件执行单元3包括:硬件执行控制装置31、基座32、动力装置33、动力杆34和固定部件35;其中,硬件执行控制装置31相当于硬件执行单元的大脑,其包括输入电源接口31a、输出电源接口31b、网络接口31c和动力装置33的输出端,输入电源接口31a与外设的电源连接,输出电源接口31b与动力装置33连接。硬件执行控制装置31的输出端与动力装置33的信号输入端连接,测试任务单元1借助网络接口31c实现与硬件执行控制装置31的通信,硬件执行控制装置31借助输出端实现对动力装置33的控制,即,硬件执行控制装置31依据测试任务单元1发出的硬件环境动作的控制信息到动力装置33,以生成硬件环境动作,如启停动作。In this embodiment, the test task unit sends hardware-related software test commands to the hardware environment unit 3, and the hardware execution unit 3 includes: a hardware execution control device 31, a base 32, a power device 33, a power rod 34 and a fixed component 35; Wherein, the hardware execution control device 31 is equivalent to the brain of the hardware execution unit, which includes an input power interface 31a, an output power interface 31b, a network interface 31c, and an output end of the power unit 33. The power interface 31b is connected to the power device 33 . The output end of the hardware execution control device 31 is connected to the signal input end of the power device 33, the test task unit 1 realizes the communication with the hardware execution control device 31 by means of the network interface 31c, and the hardware execution control device 31 realizes the communication with the power device 33 by means of the output end. Control, that is, the hardware execution control device 31 transmits the control information of the hardware environment action sent by the test task unit 1 to the power unit 33 to generate a hardware environment action, such as a start-stop action.

固定部件35用于将存储系统2固定于基座32的承载面。在本实施例中,硬件执行单元共设有但不限于四个固定部件35。四个固定部件35分别设于靠近存储系统2的四个角部位置,借助四个固定部件35可将存储系统2固定于基座32的承载面。优选地,固定部件35以可调方式(或活动方式)设于基座32的承载面,即固定部件35的位置相对于基座32的承载面可调,从而对不同规格尺寸存储系统2实现固定,增加储存系统自动测试装置的灵活性。The fixing component 35 is used to fix the storage system 2 on the bearing surface of the base 32 . In this embodiment, the hardware execution unit is provided with but not limited to four fixing components 35 . The four fixing parts 35 are respectively provided at four corners of the storage system 2 , and the storage system 2 can be fixed on the bearing surface of the base 32 by means of the four fixing parts 35 . Preferably, the fixing part 35 is arranged on the bearing surface of the base 32 in an adjustable manner (or in a movable manner), that is, the position of the fixing part 35 is adjustable relative to the bearing surface of the base 32, so as to realize storage systems 2 of different specifications and sizes. Fixed to increase the flexibility of the storage system automatic test device.

动力装置33固定于基座32的承载面,而且,动力装置33的输出端与存储系统2的插拔口21相对。动力杆34的固定端与动力装置33的输出端连接,动力杆34的悬臂端设有与存储系统2的插拔口相匹配的插拔件。在动力装置33的驱动下,动力杆34带动插拔件在动力杆34的轴向作往复运动。The power device 33 is fixed on the bearing surface of the base 32 , and the output end of the power device 33 is opposite to the insertion port 21 of the storage system 2 . The fixed end of the power rod 34 is connected to the output end of the power device 33 , and the cantilever end of the power rod 34 is provided with a plug-in piece matching the plug-in port of the storage system 2 . Driven by the power device 33 , the power rod 34 drives the plug-in part to reciprocate in the axial direction of the power rod 34 .

在动力装置33与动力杆34之间还可设置传动装置,用以将动力装置33的动力传递至动力杆34。传动装置可以采用液压传动装置、电磁传动装置或者齿轮传动装置。A transmission device can also be provided between the power device 33 and the power rod 34 to transmit the power of the power device 33 to the power rod 34 . The transmission device can adopt a hydraulic transmission device, an electromagnetic transmission device or a gear transmission device.

本实施例提供的硬件执行单元模拟了存储系统的硬件环境,能够实现对与硬件相关的软件测试命令进行测试,弥补了现有技术中存在的不能对与硬件环境相关的软件流程进行监测的缺陷。The hardware execution unit provided in this embodiment simulates the hardware environment of the storage system, and can realize the testing of software test commands related to the hardware, which makes up for the defect that the software process related to the hardware environment cannot be monitored in the prior art. .

在一个优选实施例中,硬件环境单元还包括位置传感器6,借助位置传感器6可精确地监测动力杆34与基座32的相对位置。位置传感器6包括感应元件61和激发元件62,感应元件61和激发元件62分别设于动力杆34和基座32。当感应元件61受到激发元件62触发时,即可确定动力杆34与基座32的相对位置。不难理解,由于感应元件61和激发元件62是一对相互配合的部件。因此,使用时也可将感应元件61和激发元件62的设置位置对调,即将感应元件61和激发元件62分别设于基座32和动力杆34上,同样可以达到定位动力杆34位置的目的。另外,位置传感器采用但不限于采用磁性传感器或光电传感器。In a preferred embodiment, the hardware environment unit further includes a position sensor 6 , by which the relative position of the power rod 34 and the base 32 can be accurately monitored. The position sensor 6 includes an inductive element 61 and an excitation element 62 , and the inductive element 61 and the excitation element 62 are respectively arranged on the power rod 34 and the base 32 . When the sensing element 61 is triggered by the exciting element 62 , the relative position of the power bar 34 and the base 32 can be determined. It is not difficult to understand that since the inductive element 61 and the excitation element 62 are a pair of components that cooperate with each other. Therefore, during use, the positions of the sensing element 61 and the exciting element 62 can also be reversed, that is, the sensing element 61 and the exciting element 62 are respectively arranged on the base 32 and the power rod 34, and the purpose of positioning the position of the power rod 34 can also be achieved. In addition, the position sensor adopts, but is not limited to, a magnetic sensor or a photoelectric sensor.

硬件环境单元3还可包括电磁装置,设置于为存储系统提供电能的连接电路中。当硬件环境单元3设有电磁装置时,硬件执行控制装置31还设有第二信号输出端,硬件执行控制装置的电源模拟信号输出端与电磁装置的信号输入端连接,根据与硬件相关的软件测试命令,服务器发出控制电磁装置通断,以产生电源状态模拟信号的硬件环境动作。电磁装置既可用于模拟单电源故障和双电源故障,也可以用于模拟整机掉电等情况。The hardware environment unit 3 may also include an electromagnetic device, which is arranged in a connection circuit that provides electric energy for the storage system. When the hardware environment unit 3 was provided with an electromagnetic device, the hardware execution control device 31 was also provided with a second signal output end, and the power supply analog signal output end of the hardware execution control device was connected with the signal input end of the electromagnetic device, according to the software related to the hardware In the test command, the server issues a hardware environment action to control the on-off of the electromagnetic device to generate a power state analog signal. The electromagnetic device can be used to simulate single power failure and double power failure, and can also be used to simulate the power failure of the whole machine.

虽然本申请所揭露的实施方式如上,但所述的内容仅为便于理解本申请而采用的实施方式,并非用以限定本申请,如本发明实施方式中的具体的实现方法。任何本申请所属领域内的技术人员,在不脱离本申请所揭露的精神和范围的前提下,可以在实施的形式及细节上进行任何的修改与变化,但本申请的专利保护范围,仍须以所附的权利要求书所界定的范围为准。Although the embodiments disclosed in the present application are as above, the content described is only the embodiments adopted to facilitate understanding of the present application, and is not intended to limit the present application, such as the specific implementation method in the embodiments of the present invention. Anyone skilled in the field of this application can make any modifications and changes in the form and details of implementation without departing from the spirit and scope disclosed in this application, but the scope of patent protection of this application must still be The scope defined by the appended claims shall prevail.

Claims (10)

1. An apparatus for implementing automatic testing, comprising: the system comprises a test task unit, a software execution unit and a hardware environment unit; wherein,
the test task unit is used for sending a software test command related to hardware to the software execution unit and the hardware environment unit according to the test task;
the hardware environment unit is used for generating hardware environment actions corresponding to the software test commands related to the hardware; the hardware environment unit comprises: the device comprises a base, a fixed part, a power device, a power rod and a hardware execution control device, wherein the fixed part and the power device are fixed on a bearing surface of the base; the output end of the power device is opposite to the plugging port of the storage system; the output end of the power device is connected with the fixed end of the power rod, and the cantilever end of the power rod is provided with a plugging piece matched with the plugging port of the storage system; the input end of the hardware execution control device is connected with the test task unit and is used for receiving a software test command which is sent by the test task unit and is related to hardware; generating control information of hardware environment actions corresponding to the software testing commands related to the hardware according to the software testing commands related to the hardware; the output end of the hardware execution control device is connected with the signal input end of the power device and is used for transmitting control information of the hardware environment action to the power device; the power device drives the power rod to drive the plug-in piece to reciprocate in the axial direction of the power rod according to the control information of the hardware environment action so as to obtain the hardware environment action of the software test command related to the hardware;
and the software execution unit is used for executing the software test command related to the hardware to the storage system based on the hardware environment action of the software test command related to the hardware.
2. The device of claim 1, wherein a transmission device is further arranged between the power device and the power rod;
the transmission device is a hydraulic transmission device, an electromagnetic transmission device or a gear transmission device.
3. The device according to claim 1 or 2, characterized in that said fixing member is fixed in an adjustable manner to the carrying surface of said base.
4. The apparatus of claim 1 or 2, wherein the hardware environment unit further comprises a position sensor comprising a sensing element and an excitation element for monitoring the relative position of the power rod and the base via the sensing element and the excitation element.
5. The device of claim 4, wherein the position sensor is a magnetic sensor or a photoelectric sensor.
6. The device of claim 1, wherein the hardware environment unit further comprises an electromagnetic device disposed in a connection circuit for providing power to the storage system, the power analog signal output terminal of the hardware execution control device is connected to the signal input terminal of the electromagnetic device, and the server issues a hardware environment action for controlling the electromagnetic device to be turned on and off according to a software test command related to hardware, so as to generate a power state analog signal.
7. A method for implementing automatic testing, comprising:
sending a software test command related to hardware to the software execution unit and the hardware environment unit according to the test task;
the hardware environment unit generates a hardware environment action corresponding to a software test command related to hardware; the hardware environment unit comprises: the device comprises a base, a fixed part, a power device, a power rod and a hardware execution control device, wherein the fixed part and the power device are fixed on a bearing surface of the base; the output end of the power device is opposite to the plugging port of the storage system; the output end of the power device is connected with the fixed end of the power rod, and the cantilever end of the power rod is provided with a plugging piece matched with the plugging port of the storage system; the input end of the hardware execution control device is connected with the test task unit and is used for receiving a software test command which is sent by the test task unit and is related to hardware; generating control information of hardware environment actions corresponding to the software testing commands related to the hardware according to the software testing commands related to the hardware; the output end of the hardware execution control device is connected with the signal input end of the power device and is used for transmitting control information of the hardware environment action to the power device; the power device drives the power rod to drive the plug-in piece to reciprocate in the axial direction of the power rod according to the control information of the hardware environment action so as to obtain the hardware environment action of the software test command related to the hardware;
executing the hardware-related software test command to the storage system based on the hardware environment action of the hardware-related software test command.
8. The method according to claim 7, wherein the act of generating a hardware environment corresponding to the hardware-related software test command specifically comprises:
and executing plugging operation on a plugging port of the storage system through a hardware environment unit to generate the action of hardware environment information change.
9. The method according to claim 7, wherein the act of generating a hardware environment corresponding to the hardware-related software test command specifically comprises:
and arranging an electromagnetic device in a connecting circuit for providing electric energy for the storage system, wherein the hardware environment unit controls the electromagnetic device to be switched on and off according to a software test command related to hardware so as to generate hardware environment actions in different power supply states.
10. The method according to any one of claims 7 to 9, wherein before the hardware environment unit generates the hardware environment action corresponding to the software test command related to the hardware, the method further comprises:
the control information of the hardware environment action corresponding to the software test command related to the hardware is preset, so that the hardware environment unit generates the hardware environment action corresponding to the software test command related to the hardware according to the control information of the hardware environment action.
CN201510007536.0A 2015-01-07 2015-01-07 It is a kind of to realize the device and method tested automatically Active CN104461910B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510007536.0A CN104461910B (en) 2015-01-07 2015-01-07 It is a kind of to realize the device and method tested automatically

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510007536.0A CN104461910B (en) 2015-01-07 2015-01-07 It is a kind of to realize the device and method tested automatically

Publications (2)

Publication Number Publication Date
CN104461910A CN104461910A (en) 2015-03-25
CN104461910B true CN104461910B (en) 2018-07-17

Family

ID=52907999

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510007536.0A Active CN104461910B (en) 2015-01-07 2015-01-07 It is a kind of to realize the device and method tested automatically

Country Status (1)

Country Link
CN (1) CN104461910B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108132874A (en) * 2017-11-24 2018-06-08 银联商务股份有限公司 Program testing method and device
CN114721957B (en) * 2022-04-14 2022-09-30 合肥卓讯云网科技有限公司 Software and hardware automatic testing method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1523326A (en) * 2003-02-20 2004-08-25 华为技术有限公司 An environmental stress experiment automatic test method
CN101551770A (en) * 2009-05-07 2009-10-07 福建星网锐捷网络有限公司 Hot plug testing device and method
CN102262046A (en) * 2011-04-22 2011-11-30 北京邮电大学 Method and device for testing service life of connector

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI502596B (en) * 2012-08-15 2015-10-01 Wistron Corp Memory testing method, memory testing apparatus, and adapter thereof

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1523326A (en) * 2003-02-20 2004-08-25 华为技术有限公司 An environmental stress experiment automatic test method
CN101551770A (en) * 2009-05-07 2009-10-07 福建星网锐捷网络有限公司 Hot plug testing device and method
CN102262046A (en) * 2011-04-22 2011-11-30 北京邮电大学 Method and device for testing service life of connector

Also Published As

Publication number Publication date
CN104461910A (en) 2015-03-25

Similar Documents

Publication Publication Date Title
US10025286B2 (en) Simulation system, programmable controller, simulation device, and engineering tool
CN106445811B (en) A kind of automatization test system and method based on SecureCRT
CN107870271A (en) Automated testing method and device
WO2007146851A3 (en) Method and apparatus for executing commands and generation of automation scripts and test cases
CN107807545A (en) The adjustment method and device of a kind of remote control terminal
CN108234246B (en) A method and system for multi-directional testing server network performance
CN104461910B (en) It is a kind of to realize the device and method tested automatically
CN117277552B (en) A smart grid one-button sequential control verification system and method
CN104018299B (en) A kind of Sewing machines Simple Control System
CN104699524A (en) SOC (system on chip) chip verifying system and method for dynamic simulation of static compilation
JP2012003489A (en) Simulation system
CN111130917B (en) Line testing method, device and system
JP4676900B2 (en) Simulator for distributed control system
CN102375099A (en) Portable-type electronic device testing system
CN101741577A (en) Test method and test system for baseboard management controller
CN115580550A (en) Network card stability testing method, device, equipment and storage medium
CN105679375A (en) Automatic test system of storage equipment, and method thereof
CN103064789A (en) Automated testing method by software control
CN110978051B (en) Robot simulation device, system, method, readable medium and electronic device
US20190230538A1 (en) Apparatus, system and method for testing of communication networks
CN113075915A (en) Em-plant based virtual simulation implementation method, system and equipment
CN113518109A (en) Protocol downloading system and method for on-site monitoring unit FSU, storage medium
CN105792240A (en) Test control system
CN111182031A (en) PLC (programmable logic controller) equipment remote downloading method and system
CN104615524A (en) USB (universal serial bus) plug testing method for mobile terminal

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant