Loadrunner学习笔记之ip欺骗

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

ip欺骗设置:51Testing软件测试网wOKY5W1JW)MK
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冲突
I Y0f5u`9voo~1?w]02.重启机器51Testing软件测试网'Ou}*voe%zf
3.在controller的scenario中勾选enable ip spoofer,启用虚拟ip51Testing软件测试网N#Bccj PN8i X
3.在controller的tools中选中expert mode,在options->general中设置multiple ip address mode与run-time settings中的multithreading设置保持一致
4k'N(o'}&O04.在load generators中选择localhost51Testing软件测试网KN/C.N lY
查看脚本执行过程中是否使用了设置的虚拟ip,可以如下设置:
a?3S1|.~/s0qo0在脚本中添加代码:
b(l S1NR H(\5G%R0char *ip = lr_get_vuser_ip();51Testing软件测试网D*tQcl1R#e6d
if (ip)51Testing软件测试网#cMX(n L q
     lr_output_message("The IP address is %s", ip);51Testing软件测试网|n u3Z(WG
else
/w]f8tc`x0     lr_output_message("IP spoofing disabled");51Testing软件测试网J*N } AC~
在脚本运行过程中查看controller的output,view->show output,选择all messages,查看输出的ip是否为设置的虚拟ip

TAG: loadrunner ip欺骗

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

评分:0

我来说两句

Open Toolbar