您的位置:首页 > 理论基础 > 计算机网络

使用LoadRunner进行压力测试时如何选择要录制的协议?

2010-02-02 23:11 801 查看
初学者在使用LoadRunner进行压力测试的时候往往碰到的第一个问题就是协议选择的问题。有很多种办法可以帮助我们确定需要录制的是什么协议。
 
参考:
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功能来帮助选择协议。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息