怎样用LoadRunner模拟如下请求?
期望模拟的请求:POST /yourURL/ HTTP/1.1
Content-Type: text/xml
Content-Length: 443
Cache-Control: no-cache
Pragma: no-cache
Accept: text/html
Connection: keep-alive
<?xml version="1.0" encoding="UTF-8"?><content>something</content>
尝试:使用web_submit_data,参数非要指定Name和Value。想仅Post一个XmlString过去而已:
web_submit_data("PostXmlRpc",
"Action=http://testServier/yourURL/",
"Method=POST",
"EncType=multipart/form-data",
"RecContentType=text/xml",
ITEMDATA,
"Name=<?xml version",
"Value=\"1.0\" encoding=\"UTF-8\"?><content>something</content>",
ENDITEM,
LAST);
但结果是:
(RelFrameId=1, Internal ID=1)
-----------------------------7d025e2b16b064e\r\n
Content-Disposition: form-data; name="<?xml version"\r\n
\r\n
"1.0" encoding="UTF-8"?><methodCall xmlns:ex="http://ws.apache.org/xmlrpc/namespaces/exten
sions"><methodName>auth.getFrob</methodName><params><param><value><struct><member><name>gu
id</name><value>e6cae838171c4088945e89766751bdcd</value></member><member><name>c</name><va
lue>4B0D097E</value></member><member><name>appkey</name><value>53C927D1A198A7119AA0F337748
4FE81</value></member></struct></value></param></params></methodCall>\r\n
-----------------------------7d025e2b16b064e--\r\n
红色是web_submit_data自动生成而不需要的部分。
晕,问题已解决
用 web_custom_request
页:
[1]