51Testing软件测试论坛

标题: 怎么根据http的消息制作脚本,急救啊 [打印本页]

作者: 朱晓青    时间: 2012-12-11 17:32
标题: 怎么根据http的消息制作脚本,急救啊
POST /PORTAL/dsm/userLogin HTTP/1.1

Content-Length: 115

Content-Type: text/plain; charset=UTF-8

Host: 221.226.48.164:33400

Connection: Keep-Alive

User-Agent: Apache-HttpClient/UNAVAILABLE (java 1.4)

Expect: 100-Continue



HTTP/1.1 100 Continue



{"serviceToken":"1","mac":"BC7670AD756D","model":"EC6108V1","IP":"172.17.185.122","area":"China","osVersion":"2.2"}HTTP/1.1 200 OK

Server: Apache-Coyote/1.1

Set-Cookie: JSESSIONID=0B79300E3FCC77C5874A38982563D895; Path=/PORTAL

Content-Type: text/xml;charset=UTF-8

Transfer-Encoding: chunked

Date: Tue, 11 Dec 2012 07:20:07 GMT



6f

{"sessionId":"0B79300E3FCC77C5874A38982563D895","code":0,"serviceUrl":"http://221.226.48.164:33400/PORTAL/dsm"}

0
这是请求消息


POST /PORTAL/dsm/userLogin HTTP/1.1

Content-Length: 115

Content-Type: text/plain; charset=UTF-8

Host: 221.226.48.164:33400

Connection: Keep-Alive

User-Agent: Apache-HttpClient/UNAVAILABLE (java 1.4)

Expect: 100-Continue



HTTP/1.1 100 Continue



{"serviceToken":"1","mac":"BC7670AD756D","model":"EC6108V1","IP":"172.17.185.122","area":"China","osVersion":"2.2"}HTTP/1.1 200 OK

Server: Apache-Coyote/1.1

Set-Cookie: JSESSIONID=0B79300E3FCC77C5874A38982563D895; Path=/PORTAL

Content-Type: text/xml;charset=UTF-8

Transfer-Encoding: chunked

Date: Tue, 11 Dec 2012 07:20:07 GMT



6f

{"sessionId":"0B79300E3FCC77C5874A38982563D895","code":0,"serviceUrl":"http://221.226.48.164:33400/PORTAL/dsm"}

0



这是响应消息
作者: felix09049    时间: 2012-12-12 14:46
应该比较两次请求,看请求相同的部分和不同的部分,然后用web_custom_request
不知对不对。




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