Loadrunner日志是十六进制
本帖最后由 huyongdidai 于 2017-5-4 15:54 编辑{"message":"\xE4\xBD\xA0\xE8\xBE\x93\xE5\x85\xA5\xE7\x9A\x84\xE7\x94\xA8\xE6\x88\xB7\xE6\x88
Action.c(12): \x96\xE5\xAF\x86\xE7\xA0\x81\xE4\xB8\x8D\xE5\xAD\x98\xE5\x9C\xA8\xEF\xBC\x8C\xE8\xAF\xB7\xE9
Action.c(12): \x87\x8D\xE6\x96\xB0\xE8\xBE\x93\xE5\x85\xA5\xE3\x80\x82","result":{},"code":"-1"}
如何翻译让日志{"message":"\xE4\xBD\xA0\xE8\xBE\x93\xE5\x85\xA5\xE7\x9A\x84\xE7\x94\xA8\xE6\x88\xB7\xE6\x88变成中文,实际应该是
{"message":"你输入的用户或密码不存在,请重新输入。","result":{},"code":"-1"}
自己搞定了,答案见三楼
没用过还真不知道 web_reg_save_param(
"log",
"LB=message",
"RB=",
"Search=Body",
LAST);
web_custom_request("login",
"URL=www.baidu.com",
"Method=POST",
"Resource=0",
"RecContentType=application/json",
//"Snapshot=t10.inf",
"Mode=HTML",
"EncType=application/json;charset=UTF-8",
LAST);
lr_convert_string_encoding(lr_eval_string("{log}"),"UTF-8",NULL,"ScheckPoint");
lr_output_message("%s",lr_eval_string("{ScheckPoint}"));
lr_end_transaction("login",LR_AUTO); :victory: 赞一个!
页:
[1]