TA的每日心情 | 奋斗 2017-9-19 09:36 |
---|
签到天数: 5 天 连续签到: 1 天 [LV.2]测试排长
|
需要实现的功能是这样的,1、生成订单后2、把1生成的订单退订,关键词是订单ID(orderId),所以我要从1中把生成的订单ID(orderId),通过正则表达式提取出来(设置参数orderId),在2中作为请求入参(${orderId}),现在出现的问题是,我使用提取出来的orderId去退订的时候找不到订单信息,退订失败;但是如果我不用参数orderId,我直接orderId的值填进去,退订就是成功的;看了两次的请求,入参都是一样的,为啥了?1、通过提取正则变量,订单退订请求如下:
POST data:
orderId=SOW201703309858455 //说明:这个我是在请求中把orderId设置为变量${orderId},通过${orderId}的值是SOW201703309858455
Cookie Data:
$Version=0; mallJSessionID=71F45C439CC6E8E8AEB32AA4B58B2BB8; $Path=/umall/
Request Headers:
Accept-Language: zh-CN
Content-Length: 26
User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)
Connection: keep-alive
Accept: application/x-ms-application, image/jpeg, application/xaml+xml, image/gif, image/pjpeg, application/x-ms-xbap, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
Content-Type: application/x-www-form-urlencoded
2、不通过变量,直接把订单的ID写在请求中:
POST data:
orderId=SOW201703309858455 //说明:这个我是在请求中直接把orderId设置为SOW201703309858455
Cookie Data:
$Version=0; mallJSessionID=DDE65B7877546F3A3B133043CF1EF2EB; $Path=/umall/
Request Headers:
Accept-Language: zh-CN
Content-Length: 26
User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)
Connection: keep-alive
Accept: application/x-ms-application, image/jpeg, application/xaml+xml, image/gif, image/pjpeg, application/x-ms-xbap, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
Content-Type: application/x-www-form-urlencoded
比较了两个请求,也没有什么区别不知道为什么1中找不到订单SOW201703309858455 信息,2中可以退订成功
哪位大神可以解答~~~多谢
|
|