launch modes

launch modes

Launching the JMeter tool for scripting purposes is the next step after successfully installing JMeter. Even if launching the Apache JMeter tool isn’t a big deal, the purpose of this article is to educate readers about the different JMeter launch modes.

There are three ways to start the Apache JMeter program on your computer. Each mode has its own advantages:

  1. GUI mode
  2. Command line mode (non GUI)
  3. Clientless (server) mode

In general, GUI mode is used to create test scripts; however, load tests should be run in a non-GUI mode as it uses less memory.

1. JMeter GUI mode

GUI mode is used to prepare the test script, debug the script, and smoke test. JMeter uses significantly more memory in this mode compared to non-GUI mode.

JMeter is the easiest method to start the GUI for Windows and Mac users. Double-click jmeter.bat in the Apache JMeter /bin directory. The JMeter console will start first, then the JMeter GUI.

The following procedures must be followed to start the JMeter GUI from the Windows command line:

Go to ‘Run’ and enter ‘cmd’

Go to the Apache JMeter /bin folder and type jmeter.bat.

the ‘Enter’ key

2. Non-GUI mode of JMeter

Non-GUI mode is used to run tests because JMeter uses less memory in this mode, freeing up space for threads to run more freely and avoiding test failures due to memory issues.

Open the console, go to the Apache JMeter /bin folder, and enter the following command to start JMeter or run the test in non-GUI mode:

Jmeter -n -t script name with path> for Windows Log file name and path: -l

For Unix, enter the following command: ./jmeter.sh -n -script name with path’ -l ‘log file name with path’

Also, if you say ‘jmeter -?’ to see a list of all the options for the JMeter command, you will see the output as

Again, you need to go to the JMeter /bin directory and run the stop test at a command prompt on a Windows machine or ./stoptest.sh on a Unix machine to stop the test midway. If more than one JMeter test script is running, stop each one individually by adding the process ID to the stop command, such as stop test 4445.

Additional useful commands for the Windows operating system include:

• jmeter.bat: to run JMeter in GUI mode

• jmeterw: To run JMeter (in GUI mode by default) without the Windows shell console

• JMeter – JMeter tests cannot be run in non-GUI tests.

• “jmeter -n -r” Run a non-GUI JMeter test remotely

• JMetrix -t To load jmeter-server, put a JMX file in it.bat: To start JMeter in mirror mode:

• Exit JMeter Mirror Server to use it in non-GUI mode. Gracefully end a non-GUI instance in a client stop test: Exit the client to abruptly end a non-GUI instance

3. Non-GUI mode of JMeter server:

For this, server mode is used for distributed testing. These tests use a client-server model. In this paradigm, start the servers on each server host by running jmeter-server[.bat] and manage them in GUI mode.

Additionally, you can specify optional proxy/firewall information using the script:

-H [hostname or IP address of proxy server]

[Proxy server port]

Example: JMeter-server -H proxy.server -P 8080

You must provide JMeter with the hostname and port number of the firewall or proxy server when testing through it.

-H [hostname or IP address of proxy server]

[Proxy server port]

Non-proxy hosts: -N

If applicable, -u [proxy authentication username]

-a [proxy authentication password if needed]

Example: JMeter -H proxy. server -P 8080 -u my name -a my password -N localhost

Navigate to the JMeter bin directory and enter the following command to run the test in server mode without a GUI:

jmeter -n -t script path > -l log file path > for Windows. -R

./jmeter.sh -n -t scriptpath> for Unix. -l path to log file > -r

Furthermore, the test can be performed by choosing certain slave machines.

jmeter -n -t script path > -l log file path > for Windows. -R servers 1, 2 and 3../jmeter.sh -n -t script path> -l log file path> for

Scroll to Top