51Testing软件测试论坛

标题: 这种情况下如何手工构造http请求 [打印本页]

作者: njsunl    时间: 2011-9-1 13:04
标题: 这种情况下如何手工构造http请求
在手机上玩游戏,游戏结束后,通过WAP网关把成绩发送到一台服务器上。在这台服务器上抓包,得到一个HTTP请求如下,请问:在LR中,如何构造脚本来模拟手机发送的这个请求?

POST /entry?msgType=ReportScore HTTP/1.1
Content-Length: 272
Content-Type: text/plain; charset=ISO-8859-1
Host: 10.40.18.27:8081
Connection: Keep-Alive
User-Agent: Apache-HttpClient/UNAVAILABLE (java 1.4)
Expect: 100-Continue

<?xml version="1.0" encoding="UTF-8"?><request><msgtype>ReportScore</msgtype><sender>101</sender><userid>93170176</userid><gameid>9000003620110816027800</gameid><rankid>0000000001</rankid><score>1940</score><sessionid>79f5b66fac3086c198e0914d47dc8504</sessionid></request>HTTP/1.1 200 OK [TESTOSE]
Server: TESTOSE
Content-Length: 112
Content-Type: text/xml
Connection: close

<?xml version="1.0" encoding="UTF-8" ?><response><msgtype>ReportScoreResp</msgtype><result>0</result></response>
作者: PrefTest    时间: 2011-9-1 23:29
web_custom_request

查一下LR的帮助文档吧
作者: 云层    时间: 2011-9-2 09:59
最近的这个项目天天写web_custom_request内流啊




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