CAPL函数——testxxx系列

1、TestCaseTitle-设置测试用例的标题

语法TestCaseTitle (char identifier[], char title[])
功能设置测试用例的标题
例子TestCaseTitle (“Comm—”,“Test_Demo()----”)

代码效果:
在这里插入图片描述

2、TestCaseDescription -对测试用例的具体描述

语法TestCaseDescription (char description[])
功能对测试用例的具体描述
例子TestCaseDescription (“Test_Demo++++”)

代码效果:
在这里插入图片描述

3、TestStep 、testStepPass、testStepFail-打印步骤、结果

语法TestStep (char Identifier[], char Description[], …);
功能打印测试步骤
例子TestStep (“info”,“测试开始”)
语法TestStepPass (char Identifier[], char Description[], …);
功能打印测试成功结果
例子TestStepPass (“pass”,“测试通过”)
语法TestStepFail(char Identifier[], char Description[], …);
功能打印测试失败结果
例子TestStepFail(“fail”,“测试失败”)

代码效果:
在这里插入图片描述

4、TestInfoTable、TestInfoHeadingBegin、TestInfoHeadingEnd、TestInfoRow、TestInfoCell-创建表格

语法Long TestInfoTable (char[] description);
功能创建一个结构化数据的表格以及表头信息
例子TestInfoTable(“UDS”)
语法TestInfoHeadingBegin (long handle, int indent)
功能表格的第一行的开始
例子TestInfoHeadingBegin(table, 0)
语法void TestInfoHeadingEnd (long handle);
功能表格的第一行的结尾
例子TestInfoHeadingEnd(table);
语法TestInfoHeadingBegin (long handle, int indent)
功能在表格中创建某一行
例子TestInfoRow(table, 0)
语法void TestInfoHeadingEnd (long handle);
功能填充表格某行的数据
例子TestInfoCell(table, “SID-RQ”)
    // begin table
    table = TestInfoTable("UDS");

    //header
    TestInfoHeadingBegin(table, 0);
    TestInfoCell(table, "Parameter");
    TestInfoCell(table, "Value");
    TestInfoCell(table, "Raw");
    TestInfoHeadingEnd(table);

    //row 1
    TestInfoRow(table, 0);
    TestInfoCell(table, "SID-RQ");
    TestInfoCell(table, "0x10");
    TestInfoCell(table, "10");

    //row 2
    TestInfoRow(table, 0);
    TestInfoCell(table, "DiagSessionType	Default Session	01");

    //output table
    testStep(0, "", table); 

代码效果:
在这里插入图片描述

5、testWaitForTesterConfirmation-人为判断被测状态

语法long TestWaitForTesterConfirmation(char text[])
功能人为判断车辆或者ECU的状态
例子testWaitForTesterConfirmation(“制造busoff故障5s,制造后点击YES”)

代码效果:
在这里插入图片描述

  • 14
    点赞
  • 22
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值