51Testing软件测试论坛

标题: LR编写socket接口测试脚本,data.ws数据该怎么获取? [打印本页]

作者: 汤辰浩    时间: 2016-11-9 14:52
标题: 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
这是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
该怎么把这个抓到的包数据转换成 data.ws数据?
作者: 汤辰浩    时间: 2016-11-10 09:18
没人回复啊~
作者: jingzizx    时间: 2016-11-13 23:41
我都是录制的socket...
作者: 神仙也考试    时间: 2016-11-14 08:59
data.ws实在是太难写了。。。

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

这个也是没办法啊!怪自已技能太low
作者: arina    时间: 2018-11-16 11:22
遇到同样问题,后来解决了么




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2