JMETER CLI COMMANDS · Performance Testing 101

JMeter Non-GUI Mode Command

The recommended way to run actual load tests — Non-GUI mode consumes significantly fewer resources than the graphical interface, enabling higher load generation.

Terminal
$ ./jmeter.sh -n -t <script.jmx> -l <results.csv> -e -o <report-folder>
Executable
-n / -e flags
-t / -l flags
File paths
-o flag
Output paths
🪟 On Windows, replace ./jmeter.sh with jmeter.bat
🔍

Parameter Breakdown

./jmeter.sh

JMeter Executable

The shell script that launches JMeter on Unix-based systems (Linux/macOS). It starts the JMeter engine — not the GUI.
🪟
On Windows, use jmeter.bat instead.
-n

Non-GUI Mode

🖥️
Tells JMeter to run the test without opening the GUI. This is the most critical flag — GUI mode is only for test design, never for execution.
Non-GUI Mode is Mandatory For
Real Performance Tests Jenkins Automation Distributed Testing High Load Generation
⚠️
GUI mode consumes significantly more CPU/memory — running real load tests in GUI will skew your results and limit throughput.
-t <path>

Test Plan (.jmx File)

📋
Specifies the location of your JMeter test script file (.jmx). You must provide the full path to the file.
Example
-t /Users/name/JMeter/Scripts/LoadTest.jmx
.jmx File Contains
Thread Groups Samplers HTTP Requests Listeners Logic Controllers Test Data Refs
-l <path>

Results Log File (.csv / .jtl)

📊
Defines the path to save raw test results, usually in CSV format. This file contains the detailed data for every request made during the test.
Example
-l /Users/name/JMeter/Results/Run1.csv
CSV Contains
Response Time Success/Failure Latency Bytes Sent/Received Start/End Time Response Codes
Essential For
📈 Trend Analysis
📡 Grafana/InfluxDB Correlation
🔍 Debugging Failed Samples
-e

Generate HTML Report

📈
Instructs JMeter to automatically generate a dashboard-style HTML report immediately after the test completes. JMeter analyzes the CSV file (-l) and produces graphs and statistics.
💡
Works in combination with -o flag — -e triggers report generation, -o specifies where to save it.
-o <path>

HTML Report Output Folder

📁
Specifies the directory where the HTML dashboard report will be created. Contains interactive charts, response time graphs, throughput curves, and error analysis.
Example
-o /Users/name/JMeter/Reports/Run1_Dashboard
🚨
The folder must be empty or not exist before running — otherwise the command will fail.
Full Working Example
$ ./jmeter.sh -n -t /Users/name/JMeter/Scripts/LoadTest.jmx \
    -l /Users/name/JMeter/Results/Run1.csv \
    -e -o /Users/name/JMeter/Reports/Run1_Dashboard