测试目的:
验证DUT在接收到长度不符合UTF-16字符串实际长度的echoUTF16DYNAMIC方法请求时,是否能够正确处理并返回相应的错误消息。
描述
本测试用例旨在检查DUT对SOME/IP协议中echoUTF16DYNAMIC方法的处理能力。特别是当传入的字符串长度参数小于实际字符串长度,导致DUT必须将接收到的字符串截断以适应指定长度时,DUT应能够返回MALFORMED_MESSAGE错误消息。
测试拓扑:
具体步骤:
- TESTER: 使用echoUTF16DYNAMIC方法发送SOME/IP消息
i. 源MAC设置为测试器的MAC地址
ii. 目的MAC设置为DUT的MAC地址
iii. 源端口设置为30492
iv. 目的端口设置为DUT的OfferService为测试性服务提供的UDP端点选项
v. 源IP设置为测试器的IP地址
vi. 目的IP设置为DUT的OfferService为测试性服务提供的UDP端点选项
vii. Service-ID设置为0x0101
viii. Instance-Id设置为0x01
ix. Method-ID设置为0x0016
x. payload: 0x00 00 00 80 FE FF 00 48 00 48 00 48 00 48
00 48 00 48 00 48 00 48 00 48 00 48 00 48 00 48 00
48 00 48 00 48 00 48 00 48 00 48 00 48 00 48 00 48
00 48 00 48 00 48 00 48 00 48 00 48 00 48 00 48 00
48 00 48 00 48 00 48 00 48 00 48 00 48 00 48 00 48
00 48 00 48 00 48 00 48 00 48 00 48 00 48 00 48 00
48 00 48 00 48 00 48 00 48 00 48 00 48 00 48 00 48
00 48 00 48 00 48 00 48 00 48 00 48 00 48 00 00 - DUT: 返回与请求中相同值的方法响应消息
- TESTER: 重复步骤1,但将echoUTF16Dynamic请求的payload更改为:
0x00 00 00 02 FE FF 00 48 00 48 00 48 00 48 00 48 00
48 00 48 00 48 00 48 00 48 00 48 00 48 00 48 00 48
00 48 00 48 00 48 00 48 00 48 00 48 00 48 00 48 00
48 00 48 00 48 00 48 00 48 00 48 00 48 00 48 00 48
00 48 00 48 00 48 00 48 00 48 00 48 00 48 00 48 00
48 00 48 00 48 00 48 00 48 00 48 00 48 00 48 00 48
00 48 00 48 00 48 00 48 00 48 00 48 00 48 00 48 00
48 00 48 00 48 00 48 00 48 00 48 00 00 - DUT: 返回错误消息MALFORMED_MESSAGE
通过标准
DUT: 返回与请求中相同值的方法响应消息
DUT: 返回错误消息MALFORMED_MESSAGE
参考文档:
- PRS_SOMEIP_00093
- PRS_SOMEIP_00372
- PRS_SOMEIP_00084
- PRS_SOMEIP_00085
- PRS_SOMEIP_00087
- PRS_SOMEIP_00091
- PRS_SOMEIP_00092
- PRS_SOMEIP_00094
- PRS_SOMEIP_00095