LoadRunner脚本开发之协议选择

本文介绍了在使用LoadRunner进行压力测试时如何确定合适的协议。提供了多种方法,包括咨询开发团队、使用Wireshark抓包、利用NetStat命令及Winsock协议等手段。此外还提到了LR9.5版本后新增的ProtocolAdvisor功能。

在使用LR进行压力测试的时候往往碰到的第一个问题就是协议选择的问题。有很多种办法可以帮助我们确定需要录制的是什么协议。

 

参考:

http://www.loadrunnertnt.com/concepts/which-protocol-to-use/

 

To understand the protocol used by the application (client to server), you can do the following.

1. The easiest way, check with the application team or vendor, particularly the software architects and the developers. They should be able to provide such information. If they don’t, it ’s time to doubt the experiences of the application team.(与开发交流)

2. Use WireShark Network Analyzer to sniff the traffic communication when the application is running. More details of the usage can be found in the provider’s site. You should be able to see the protocols under the protocol column after you start capturing the traffic.(使用WireShark网络协议分析工具来捕获协议包)

3. Use netstat -a to determine the protocol and port number. For example, the protocol is TCP and port number is 80, it could signifies HTTP. The caveat for this is that netstat -a only display protocol in IP, IPv6, ICMP, ICMPv6, TCP, TCPv6, UDP, or UDPv6 (/? help for more information), which means you may need to guess the protocol according to the protocol (TCP) and port number.(使用NetStat命令查看正在使用的协议有哪些)

4. Use Winsock protocol to determine the protocol via the data files. Winsock captures all traffic of any type at the socket level and writes it to the data file. From the data file, you will then find signatures of the protocol such as HTTP requests and responses in the context of HTTP.(用LR的Winsock协议进行录制后再分析记录下来的数据文件)

 

补充:

在LR9.5后,可以利用新添加的Protocol Advisor功能来帮助选择协议。

 

利用ProcessSpy工具

用ProcessSpy查看应用程序使用到的DLL,从而判断应该采用什么协议录制脚本

在使用LR进行压力测试的时候往往碰到的第一个问题就是协议选择的问题。有很多种办法可以帮助我们确定需要录制的是什么协议。

 

参考:

http://www.loadrunnertnt.com/concepts/which-protocol-to-use/

 

To understand the protocol used by the application (client to server), you can do the following.

1. The easiest way, check with the application team or vendor, particularly the software architects and the developers. They should be able to provide such information. If they don’t, it ’s time to doubt the experiences of the application team.(与开发交流)

2. Use WireShark Network Analyzer to sniff the traffic communication when the application is running. More details of the usage can be found in the provider’s site. You should be able to see the protocols under the protocol column after you start capturing the traffic.(使用WireShark网络协议分析工具来捕获协议包)

3. Use netstat -a to determine the protocol and port number. For example, the protocol is TCP and port number is 80, it could signifies HTTP. The caveat for this is that netstat -a only display protocol in IP, IPv6, ICMP, ICMPv6, TCP, TCPv6, UDP, or UDPv6 (/? help for more information), which means you may need to guess the protocol according to the protocol (TCP) and port number.(使用NetStat命令查看正在使用的协议有哪些)

4. Use Winsock protocol to determine the protocol via the data files. Winsock captures all traffic of any type at the socket level and writes it to the data file. From the data file, you will then find signatures of the protocol such as HTTP requests and responses in the context of HTTP.(用LR的Winsock协议进行录制后再分析记录下来的数据文件)

 

补充:

LR9.5后,可以利用新添加的Protocol Advisor功能来帮助选择协议。

 

利用ProcessSpy工具

ProcessSpy查看应用程序使用到的DLL,从而判断应该采用什么协议录制脚本

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值