汤辰浩 发表于 2016-11-9 14:52:47

LR编写socket接口测试脚本,data.ws数据该怎么获取?

编写socket接口测试脚本,APP记录日志里面找到的psot日志是一串json.可放到data.ws里面后根本不行。是需要转换过么?

请求
Cmd : 65
签到
Data : {"AgendaID":"44c6cc54-be7f-417e-af39-61b5ea6ab7db","DeviceID":"f23c14ed70d1f73b","ConventionID":"60dd7817-ec7d-4454-b0d4-2b71cd3b245a"}
Timestamp : 1478672841005

返回:
Cmd : 65
签到
Data : {"Result":0,"SignInID":"2a0de450-9da9-43ce-a264-91f464b0b5c4"}
Timestamp : 636142984423292

汤辰浩 发表于 2016-11-9 17:59:11

这是wire抓取的信息:
请求:
.........{"Charging":1,"Disk":"","Memory":"","Version":"3.2.2.1.6","View":"......","Battery":32.0,"DeviceCode":"Code","DeviceID":"f23c14ed70d1f73b","Role":2,"SignalLevel":72,"Url":"http://192.168.0.109:1100"}7.lHX............{"Charging":1,"Disk":"","Memory":"","Version":"3.2.2.1.6","View":"......","Battery":32.0,"DeviceCode":"Code","DeviceID":"f23c14ed70d1f73b","Role":2,"SignalLevel":77,"Url":"http://192.168.0.109:1100"}.&lHX.........A..{"AgendaID":"44c6cc54-be7f-417e-af39-61b5ea6ab7db","DeviceID":"f23c14ed70d1f73b","ConventionID":"60dd7817-ec7d-4454-b0d4-2b71cd3b245a"}?1lHX.........A..{"AgendaID":"44c6cc54-be7f-417e-af39-61b5ea6ab7db","DeviceID":"f23c14ed70d1f73b","ConventionID":"60dd7817-ec7d-4454-b0d4-2b71cd3b245a"}?1lHX............{"Charging":1,"Disk":"","Memory":"","Version":"3.2.2.1.6","View":"......","Battery":32.0,"DeviceCode":"Code","DeviceID":"f23c14ed70d1f73b","Role":2,"SignalLevel":77,"Url":"http://192.168.0.109:1100"}\:lHX............{"Charging":1,"Disk":"","Memory":"","Version":"3.2.2.1.6","View":"......","Battery":32.0,"DeviceCode":"Code","DeviceID":"f23c14ed70d1f73b","Role":2,"SignalLevel":77,"Url":"http://192.168.0.109:1100"}.MlHX...



返回:
.........Q..............G.Q........J..A>{"Result":0,"SignInID":"55122f2d-7f3a-44a2-8c59-8c1c2a6f1c05"}o..        ..............C
............_!B
....

汤辰浩 发表于 2016-11-9 17:59:40

该怎么把这个抓到的包数据转换成 data.ws数据?

汤辰浩 发表于 2016-11-10 09:18:22

没人回复啊~

jingzizx 发表于 2016-11-13 23:41:05

我都是录制的socket...

神仙也考试 发表于 2016-11-14 08:59:16

data.ws实在是太难写了。。。

我一般都是通过直接录制出来的data.ws...

这个也是没办法啊!怪自已技能太low:L

arina 发表于 2018-11-16 11:22:34

遇到同样问题,后来解决了么
页: [1]
查看完整版本: LR编写socket接口测试脚本,data.ws数据该怎么获取?