上QQ阅读APP看书,第一时间看更新
Configuring a proxy server
If you are working from behind a corporate firewall, you may need to configure JMeter to work with it, providing it with the proxy server host and port number.
To do so, supply additional command-line parameters to JMeter when starting
it up. Some of them are as follows:
- -H: This command-line parameter specifies the proxy server hostname or
IP address - -P: This specifies the proxy server port
- -u: This specifies the proxy server username if it is secure
- -a: This specifies the proxy server password if it is secure; consider the following example:
./jmeter.sh -H proxy.server -P 7567 -u username -a password
On Windows, run the jmeter.bat file instead.
Do not confuse the proxy server mentioned here with JMeter's built-in HTTP(S) Test Script Recorder, which is used to record HTTP or HTTPS browser sessions. We will be exploring this in the next chapter when we record our first test scenario.
The screen is displayed as follows:
JMeter GUI