Loadrunner学习笔记之ip欺骗

上一篇 / 下一篇  2007-11-28 10:39:23 / 个人分类:loadrunner

ip欺骗设置:51Testing软件测试网dl1@V:dG)Sz-f.[
1.在总控机上使用loadrunner->tools->ip wizard工具设置虚拟ip,其中server ip指要监控的服务器的ip,添加ip时选择A、B或C类ip,设置开始ip和要添加的虚拟ip的个数,并选中verify the new ip addresses are not already use,已检查添加的ip是否与局域网中的其它ip冲突
(]$FZ%Tw3q02.重启机器51Testing软件测试网Pa~7ST!|z&t
3.在controller的scenario中勾选enable ip spoofer,启用虚拟ip
CR[F+@9X03.在controller的tools中选中expert mode,在options->general中设置multiple ip address mode与run-time settings中的multithreading设置保持一致51Testing软件测试网"\1~$d.q&BYv,~
4.在load generators中选择localhost
5P(@g7T!V0查看脚本执行过程中是否使用了设置的虚拟ip,可以如下设置:51Testing软件测试网sszG8Y
在脚本中添加代码:
'IgwR d~0char *ip = lr_get_vuser_ip();
{ tRZ-T3q-S0if (ip)51Testing软件测试网/f"BmS4Q*_2P6xG6Y
     lr_output_message("The IP address is %s", ip);51Testing软件测试网$o j.B$w.gI E M
else
2_X3H~b8Go Y'})C0     lr_output_message("IP spoofing disabled");
A~JR c;q'@'c0在脚本运行过程中查看controller的output,view->show output,选择all messages,查看输出的ip是否为设置的虚拟ip

TAG: loadrunner ip欺骗

bossy的个人空间 引用 删除 bossy   /   2008-03-06 09:33:20
没有作用
 

评分:0

我来说两句

Open Toolbar