loadrunner 版:
Action()
{
web_reg_save_param("S_respond","LB=","RB=",LAST);
//web_reg_find("Text=\"status\":0",LAST);
lr_rendezvous("test");
web_submit_data("TEST",
"Action=https://xxxxxxxxxxxxxxx.nsccwx.cn/calculateticket",
"Method=POST",
"TargetFrame=",
"RecContentType=text/Json",
"Snapshot=t7.inf",
"Mode=HTML",
ITEMDATA,
"Name=username","Value=null",ENDITEM,
"Name=moneyNumber","Value=1",ENDITEM,
"Name=location","Value=yinhe",ENDITEM,
LAST
);
lr_convert_string_encoding(lr_eval_string("{S_respond}"),LR_ENC_UTF8,NULL,"zhuanma");
lr_output_message("%s",lr_eval_string("{zhuanma}"));
return 0;
}
python 版: