官术网_书友最值得收藏!

Running JMeter

Once installed, the bin folder under the JMETER_HOME folder contains all the executable scripts that can be run. Based on the operating system that you installed JMeter on, you either execute the shell scripts (.sh file) for operating systems that are Unix/Linux flavored, or their batch (.bat file) counterparts on operating systems that are Windows flavored.

JMeter files are saved as XML files with a .jmx extension. We refer to them as test scripts or JMX files in this book.

These scripts include the following:

  • jmeter.sh: This script launches JMeter GUI (the default)
  • jmeter-n.sh: This script launches JMeter in non-GUI mode (takes a JMX file as input)
  • jmeter-n-r.sh: This script launches JMeter in non-GUI mode remotely
  • jmeter-t.sh: This opens a JMX file in the GUI
  • jmeter-server.sh: This script starts JMeter in server mode (this will be kicked off on the master node when testing with multiple machines remotely; more on this in Chapter 6, Distributed Testing)
  • mirror-server.sh: This script runs the mirror server for JMeter
  • shutdown.sh: This script gracefully shuts down a running non-GUI instance
  • stoptest.sh: This script abruptly shuts down a running non-GUI instance

To start JMeter, open a Terminal shell, change to the JMETER_HOME/bin folder, and run the following command on Unix/Linux:

./jmeter.sh

Alternatively, run the following command on Windows:

jmeter.bat

A short moment later, you will see the JMeter GUI displayed in the configuring proxy server section. Take a moment to explore the GUI. Hover over each icon to see a short description of what it does. The Apache JMeter team has done an excellent job with the GUI. Most icons are very similar to what you are used to, which helps ease the learning curve for new adapters. Some of the icons, for example, stop and shutdown, are disabled for now till a scenario/test is being conducted. In the next chapter, we will explore the GUI in more detail as we record our first test script.

The JVM_ARGS environment variable can be used to override JVM settings in the jmeter.bat or jmeter.sh script. Consider the following example:
export JVM_ARGS="-Xms1024m -Xmx1024m -Dpropname=propvalue".
主站蜘蛛池模板: 永宁县| 石景山区| 庆元县| 广汉市| 根河市| 犍为县| 化德县| 溧水县| 仁怀市| 增城市| 三原县| 遵义县| 思南县| 普宁市| 云浮市| 南康市| 霍山县| 富阳市| 连平县| 禹城市| 临安市| 托克逊县| 嘉黎县| 易门县| 涡阳县| 七台河市| 鄂托克前旗| 华容县| 昔阳县| 英吉沙县| 宜城市| 成安县| 确山县| 东辽县| 呼玛县| 富宁县| 阿城市| 成都市| 扎兰屯市| 嘉峪关市| 平乡县|