当前位置:首页 > LoadRunner11-遇到问题及解决办法
查看是否服务器、DNS、网络等方面存在问题。最后,增加一下运行时的超时设置,在\Settings\中,单击\,增加\或者\的值。
54、用strtok函数分割字符串
需要在loadrunner里面获得―15‖(下面红色高亮的部分),并做成关联参数。 //Body response 内容:
<; PRE>//OK[8,7,5,15,6,5,0,4,0,3,0,3,2,0,0,0,1用web_reg_save_param取出―8,7,5,15,6,5,0,4,0,3,0,3,2,0,0,0,1‖这一段,然后用strtok函数切割出一个个数字,第四个数字就是要找的值 例如:
extern char * strtok(char * string, const char * delimiters ); // Explicit declaration char separators[] = \ char * token;
lr_save_string(\
token = (char *)strtok(lr_eval_string(\ if (!token) {
lr_output_message (\ return( -1 ); }
while (token != NULL ) { // While valid tokens are returned lr_output_message (\
token = (char *)strtok(NULL, separators); // Get the next token }
55、测试RTMP协议应该在LoadRunner选择什么协议来录制? 解决办法:用flex协议,有这几个函数可用:
flex_rtmp_connect Connects a client to an RTMP server and sets connection options. flex_rtmp_disconnect Disconnects a client from an RTMP server. flex_rtmp_send Sends messages to an RTMP server. flex_rtmp_receive Receives responses from an RTMP server
Flex can record and replay scripts involving RTMP (Real Time Messaging Protocol). In order to enable RTMP simulation, you must configure the recording options for the Flex protocol. To enable RTMP:
1 Open the Recording Options dialog box by selecting Tools > Recording Options or clicking the Options button in the Start Recording dialog box.
2 In the Network > Port Mapping node click Options. 3 Set the Send-Receive buffer size threshold to 1500.
56、如何在LoadRunner中运行QTP脚本? 1、运行准备:
1)勾选QTP的Tools--Options--Run的\ 2)录制需要在lr中运行的QTP脚本,并且在QTP脚本中设置事务,Services.StartTransaction \与Services.EndTransaction \ 2、运行QTP脚本
在LR中运行时选择QTP脚本,为QTP脚本存放目录下文件扩展名为.usr的文件。 注:LR中运行QTP脚本时,只能有一个Vuser,否则将报错:
The load generator is currently running the maximum number of Vusers of this type
57、在LR中如何忽略Socket接收数据的验证
在LR中对Socket进行性能测试时,LR会自己判断lrs_receive回来的数据的长度,而如果长度不符的话会有时间延迟的情况(这是性能测试完全不能接受的事情),如果做到这一点呢,经过反复尝试,发现一种简单的方法(用*代替具体的长度): 类似于将: recv buf1 12 \ 改为: recv buf1 * \ 一切OK。
58、LoadRunner9.5的Controller中不能添加Apache的监控
在C:\\Program Files\\HP\\LoadRunner\\dat\\online_graphs中找到online_resource_graphs.rmd文件,修改[Apache]部分中的EnableInUI为1 参考:
http://forums11.itrc.hp.com/service/forums/questionanswer.do?admit=109447626+1274450165814+28353475&threadId=1229523
59、VB Vuser开发ADO脚本,提示“user-defined type not defined”
想在VB Vuser写入模拟数据操作的过程,然后在VB Vuser里定义了这个全局变量 Private m_Conn As ADODB.Connection '连接对象
Private m_Reco As ADODB.Recordset '结果集
但是在VB Vuser中不识别这个对象,报出user-defined type not defined 需要在Run-Time 设置中的VBA部分把ADO的库选上
如果用VB Script虚拟用户来开发就不要,直接用CreateObject来创建ADO对象即可
60、loadrunner9.5录制脚本时出现c:\\PROGRA~1\\MICROS~1\\office12\\Grooveutil.DLL时出错内存位置访问无效
解决办法:Office2007的问题,IE加载项禁用Groove GFSBrowser Helper 组件
61、LR自带的例子端口号怎么修改?
LR自带的例子端口号是1080,我怎么样把这个端口设置我自己想用的端口号8088,在什么地方设置 在LR安装目录下,找到Xitami.config文件,找到portbase,可以修改它(默认是1000);默认的端口号是portbase+80;要把端口号改成8088,就把portionbase改为8008,保存之后就是了(8088=8008+80)。
62、用Web_reg_find查找中文字符串时查找不到?
解决办法:脚本文件里有个default.cfg ,里面有个参数是 UTF8InputOutput ,将其值改为0
63、替代IP Wizard的脚本
http://hi.http://www.china-audit.com//higkoo/blog/item/39bbb21bc33d76dcac6e751c.html
LoadRunner自带的―IP Wizard‖用起来非常麻烦,要不停的点,重要的是最后还必须重启系统生效。 于是乎写个脚本替代之: 1. 假设客户端IP为 192.168.10.31 2. 假设服务端IP为 192.168.10.10 3. 需要模拟的IP为 110.119.120.122 那么,客户端提供添加虚拟IP的BAT脚本:
netsh interface ip add address 本地连接 110.119.120.122 255.255.0.0 对应的删除设置为:
netsh interface ip del address 本地连接 110.119.120.122 对应服务器添加虚拟路由的Shell脚本:
route add -host 110.119.120.122 gw 192.168.10.31 删除路由的脚本:
route del -host 110.119.120.122 gw 192.168.10.31
这样就非常方便了,不用重启任何机器,执行脚本就生效,再执行脚本就取消。
64、如何从命令行调用LoadRunner脚本?
Here is the command line that you need to execute to run a VuGen script from the command prompt:
In order to get all the other options that go with the command, run mmdrv.exe from the command prompt without any options.
65、请问\这个类型,在LR中怎么表示\。我将一段C的代码放在LR中,LR不认int64这个类型,怎么解决?
解决办法:把那段C代码做成DLL,然后在LR中调用。
共分享92篇相关文档