loadRunner中webService 接口测试
请教高手!!今天接到一个测试任务,需要测试一个webservice接口的性能,主要目的是测试接口在高并发情况下,系统是否会有问题。
接口URL如下:http://124.232.153.156:8081/SwitchInWcfService?wsdl
传入参数是:
<?xml version="1.0" encoding="utf-8"?>
<Request>
<HeaderInfo UserID="96" RequestorId="Ctrip.com" AsyncRequest="false" TimeStamp="2012-8-6 3:54:24" >
<Authentication UserName="test" Password="test!!"/>
<RequestType Name="DomesticSubmitNewHotelOrderRequest " Version="1.0"/>
</HeaderInfo>
<DomesticSubmitNewHotelOrderRequest>
<OrderID>609223025</OrderID>
<InterFaceSendID>14112314</InterFaceSendID>
<Hotel>1312</Hotel>
....
</DomesticSubmitNewHotelOrderRequest>
</Request>
通过webservice 协议录制脚本,如下:
Action()
{
//lr_start_transaction("CheckRoomAvail");
//通过webService 调用Invoke 方法
//
web_service_call( "StepName=Invoke_101",
"SOAPMethod=CtripWcfService|BasicHttpBinding_IOTAInterface|Invoke",
"ResponseParam=response",
"Service=CtripWcfService",
"ExpectedResponse=SoapResult",
"Snapshot=t1442221720.inf",
BEGIN_ARGUMENTS,
"xml=123",
"Invoketype=",
END_ARGUMENTS,
BEGIN_RESULT,
"InvokeResult=Param_InvokeResult",
END_RESULT,
LAST);
//lr_output_message("----%s","{inxml}");
//lr_end_transaction("CheckRoomAvail", LR_AUTO);
return 0;
}
现在我的问题是,我不知道怎么把参数传进去,怎么把返回值取出来?
还有XML如何参数化?
新手可以用可视化方式,但建议自己写脚本!
1)引入webservice,注意wsdl后缀
http://dl.iteye.com/upload/attachment/0076/7279/f876a5fd-d125-3a68-bb39-3af9ad6f39a3.jpg
2)给入参填值
http://dl.iteye.com/upload/attachment/0076/7281/f64626d3-6735-3caa-a956-e19ee7d16f78.jpg
3)给返回值指定存储到的变量中
http://dl.iteye.com/upload/attachment/0076/7283/7ac71536-3fbe-3ce2-8428-c9a4b26d94c9.jpg
4)结果检查
楼上说的不错谢谢 支持2楼
页:
[1]