使用LoadRunner進行壓力測試時如何選擇要錄製的協議?

TIB發表於2010-02-02

初學者在使用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功能來幫助選擇協議。

相關文章