51Testing软件测试论坛

标题: 微信小程序Replay脚本报错 Error -26547: Authentication required, please use we... [打印本页]

作者: 测试时代    时间: 2018-11-13 14:18
标题: 微信小程序Replay脚本报错 Error -26547: Authentication required, please use we...
微信小程序录制登录和创建订单脚本Action()
{

    web_custom_request("login",
        "URL=http://121.196.212.73:8000/api/baseuser/login",
        "Method=POST",
        "Resource=0",
        "RecContentType=application/json",
        "Referer=https://servicewechat.com/wxbc74b635514c2bf5/0/page-frame.html",
        "Snapshot=t1.inf",
        "Mode=HTML",
        "EncType=application/json",
        "Body={\"username\":\"512501197506045175\",\"password\":\"123456\"}",
        EXTRARES,
        "Url=../order/order?status=ORDER_STATUS_AUDIT&orderNum=&page=0", "Referer=https://servicewechat.com/wxbc74b635514c2bf5/0/page-frame.html", ENDITEM,
        "Url=store/findAll", "Referer=https://servicewechat.com/wxbc74b635514c2bf5/0/page-frame.html", ENDITEM,
        "Url=../question/mate/findAll", "Referer=https://servicewechat.com/wxbc74b635514c2bf5/0/page-frame.html", ENDITEM,
        "Url=user/addressListForChoose?userId=ff80808166c8c2420166c9444c21000a", "Referer=https://servicewechat.com/wxbc74b635514c2bf5/0/page-frame.html", ENDITEM,
        "Url=user/findDefaultAddressByUserId?userId=ff80808166c8c2420166c9444c21000a", "Referer=https://servicewechat.com/wxbc74b635514c2bf5/0/page-frame.html", ENDITEM,
        LAST);

    web_custom_request("order",
        "URL=http://121.196.212.73:8000/api/order/order",
        "Method=POST",
        "Resource=0",
        "RecContentType=application/json",
        "Referer=https://servicewechat.com/wxbc74b635514c2bf5/0/page-frame.html",
        "Snapshot=t2.inf",
        "Mode=HTML",
        "EncType=application/json",
        "BodyBinary={\"userName\":\"\\xE6\\x9E\\x97\\xE5\\x8D\\x8E\",\"storeCode\":\"1301000002\\\\t\",\"realId\":\"ff80808166c8028a0166c809938b0000\",\"realPhone\":\"15874123695\",\"realName\":\"\\xE5\\x88\\x98\\xE7\\xA5\\x96\\xE5\\x85\\xA8\",\"proviceId\":\"420000\",\"mateType\":\"\\xE7\\x83\\xAD\\xE6\\x95\\x8F\\xE7\\xBA\\xB8\",\"conName\":\"\\xE6\\x9F\\xB3\\xE5\\xBF\\xB5\",\"consigneAddress\":\""
        "\\xE6\\xB9\\x96\\xE5\\x8C\\x97\\xE7\\x9C\\x81\\xE6\\xAD\\xA6\\xE6\\xB1\\x89\\xE5\\xB8\\x82\\xE8\\xA1\\x97\\xE9\\x81\\x93\\xE5\\x8F\\xA3\\xE9\\x93\\xB6\\xE6\\xB3\\xB0\",\"conphoneNum\":\"13415212584\",\"number\":4,\"remark\":\"99999\"}",
        EXTRARES,
        "Url=order?status=ORDER_STATUS_AUDIT&orderNum=&page=0", "Referer=https://servicewechat.com/wxbc74b635514c2bf5/0/page-frame.html", ENDITEM,
        LAST);

    return 0;
}
Replay脚本出现报错
Action.c(22): web_custom_request("order") started          [MsgId: MMSG-26355]
Action.c(22): Downloading resource "http://121.196.212.73:8000/api/order/order?status=ORDER_STATUS_AUDIT&orderNum=&page=0" (specified by argument number 12)          [MsgId: MMSG-26577]
Action.c(22): Error -26547: Authentication required, please use web_set_user, e.g. web_set_user("domain\\user", "password", "host:port");          [MsgId: MERR-26547]
Action.c(22): Error -26630: HTTP Status-Code=401 (Unauthorized) for "http://121.196.212.73:8000/api/order/order"          [MsgId: MERR-26630]
Action.c(22): Warning -26547: Authentication required, please use web_set_user, e.g. web_set_user("domain\\user", "password", "host:port");          [MsgId: MWAR-26547]
Action.c(22): Warning -26630: HTTP Status-Code=401 (Unauthorized) for "http://121.196.212.73:8000/api/order/order?status=ORDER_STATUS_AUDIT&orderNum=&page=0"          [MsgId: MWAR-26630]
Action.c(22): web_custom_request("order") highest severity level was "ERROR", 294 body bytes, 912 header bytes, 22 chunking overhead bytes          [MsgId: MMSG-26387]
Ending action Action.

[attach]119385[/attach]


作者: 测试时代    时间: 2018-11-13 15:12
录制过微信小程序的麻烦看看!




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