LoadRunner脚本开发之协议选择

在使用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,从而判断应该采用什么协议录制脚本

原文地址:https://www.cnblogs.com/preftest/p/1948173.html