CANoe如何创建并运行CAPL Test Module和XML Test Module。

CAPL Test Module

1、在CANoe主界面中选择Test→Test Setup,打开Test Setup for Test Modules窗口。在Test Setup for Test Modules窗口空白处单击鼠标右键并在菜单中选择New Test Environment,可以创建一个新测试环境。

车载测试系列:CANoe之Test Module使用_右键

 

2、鼠标右键单击Test Environment,选择Insert CAPL Test Module来插入一个CAPL测试模块,默认的测试模块名称为Test 1。

车载测试系列:CANoe之Test Module使用_右键_02

 

3、鼠标右键单击新建的测试模块Test 1,选择Configuration,打开CAPL Test ModuleConfiguration对话框。在Common选项卡中,修改Module name为Engine Tester,并在Test script中添加EngineTester.can文件。

车载测试系列:CANoe之Test Module使用_右键_03

 

4、在EngineTester.can文件中实现测试用例

车载测试系列:CANoe之Test Module使用_右键_04

 

5、测试模块配置完毕并且实现测试用例后,双击测试模块Engine Tester即可打开CAPL测试模块的窗口。

车载测试系列:CANoe之Test Module使用_Test_05

 

6、点击start按钮开始运行Test Module,运行完毕生成的Report如图所示:

车载测试系列:CANoe之Test Module使用_右键_06

作者: ​​千里和他的软件测试​​