高手过来瞧瞧~(LR测试Webservice)
用LR8.0(有webservice补丁)写了一个脚本,如下:web_service_call( "StepName=Manage_103",
"SOAPMethod=SmsReceiveService.SmsReceiveServiceSoap.Manage",
"ResponseParam=response",
"WSDL=http://smsreceiverservice.qualitynew.com/SmsReceiveService.asmx?wsdl",
"UseWSDLCopy=1",
"Snapshot=t1231331466.inf",
BEGIN_ARGUMENTS,
"requestXml=<?xml version=\"1.0\" encoding=\"UTF-8\"?><sms:Request xmlns:req=\"http://www.beyondbit.com/sms/sao/domains/request600001\" xmlns:sms=\"http://www.beyondbit.com/sms\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"><sms:Head><sms:TrCode>600001</sms:TrCode><sms:ApplicationCode>smscenter</sms:ApplicationCode><sms:ApplicationPassword>123456</sms:ApplicationPassword><sms:UserUid>__sao__</sms:UserUid><sms:UserPassword>App1234</sms:UserPassword><sms:ClientTxSeq></sms:ClientTxSeq><sms:MacCode></sms:MacCode></sms:Head><sms:Body xsi:type=\"req:RequestBody600001\"><req:Sender>qqq</req:Sender><req:SenderAccount>zhangjr</req:SenderAccount><req:ReceiverAccount>luozhi</req:ReceiverAccount><req:ReceiverAccountType>ACCOUT</req:ReceiverAccountType><req:Group>0</req:Group><req:Priority>5</req:Priority><req:Level>L</req:Level><req:SMSContent>这是wwww</req:SMSContent><req:Signer></req:Signer></sms:Body></sms:Request>",
END_ARGUMENTS,
BEGIN_RESULT,
END_RESULT,
LAST);
只要不保存,运行都是OK的。但是保存后,就会报错:
Virtual User Script started
Starting action vuser_init.
vuser_init.c(4): web_service_call "Manage_103" started.
vuser_init.c(4): Using working copy of the WSDL file "http://smsreceiverservice.qualitynew.com/SmsReceiveService.asmx?wsdl"
vuser_init.c(4): Error: The wsdl file "http://smsreceiverservice.qualitynew.com/SmsReceiveService.asmx?wsdl" has an error. (Working copy for http://smsreceiverservice.qualitynew.com/SmsReceiveService.asmx?wsdl does not exist.)
vuser_init.c(4): Error: web_service_call "Manage_103" execution failed
Abort was called from an action.
不管是用URL,还是特定的目录文件都会报这个错。望高手们帮忙解答。 顶一下.在线等. http://smsreceiverservice.qualitynew.com/SmsReceiveService.asmx?wsdl
打不开。
估计存储位置错误或是选用的ws类型错误。 关键是保存后就报错。打不开是正常的~那个链接是我们公司内部的~如果实在搞不定的话,就只能用JMETER了。 你不录制先加好那个那个wsdl试下,保存好再看可否打开 我试过了直接用URL访问和保存WSDL文件,效果都是一样的。都是在脚本保存前运行没有任何问题,但是保存后就RUN不了。反正这个问题留着继续讨论吧。我在怀疑,是不是我们LR的key不支持这种脚本。 应该不是地,我意思是先连接上wsdl以后保存不用添加具体操作保存后,试着更新下看是不是会出错 还真不是很明白为何出错。。。
你可以尝试用soapui测试下。
回复 7# 的帖子
你可能没有明白我说的意思。这个脚本根本就不是录制的。而是自己写的。所以说,应该不是WSDL或者链接的错误。
页:
[1]