51Testing软件测试论坛

标题: lr做接口测试post不过去数据求解 [打印本页]

作者: 踏雪飞狐    时间: 2015-7-31 10:08
标题: lr做接口测试post不过去数据求解
lr做接口测试post不过去数据求解,回放成功了,但经和开发调试,post过去的数据是空的,有哪位知道我这个是哪里出问题了,脚本如下:
Action()
{
    web_add_header("Content-Type","application/json;charset=UTF-8");
        web_submit_data("web_submit_data",
                "Action=http://192.168.0.150/prod/prodContent",
                "Method=POST",
                "TargetFrame=",
                "Referer=",
                "Mode=HTTP",
                ITEMDATA,
                "Name=requestJson", "Value={\"head\":{\"version\":\"1.0.0\",\"code\":\"dahongwaapp\",\"timestamp\": 1438161369743},\"body\": {\"prodId\": \"20020\"}}", ENDITEM,
                EXTRARES,
                "URL=http://192.168.0.150/prod/prodDetail", "Referer=http://192.168.0.150/prod/prodDetail", ENDITEM,
                LAST);

        return 0;
}
运行日志如下::
Starting action Action.
Action.c(4): Warning -26593: The header being added may cause unpredictable results when applied to all ensuing URLs. It is added anyway          [MsgId: MWAR-26593]
Action.c(4): web_add_header("Content-Type") highest severity level was "warning"          [MsgId: MMSG-26391]
Action.c(5): Downloading resource "http://192.168.0.150/prod/prodDetail" (specified by argument number 12)          [MsgId: MMSG-26577]
Action.c(5): web_submit_data("web_submit_data") was successful, 172 body bytes, 341 header bytes, 22 chunking overhead bytes          [MsgId: MMSG-26385]
Ending action Action.
Ending iteration 1.



作者: 踏雪飞狐    时间: 2015-7-31 10:32
已搞定,是开发给的接口有问题,坑死了
作者: 277169949    时间: 2015-9-11 22:29
    那确实有点坑




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