Operations 11 min read

Setting Up JMeter for Windows GUI, Distributed, and CLI Load Testing

This guide explains how to install JMeter on Windows, configure GUI, distributed, and CLI modes, adjust Java and JMeter properties, run load tests, view results, and clean up, providing step‑by‑step instructions and command‑line examples for effective performance testing.

360 Quality & Efficiency
360 Quality & Efficiency
360 Quality & Efficiency
Setting Up JMeter for Windows GUI, Distributed, and CLI Load Testing

Introduction – JMeter supports several execution environments: Windows GUI, Windows distributed, Windows CLI, Linux CLI, and Docker‑based distributed testing. The series introduces the overall load‑testing workflow, monitoring setup, and in this chapter focuses on the first three Windows execution methods.

Windows GUI

Using Windows 10 (64‑bit) as an example, the steps are:

1. Configure the Java environment.

2. Download and install JMeter 5.4.3 (binary version recommended). 下载地址:http://jmeter.apache.org/download_jmeter.cgi

3. Install any required plugins.

4. Launch JMeter in GUI mode by double‑clicking jmeter.bat in the bin directory.

Remarks

JMeter advises against using GUI mode for load testing; it should only be used for test creation, debugging, or generating test plans.

GUI mode adds performance overhead and is unsuitable for tests with more than 500 concurrent users.

When running GUI mode on Windows, add listeners such as "View Results Tree", "Debug Sampler", "Summary Report", and "Aggregate Report".

Typical graph listeners include: jp@gc - Active Threads Over Time jp@gc - Transactions per Second jp@gc - Response Times Over Time

Execution – After creating a test script, click the green arrow to start the test and view results in the Result Tree.

Windows Distributed GUI

In distributed testing, a master (controller) machine manages multiple slave machines. Configuration steps include:

Edit jmeter.properties on the master: set remote_hosts=IP1:PORT1,IP2:PORT2,... , server_port=1099 , and disable SSL with server.rmi.ssl.disable=true .

Modify jmeter-server.sh to set RMI_HOST_DEF=-Djava.rmi.server.hostname=IPxxx .

If the master has multiple NICs, add a code snippet to jmeter.bat to force the correct IP: if not defined JMETER_COMPLETE_ARGS ( set rmi_host=-Djava.rmi.server.hostname=本机IP set ARGS=%JAVA9_OPTS% %DUMP% %HEAP% %VERBOSE_GC% %GC_ALGO% %DDRAW% %SYSTEM_PROPS% %JMETER_LANGUAGE% %RUN_IN_DOCKER% %rmi_host% )

On each slave, edit bin/jmeter.properties to set server_port=1099 , server.rmi.localport=1099 , and disable SSL.

Add the slave’s IP to bin/system.properties as java.rmi.server.hostname=当前机器的ip .

Increase Java heap size in jmeter.bat (e.g., set HEAP=-Xms512m -Xmx512m ) and, for 32‑bit JDK, keep Xmx below 1500 MB.

To start the test remotely, use the menu Run → Remote Start for selected slaves or Run → Remote Start All for all configured slaves.

Result Viewing and Cleanup

After execution, view results in the GUI listeners and manually stop each slave process.

Windows CLI

Run JMeter in non‑GUI mode with the -n flag. Example command:

jmeter -n -t [jmx file] -l [results file] -e -o [report folder]

Key CLI options include:

--?                print command line options and exit
-h, --help         print usage information and exit
-n, --nongui       run JMeter in non‑GUI mode
-t, --testfile     specify the JMX test script
-l, --logfile      specify the results file
-e, --reportatendofloadtests generate HTML report
-o, --reportoutputfolder specify report output folder
-r, --runremote    start remote servers defined in remote_hosts
-R, --remotestart  start specific remote servers

Sample CLI execution on Windows:

D:\handan3 > jmeter -n -t cljzyycone.jmx -l jtl/x.jtl -e -o report/ -JthreadNum=10 -JrampTime=20 -JstepTime=20 -Jduration=10

For remote execution, add -r to run all slaves or -R slave‑IP to target specific slaves, e.g.:

D:\handan3 > jmeter -n -t cljzyycone.jmx -r -l jtl/x.jtl -e -o report/ -GthreadNum=10 -GrampTime=20 -GstepTime=20 -Gduration=10
D:\handan3 > jmeter -n -t cljzyycone.jmx -R 10.19.1.219 -l jtl/x.jtl -e -o report/ -GthreadNum=10 -GrampTime=20 -GstepTime=20 -Gduration=5

Conclusion

If the required TPS is low, Windows execution is sufficient, but Windows limits TCP/IP ports and may encounter port‑exhaustion errors under high concurrency; in such cases Linux should be used, which will be covered in the next article.

CLIperformance testingJMeterload testingDistributed Testingwindows
360 Quality & Efficiency
Written by

360 Quality & Efficiency

360 Quality & Efficiency focuses on seamlessly integrating quality and efficiency in R&D, sharing 360’s internal best practices with industry peers to foster collaboration among Chinese enterprises and drive greater efficiency value.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.