欢迎光临
LoadRunner录制Web Services协议
上一篇 /
下一篇 2007-08-01 10:14:18
/ 个人分类:精华收藏
准备工作:LoadRunner8.0的Virtual User Generator录制Web Services协议存在一个bug,当服务器的
操作系统是中文时,
LoadRunner会自动将WSDL文件的头改为<?xml version="1.0" encoding="zh_cn"?>,当回放脚本时会报以下错误:
Error: server returned an incorrectly formatted SOAP response
因此在录制Web Services协议前,需要打两个补丁:
LR80WebServicesFP1_setup.exe
lrunner_web_services_patch_1.exe
录制:首先当然是选择Web Services协议了
screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='点击在新窗口浏览图片 CTRL+Mouse 滚轮可放大/缩小';}" ōnclick="if(!this.resized) { return true; } else { window.open(this.src); }" src="http://bbs.testfocus.com.cn/attachment.aspx?attachmentid=333" ōnload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='点击在新窗口浏览图片 CTRL+鼠标滚轮可放大/缩小';}">
点击OK
screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='点击在新窗口浏览图片 CTRL+Mouse 滚轮可放大/缩小';}" ōnclick="if(!this.resized) { return true; } else { window.open(this.src); }" src="http://bbs.testfocus.com.cn/attachment.aspx?attachmentid=334" ōnload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='点击在新窗口浏览图片 CTRL+鼠标滚轮可放大/缩小';}">
这里有两个选择,录制客户端程序或扫描WSDL文件,如果选择客户端程序,录制的是客户端实际的操作;如果选择扫描WSDL文件,则可自定义调用Web Service方法的顺序。这里选择Scan WSDL File,点击Next
screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='点击在新窗口浏览图片 CTRL+Mouse 滚轮可放大/缩小';}" ōnclick="if(!this.resized) { return true; } else { window.open(this.src); }" src="http://bbs.testfocus.com.cn/attachment.aspx?attachmentid=335" ōnload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='点击在新窗口浏览图片 CTRL+鼠标滚轮可放大/缩小';}">
输入WSDL的URL,比如
http://192.168.1.1:7001/webservice/TraderService?WSDL,点击Next,这时LoadRunner会检测此URL,如果检测正确,会进入以下界面
screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='点击在新窗口浏览图片 CTRL+Mouse 滚轮可放大/缩小';}" ōnclick="if(!this.resized) { return true; } else { window.open(this.src); }" src="http://bbs.testfocus.com.cn/attachment.aspx?attachmentid=336" ōnload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='点击在新窗口浏览图片 CTRL+鼠标滚轮可放大/缩小';}">
点击Next
screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='点击在新窗口浏览图片 CTRL+Mouse 滚轮可放大/缩小';}" ōnclick="if(!this.resized) { return true; } else { window.open(this.src); }" src="http://bbs.testfocus.com.cn/attachment.aspx?attachmentid=337" ōnload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='点击在新窗口浏览图片 CTRL+鼠标滚轮可放大/缩小';}">
LoadRunner会将检测到的Web Service列出来,包括服务名和此服务提供的方法,选择需要录制的方法,并点击“>>”按钮,点击Next
screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='点击在新窗口浏览图片 CTRL+Mouse 滚轮可放大/缩小';}" ōnclick="if(!this.resized) { return true; } else { window.open(this.src); }" src="http://bbs.testfocus.com.cn/attachment.aspx?attachmentid=338" ōnload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='点击在新窗口浏览图片 CTRL+鼠标滚轮可放大/缩小';}">
此处可对输入参数及输出结果进行设置,设置后点击Next
screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='点击在新窗口浏览图片 CTRL+Mouse 滚轮可放大/缩小';}" ōnclick="if(!this.resized) { return true; } else { window.open(this.src); }" src="http://bbs.testfocus.com.cn/attachment.aspx?attachmentid=339" ōnload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='点击在新窗口浏览图片 CTRL+鼠标滚轮可放大/缩小';}">
可在此处设置Run-Time Setting,如果勾选“Run scrīpt after generation”,则生成脚本后自动回放,点击Finish,脚本录制完成。
收藏
举报
TAG:
精华收藏