LR 测试http协议xml格式数据接口

时间:2022-03-10 14:25:58
Action()
{ lr_start_transaction("T1");
web_custom_request("xxxxHTTPRequest",
"URL=http://xxxx",
"Method=POST",
"Resource=0",
"RecContentType=text/xml",
"Referer=",
"Mode=HTML",
"EncType=text/xml; charset=utf-8",
"Body=<?xml version=\"1.0\" encoding=\"utf-8\"?>"
"\n<feed>"
"\n<token>1999EB84FC68842398B1B4268699DC4D</token>"
"\n<version>1.0.1,10,u12618</version>"
"\n</feed>",
LAST);
lr_end_transaction("T1", LR_AUTO); return ;
}

LR测试XML格式的数据时,如何手写脚本是个问题,遇到该类问题的时候可以参考上面。