Skip to content
  • ZipCode Api
  • Blog
  • About RedLine13
RedLine13
RedLine13
Primary Navigation Menu
Menu
  • Start Testing
  • Demo
  • Pricing
  • JMeter
  • Partners
  • Docs
    • Documentation Home
    • AWS Set Up for load testing
    • AWS Approval for Large Tests
    • PHP, NodeJS, Python Load Tests
    • Scalability
    • Jenkins Plugin Setup
    • Premium Features
    • Knowledge Base

Running JMeter from the Local Command Line

By: David Koziel

Running JMeter from the Local Command Line

JMeter can be run in two modes, with the more familiar GUI mode for designing tests. However, when running your load tests for production data gathering, it is recommended that it is run in non-GUI mode from a command line. This is in fact how load tests are run with RedLine13. But it is also possible to run JMeter in non-GUI mode on your local machine. There are instances where this is desirable, including debugging specialized or complex test architectures. In this article, we will show you how to run JMeter in non-GUI mode from the command line on your local machine.

Invoking a JMeter Test from the Command Line

The obvious prerequisite before invoking JMeter from the command line is that we need a JMX file. We can use any existing test created from the JMeter user interface. From a terminal window on your local machine, the command to start JMeter in non-GUI takes the following form:

jmeter -n -t /path/test_plan.jmx -l /path/test_plan.jtl

There are three required parameters that must be passed:

  • -n – This is a flag parameter that instructs JMeter not to load the user interface and start in non-GUI mode.
  • -t – The location of the JMX file is specified along with the path to this location.
  • -l – We must also specify the desired name and location of the JTL results file.
JMeter tests can be run entirely from the command line
JMeter tests can be run entirely from the command line.

Results from the test will be saved to the location of the JTL as specified. If your JMeter test plan is in a different location than the present working directory, you will need to specify the path to this file when passing the -t and -l parameters.

Use Cases for Running JMeter from the Command Line

As an intermediate step when creating tests, running a JMeter test from the local command line can be useful in a few situations.  Some examples include:

  • Real time feedback on errors and warnings.
  • Rapid prototyping of complex tests.
  • Debugging tests with external dependencies.
  • Compare execution between different versions of JMeter.

Test runs started from the local command line can provide verbose output for debugging purposes, without the need to find this information inside log files.  Errors and warnings may be addressable in real time as your test executes.


Did you know that RedLine13 offers a full-featured, time-limited free trial?  Sign up now, and start testing today!

2024-07-26
Previous Post: Using the JMeter “If” Controller
Next Post: Connecting an AWS VPC to the World

Recent Posts

  • JMeter XML Format Post Processor
  • Order of Elements in JMeter
  • The JMeter Synthesis Report
  • Using the JMeter Plugins Manager
  • JMeter Rotating JTL Listener

Related

  • JMeter XML Format Post Processor
  • Order of Elements in JMeter
  • The JMeter Synthesis Report
  • Using the JMeter Plugins Manager
  • JMeter Rotating JTL Listener
  • Using Test Fragments in JMeter Tests
  • Step-by-Step Guide to Testing with JMeter
  • Functional Testing vs Performance Testing
  • A Gentle Introduction to Load Testing
  • Using the JMeter Counter Element

© RedLine13, LLC | Privacy Policy | Contract
Contact Us: info@redline13.com

Designed using Responsive Brix. Powered by WordPress.