1、建立一个工程,配置相应环境
2、添加相应的xml文件 以及can通道 和脚本
配置脚本对应哪个CAN通道
放相应的can脚本
3、相应的格式如下所示
4、XML的格式如下
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<testmodule title="CANoe TestModule" version="" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.vector-informatik.de/CANoe/TestModule/1.27" xmlns:ai="http://www.vector-informatik.de/CANoe/TestModuleSchemaAppInfo/1.0">
<testsetup>
<info>
<name>Diagnostic Specification</name>
<description></description>
</info>
<info>
<name>Project</name>
<description></description>
</info>
<info>
<name>ECU Name</name>
<description></description>
</info>
<info>
<name>ECU Variant</name>
<description>CommonDiagnostics</description>
</info>
<info>
<name>Specification Version</name>
<description/>
</info>
<info>
<name>TestModuleGenerationTime</name>
<description></description>
</info>
</testsetup>
<preparation>
<capltestfunction name="Init" title="Initialization"/>
</preparation>
<testgroup title="TestReboot">
<testgroup title="1101">
<capltestcase name="TC_1101_Reboot"/>
</testgroup>
<testgroup title="Common_if_Testapp">
<capltestcase name="TC_Common_if_Testapp_Reboot"/>
</testgroup>
</testgroup>
<completion>
<untilend title="Until End" wait="1000" />
<capltestfunction title="" name="TsetScriptStop" />
</completion>
</testmodule>
5、can脚本 只是简单的截图Graphics 和 保存trace log的例子
includes
{
}
variables
{
}
testcase TC_1101_Reboot()
{
setLogFileName("logging", "..\\Log\\ACC_{LocalTime}.blf");
startLogging("logging");
//你的内容
stopLogging("logging");
}
testcase TC_Common_if_Testapp_Reboot()
{
testReportAddWindowCapture("Graphics 2","","Image1");
testWaitForTimeout(4000);
}
testfunction Init()
{
}
testfunction TsetScriptStop()
{
Stop();
}