Portable embedded software interface testing tool

1. equipment components

ETst_USB system consists of hardware components and software components. Hardware includes 1553B board, RS232 / 422/485 cards, CAN bus board, AD acquisition boards, DA converter board, DI / DO board and the like. All hardware boards are used USB interface in the form of so portable, flexible, able to adapt to a variety of test environment to build, but also conducive to full use of existing test resources. Software part generated by the test design software modules, test execution service software modules, test execution client software module, device resource management software modules and other major software modules and curve data, CRC plug-in generation and diagnostic, test data recording and viewing application protocol generator tools, application protocol template management, report generator and other tools. The system architecture as shown in FIG.
ETest_USB system components
The step of using the equipment platform ETest_USB testing of embedded system software as follows:
Here Insert Picture Description
First, the establishment of the test using the test design software system model, design and test data to generate test target files.
Then using CAN, RS232, and other communications boards formed in a single test configuration for embedded devices or embedded systems tested in adapter is connected to the system under test.
Next, using the test software performs a read test service object file; test execution software service drive test execution client software, the client software performs the test data into the test data output to the various boards of the measured object, so that the driving is software test object runs.
Meanwhile, the transmission operation of the output data generated by the measured object to the communication interface to the board, the test performed by the client software into the service test execution software. During the test, the test data can be recorded with a view to monitoring software testing and software test data monitoring, analysis and evaluation.
ETest_USB using component-based software development framework layered, using Visual Studio 2010 software development environment, the underlying code using VC ++ language development, integration frame based Micosoft .Net 4.0, integrated development language C #, form a layered structure as shown in FIG.
ETest_USB formed by the software server and the software client Software C / S structure, the client software is responsible for operation and interactive communication card, server software responsible for implementing test design and test execution schedule, a server and multiple clients may be formed of different scale-level test system to ensure that it meets the test requirements of different sizes.
Software architecture is divided into five layers, each layer of the device driver service, the communication service level, service level agreement, the application service layer and application layer, by which five-layer structure, to achieve a modular component of the software which ensure a rapid changing test needs.
Here Insert Picture Description
Driver layer service layer for mounting various driving boards carried by the operating system, including a drive RS232, RS422, RS485, CAN, AD / DA and other devices, to realize the unified management of all system hardware, by driving the service layer test platform complex hardware device management package and unity.
Communication service tier for the base layer is driven, packaged programming interfaces, different hardware devices to shield the communication of different programming interfaces, including CAN communication service tier communications, RS232 communications, RS422 communications, RS485 communications, communication service able to achieve unity when the upper layer application software ensures call traffic.
Service protocol layer for communication and analysis protocol described, including language compiler DPD services, protocols abstract model, abstract channel model, an abstract data type, condition logical abstraction, an abstract computational model, an abstract model array, an abstract model checking, checking algorithm interface models, through service layer protocol, the communication protocol implements application-layer codec.
Application service layer laid through a series of application components to achieve the main application testing platform for the foundation, including a test plan, test project, the simulation model rendering, channel management, protocol management, peripherals, monitor design, runtime monitoring, I / O Center metadata server, script parsing, client management, timing, multi-threading services, data object encoding / decoding.
The application layer is the main application part ETest_USB test platform, including software test design, test execution services software, test execution client processes and data monitoring software, equipment resources management software and some supporting software tools.

2. The main function of each module

(1) hardware portions

ETest_USB硬件部分采用USB形式的便携式接口板卡,直接通过USB连接到测试主机中,构成可满足多种类型接口要求的测试环境。主要硬件部分的指标如下:

① ARINC429模块

通道配置:2发2收
支持100K/50K/48K/12.5KBPS及用户自定义波特率
支持FIFO和Schedule两种发送模式
支持SDI和Label两种接收过滤模式
支持Time Stamping
支持中断、外触发

② 1553B模块

完全遵守MIL-STD-1553B协议
单通道多功能
支持1M波特率
通道为双冗余的A、B通道
帧间隔和消息间隔时间可软件设置
支持时间戳,分辨率1μs
支持自测试、错误注入
支持中断、支持外触发

③ RS232/422/485串口模块

通讯协议:异步RS232/422/485可软件设置
通道数:RS232/422/485各2路
波特率,125kbps

④ CAN模块

兼容CAN2.0A和CAN2.0B协议,支持标准帧和扩展帧;
通道数:2
支持双向传输,CAN发送、CAN接收
DC2500V电气隔离保护
支持数据帧,远程帧格式;
CAN控制器波特率在5Kbps-1Mbps之间可选,可配置;

⑤ AD模块

32路单端/16路差分输入
单通道采样率最高1MSPS
ADC分辨率:16bit
外触发功能

⑥ DA模块

4通道输出
DAC分辨率:16bit

⑦ 光隔离离散量I/O模块

16通道DIDO
每通道光电隔离

⑧ 测试主机

CPU: 双核 i5-6200U 2.3GHz
内存:DDR4 2133MHz,8GB
固态硬盘:256GB
显示屏幕:14英寸,分辨率1920*1080
独立显存:2GB

(2)测试设计软件模块

测试设计软件模块对待测系统及其对外接口进行建模,进行协议编辑及分析、创建测试监控、建立硬件规划、创建及管理测试用例,确定测试要准备的接口设备数量。其主要功能包括:
 进行测试方案管理,针对测试方案的操作有:新建方案、打开方案、保存方案。
 每个测试方案中,可以包含一个到多个测试项目,多个测试项目的存在使得每个测试方案可以完成多个测试项目的设计,便于开展多个配置项到系统的集成测试。
 测试项目有新建、重命名、删除和查看属性的操作。
 用图形化的方式对被测系统、外围系统及被测系统对外接口进行描述,包括接口数量和接口类型,包括RS422、1553B、CAN、AD、DA、DI、DO、CT、Freq-CT、TCP等类型;能够设定接口参数。
 创建接口协议,并使用协议描述语言进行协议描述,包括报文包头、包尾、校验等,描述各个字段类型及编码方式,以及分支、循环等结构。
 为了适应各种数据通信的需要,协议字段具有丰富的类型,包括:整形(无符号和有符号,8位/16位/32位/自定义长度)、浮点型、布尔类型、条件语句类型、分支语句类型、计算字段、校验字段、数组字段。
 创建测试监控,描述实时数据监控的监控内容和显示形式,并可设定报警条件。
 用户可以在测试监控模块添加测试监控并在监控面板上添加数据监控仪器,通过不同的类型监控仪器绑定协议字段或者字段按照某种公式运算的结果,从而在运行时通过监控仪器指针或数值的改变直观地显示出测试通讯时数据的变化。
 测试监控工具栏管理所有的测试监控仪表,包括数字表仪器,圆盘仪表,曲线图,枚举类型等。选择合适的监控仪表,将其拖拽到监控面板的合适的位置,即可添加该监控仪表到监控面板上。用鼠标拖拽监控仪表的边缘,即可调整其大小。
 打开“属性”标签页,可以修改测试仪表的属性。其中最重要的属性是“协议段”属性,表明了该监控仪表的数据来源。
 通过“协议段”属性右侧的展开按钮,可以打开“绑定数据协议”对话框,其中显示当前项目中的仿真模型中的所有的协议和协议段。
 测试仪表的数据源,既可以是一个协议字段,也可以是若干个协议字段组成的公式。
 在“绑定数据协议”对话框下部的输入框中输入协议字段,或协议字段组成的公式。双击需要的字段名称,可以添加该字段名称到自定义公式的光标所在位置。
 创建测试硬件规划,确定测试需要使用的接口板卡设备,以及接口板卡设备对应的资源。
 创建测试用例,并提供测试用例的管理方式,包括分组、删除、重命名等。
 创建测试用例的内容,包括使用测试脚本描述测试的过程,包括变量定义、条件语句、循环语句、输出语句、数学运算、函数定义等。
 提供测试脚本的扩展接口,能够实现向待测件的数据交互和数据自动解析,将比特流解析成具有意义的应用层数据。
 提供时序控制的方式,能够按照一定的时序进行规定的操作。
 提供运行环境设置方式,设置测试运行期间的仿真模型服务器、数据中心服务器、测试执行服务器和客户端的IP地址和端口号。
 提供对标准输入输出监控进行配置的功能,确定标准输入输出监控的类别配置。
 提供测试脚本执行方式,能够运行用户选择的测试脚本;用户能够选择终止脚本运行。
 能够查看输出信息及错误信息。

(3)测试执行服务软件模块

测试执行软件模块为自动化测试执行软件的主要部分,与客户端软件相配合,驱动测试数据,进行自动化测试执行。主要实现以下功能:
 提供进程调度服务后台运行程序,在进程调度代理的帮助下,根据测试设计软件的设计,在测试主机上启动测试执行、客户端、服务器等进程,并通过进程调度服务协调各个软件的运行逻辑。
 提供仿真模型服务器后台运行程序,通过仿真模型服务器解析测试设计所建立的仿真模型,实现测试执行时数据收发的仿真解析服务。
 提供数据中心服务器后台运行程序,在测试用例执行过程中,在数据中心服务器中集中统一处理通道中的收发收据,确保数据监控的分布式实现。
 提供用例服务器后台运行程序,解析处理测试设计中所编写测试用例的执行过程。
 提供标准输入输出监控窗口程序,可以显示仿真模型服务器、数据中心服务器、客户进程以及用例服务器运行过程中的调试信息。
 解析测试脚本中的变量定义、条件语句、循环语句、输出语句、数学运算、函数定义等语句,进行相应的操作。
 解析测试脚本扩展接口,实现向待测系统进行数据发送/接受和数据解析。
 解析测试脚本,按照时序控制要求进行操作。
 向客户端软件发送的测试数据注入包;接收客户端软件所发送的测试数据输出包。
 按照用户要求即时停止测试用例的执行。
 记录并显示测试用例的执行结果。

(4)测试执行客户进程及数据监控模块

测试执行客户进程及数据监控模块运行在测试主机。主要实现以下功能:
 提供设备驱动功能,实现1553B、CAN、RS422、RS232、AD/DA/DI/DO等接口板卡的驱动能力。
 测试执行客户软件同测试执行软件均运行在测试主机,采用内存机制交换数据。
 同被测件通信使用测试设计软件中配置好的通信参数。
 提供方便的硬件板卡扩展方式,方便新的硬件板卡的集成。
 接收来自测试执行软件发送的测试数据注入包,进行数据格式的转换,并通过通信板卡发送到待测件。
 接收来自被测件发送的测试数据输出包,并转发到测试执行软件。
 登录测试服务软件后,显示测试设计软件设计的全部测试监控界面,可选择一个或多个测试监控面板进行测试监控。
 运行指定的测试监控,在测试执行过程中实时显示指定的测试数据,提供数字仪器、仪表盘、枚举项、曲线图等数据监控方式。
 可以实时显示测试执行中的测试数据;
 可以以解析后的协议数据格式显示测试数据,也可以以二进制、八进制、十六进制显示测试数据。
 可以设置数据过滤条件,实现界面显示特定数据的功能。
 可以设置数据报警条件,当出现某种特性数据时,软件以醒目的形式显示出满足报警条件的数据。
 可以进行数据查询,可以查询某个时间段的报文,也可以查询某个协议字段的数据。
 可以对指定的数据进行统计,也可以查看数据曲线图。

(5)设备资源管理软件模块

Device Explorer software module provides test equipment and channel management functions supported by the system, the system provides an interface for device expansion. Its main achieve the following functions:
² adding, deleting system equipment.
 change the number of system equipment.
 add, delete channel device contains.
 modify the number and type of devices comprises channels.
 save device information to the device resource files used in the test design the software.

(6) Auxiliary tool

Some commonly used software tools provides a software tool embedded system tests, including the following software modules:
² curve data generation tool;
having a data editing curve, coordinate selection, data reading curve, curve data storage and other functions, with the execution of software testing , there is provided a test data generating means.
 test data recording and viewing tools;
during test execution, the test data may be recorded in the execution, for testing and analysis performed after See, including protocol selection, data filtering, alarm condition setting function.
 application protocol generation tool;
providing an application protocol table editing features, compositions may be provided in the protocol field, type field, the default field value and the like.
² diagnostics plug CRC generator the CRC widget
providing design features of the CRC calculation, CRC algorithm may be custom designed diagnostic accuracy the algorithm, and the algorithm eventually plug the CRC field in the protocol description language.

Published 14 original articles · won praise 0 · Views 1481

Guess you like

Origin blog.csdn.net/weixin_45013592/article/details/104361852