eBook > The JMeter Playbook: Build, Scale, and Optimize Performance Tests
Result Listeners & JTL Files
Running Tests in CLI Mode
The recommended way of executing a load test is using JMeter command-line non-GUI mode:
jmeter -n -t test-plan.jmx -l results/test-result.jtl
| Flag | Meaning |
|---|---|
-n | Non-GUI (CLI) mode |
-t | Path to the test plan (.jmx) |
-l | Path to write results (.jtl) |
-f | Delete/overwrite existing results file |
-e | Generate HTML report at the end of the test |
-o | Output folder for the HTML report |
Example: Full Command with Report Generation
jmeter -n \
-t my-test-plan.jmx \
-f \
-l test-result.jtl \
-e -o results/dashboard/
The command kicks off the test, writes results into .jtl file, and generates HTML Reporting Dashboard under results/dashboard/ folder.
Passing Parameters
Override JMeter properties from the command line:
jmeter -n -t test.jmx -l results.jtl \
-Jhost=api.staging.example.com \
-Jthreads=200 \
-Jduration=600
Back to top
Understanding the .jtl Test Results File
The .jtl (JMeter Test Log) is a CSV (by default) or XML file that captures Sample Results and writes them each on the separate row:
timeStamp,elapsed,label,responseCode,responseMessage,threadName,dataType,success,failureMessage,bytes,sentBytes,grpThreads,allThreads,URL,Latency,IdleTime,Connect
1712234567890,245,GET /posts/1,200,OK,Thread Group 1-1,text,true,,1234,456,10,10,https://demoblaze.com/1,120,0,45
Key Columns
| Column | Description |
|---|---|
timeStamp | Start date and time of the request in form of Unix timestamp |
elapsed | Total response time in milliseconds |
label | Sampler name |
responseCode | HTTP status code |
success | true if all assertions passed and/or response code is below 400 |
bytes | Response body size |
Latency | Time to first byte (TTFB) |
Connect | TCP connection time |
Analyzing .jtl Files in the GUI
You can load a .jtl file into any listener after the test:
- Open JMeter GUI.
- Add a listener (e.g., Aggregate Report).
- Click the Browse button in the Filename field and select your
.jtlfile.
The listener will populate with the calculated data.
Back to topAnalyzing .jtl Files with JMeter Plugins Command-Line Tool
For quick analysis without opening the GUI:
Using JMeterPluginsCMD Command Line Tool (via JMeter Plugins)
If you installed the Plugins Manager, the JMeterPluginsCMD tool can generate reports from .jtl files in CSV and/or PNG formats:
./JMeterPluginsCMD.sh --generate-csv AggregateReport.csv --input-jtl test-result.jtl --plugin-type AggregateReport
This command will produce CSV version of what is shown in the Aggregate Report listener. It can be used for quick analysis and different test runs comparison.
Back to topConfiguring What Gets Saved
You can control which fields are written to the .jtl file via user.properties:
# Save response headers and body (useful for debugging, large file size)
jmeter.save.saveservice.response_data=false
jmeter.save.saveservice.response_headers=false
jmeter.save.saveservice.request_headers=true
jmeter.save.saveservice.samplerData=false
# Save assertion results
jmeter.save.saveservice.assertions=true
jmeter.save.saveservice.assertion_results_failure_message=true
# CSV format (default and recommended)
jmeter.save.saveservice.output_format=csv
Full description of parameters is available in Results file configuration chapter of JMeter User Manual.
Tip: For production load tests, keep the defaults (CSV, no response data). Only enable response body saving for debugging runs with few threads, or use a dedicated Listener for this.
Summary
- Always run load tests in CLI mode (
jmeter -n -t ... -l ...). - The
.jtlfile is a CSV log of every sample - the primary artifact of any test run. - Load
.jtlfiles into GUI listeners for post-test analysis. - Configure
user.propertiesto control what data is saved by default. Don’t save data you won’t need; it will save resources and disk space.
Finally, let’s see how to generate HTML reports for your performance tests.