{"id":11156,"date":"2024-07-26T19:24:25","date_gmt":"2024-07-26T23:24:25","guid":{"rendered":"https:\/\/www.redline13.com\/blog\/?p=11156"},"modified":"2024-07-26T19:26:38","modified_gmt":"2024-07-26T23:26:38","slug":"running-jmeter-from-the-local-command-line","status":"publish","type":"post","link":"https:\/\/www.redline13.com\/blog\/2024\/07\/running-jmeter-from-the-local-command-line\/","title":{"rendered":"Running JMeter from the Local Command Line"},"content":{"rendered":"\n<p><\/p>\n\n\n<p><strong><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-11157\" src=\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2024\/07\/word-image-11156-1.png\" alt=\"Running JMeter from the Local Command Line\" width=\"400\" height=\"300\" srcset=\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2024\/07\/word-image-11156-1.png 400w, https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2024\/07\/word-image-11156-1-300x225.png 300w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/strong><\/p>\n<p><a href=\"https:\/\/jmeter.apache.org\/usermanual\/index.html\" target=\"_blank\" rel=\"noopener\">JMeter<\/a> 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 <a href=\"https:\/\/jmeter.apache.org\/usermanual\/get-started.html#non_gui\" target=\"_blank\" rel=\"noopener\">non-GUI mode<\/a> from a command line. This is in fact how load tests are run with <a href=\"https:\/\/www.redline13.com\/Service\" target=\"_blank\" rel=\"noopener\">RedLine13<\/a>. 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.<\/p>\n<h3><a id=\"post-11156-_d8583pwjc798\"><\/a>Invoking a JMeter Test from the Command Line<\/h3>\n<p>The obvious prerequisite before invoking JMeter from the command line is that we need a <code>JMX<\/code> 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:<\/p>\n<pre><strong>jmeter -n -t \/path\/test_plan.jmx -l \/path\/test_plan.jtl<\/strong><\/pre>\n<p>There are three required parameters that must be passed:<\/p>\n<ul>\n<li><strong><code>-n<\/code><\/strong>\u00a0\u2013 This is a flag parameter that instructs JMeter not to load the user interface and start in non-GUI mode.<\/li>\n<li><code><strong>-t<\/strong><\/code>\u00a0\u2013 The location of the <code>JMX<\/code> file is specified along with the path to this location.<\/li>\n<li><code><strong>-l<\/strong><\/code>\u00a0\u2013 We must also specify the desired name and location of the <code>JTL<\/code> results file.<\/li>\n<\/ul>\n<figure id=\"attachment_11158\" class=\"wp-caption aligncenter\" style=\"max-width: 669px\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-11158\" src=\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2024\/07\/word-image-11156-2.png\" alt=\"JMeter tests can be run entirely from the command line\" width=\"669\" height=\"242\" srcset=\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2024\/07\/word-image-11156-2.png 669w, https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2024\/07\/word-image-11156-2-300x109.png 300w, https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2024\/07\/word-image-11156-2-425x154.png 425w\" sizes=\"auto, (max-width: 669px) 100vw, 669px\" \/><figcaption class=\"wp-caption-text\">JMeter tests can be run entirely from the command line.<\/figcaption><\/figure>\n<p>Results from the test will be saved to the location of the <code>JTL<\/code> 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 <code><strong>-t<\/strong><\/code> and <code><strong>-l<\/strong><\/code>\u00a0parameters.<\/p>\n<h3><a id=\"post-11156-_ujm469st6wa0\"><\/a>Use Cases for Running JMeter from the Command Line<\/h3>\n<p>As an intermediate step when creating tests, running a JMeter test from the local command line can be useful in a few situations.\u00a0 Some examples include:<\/p>\n<ul>\n<li>Real time feedback on errors and warnings.<\/li>\n<li>Rapid prototyping of complex tests.<\/li>\n<li>Debugging tests with external dependencies.<\/li>\n<li>Compare execution between different versions of JMeter.<\/li>\n<\/ul>\n<p>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.\u00a0 Errors and warnings may be addressable in real time as your test executes.<\/p>\n<hr \/>\n<p>Did you know that RedLine13 offers a full-featured, time-limited free trial?\u00a0 <a href=\"https:\/\/www.redline13.com\/Service\">Sign up<\/a> now, and start testing today!<\/p>","protected":false},"excerpt":{"rendered":"<p>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<a class=\"more-link\" href=\"https:\/\/www.redline13.com\/blog\/2024\/07\/running-jmeter-from-the-local-command-line\/\">Read More &rarr;<\/a><\/p>\n","protected":false},"author":11,"featured_media":11157,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[75,128,135,283,318,424,426],"class_list":{"0":"entry","1":"post","2":"publish","3":"author-dkoziel","4":"post-11156","6":"format-standard","7":"has-post-thumbnail","8":"category-blog","9":"post_tag-apache-jmeter","10":"post_tag-cloud-load-testing","11":"post_tag-command-line","12":"post_tag-jmeter","13":"post_tag-load-testing","14":"post_tag-redline13","15":"post_tag-redline13-customer"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.12 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Running JMeter from the Local Command Line - RedLine13<\/title>\n<meta name=\"description\" content=\"In this article, we will show you how to run JMeter in non-GUI mode from the command line on your local machine.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.redline13.com\/blog\/2024\/07\/running-jmeter-from-the-local-command-line\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Running JMeter from the Local Command Line - RedLine13\" \/>\n<meta property=\"og:description\" content=\"In this article, we will show you how to run JMeter in non-GUI mode from the command line on your local machine.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.redline13.com\/blog\/2024\/07\/running-jmeter-from-the-local-command-line\/\" \/>\n<meta property=\"og:site_name\" content=\"RedLine13\" \/>\n<meta property=\"article:published_time\" content=\"2024-07-26T23:24:25+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-07-26T23:26:38+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2024\/07\/word-image-11156-1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"400\" \/>\n\t<meta property=\"og:image:height\" content=\"300\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"David Koziel\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"David Koziel\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.redline13.com\/blog\/2024\/07\/running-jmeter-from-the-local-command-line\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.redline13.com\/blog\/2024\/07\/running-jmeter-from-the-local-command-line\/\"},\"author\":{\"name\":\"David Koziel\",\"@id\":\"https:\/\/www.redline13.com\/blog\/#\/schema\/person\/51d282221e3230ab35f964f98ada9b20\"},\"headline\":\"Running JMeter from the Local Command Line\",\"datePublished\":\"2024-07-26T23:24:25+00:00\",\"dateModified\":\"2024-07-26T23:26:38+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.redline13.com\/blog\/2024\/07\/running-jmeter-from-the-local-command-line\/\"},\"wordCount\":395,\"publisher\":{\"@id\":\"https:\/\/www.redline13.com\/blog\/#organization\"},\"keywords\":[\"apache jmeter\",\"Cloud Load Testing\",\"command line\",\"JMeter\",\"Load Testing\",\"RedLine13\",\"redline13 customer\"],\"articleSection\":[\"Blog\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.redline13.com\/blog\/2024\/07\/running-jmeter-from-the-local-command-line\/\",\"url\":\"https:\/\/www.redline13.com\/blog\/2024\/07\/running-jmeter-from-the-local-command-line\/\",\"name\":\"Running JMeter from the Local Command Line - RedLine13\",\"isPartOf\":{\"@id\":\"https:\/\/www.redline13.com\/blog\/#website\"},\"datePublished\":\"2024-07-26T23:24:25+00:00\",\"dateModified\":\"2024-07-26T23:26:38+00:00\",\"description\":\"In this article, we will show you how to run JMeter in non-GUI mode from the command line on your local machine.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.redline13.com\/blog\/2024\/07\/running-jmeter-from-the-local-command-line\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.redline13.com\/blog\/2024\/07\/running-jmeter-from-the-local-command-line\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.redline13.com\/blog\/2024\/07\/running-jmeter-from-the-local-command-line\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.redline13.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Running JMeter from the Local Command Line\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.redline13.com\/blog\/#website\",\"url\":\"https:\/\/www.redline13.com\/blog\/\",\"name\":\"RedLine13\",\"description\":\"(Almost) Free Load Testing in the Cloud\",\"publisher\":{\"@id\":\"https:\/\/www.redline13.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.redline13.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.redline13.com\/blog\/#organization\",\"name\":\"RedLine13\",\"url\":\"https:\/\/www.redline13.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.redline13.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2013\/06\/cropped-rl13-header-logo.jpg\",\"contentUrl\":\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2013\/06\/cropped-rl13-header-logo.jpg\",\"width\":300,\"height\":68,\"caption\":\"RedLine13\"},\"image\":{\"@id\":\"https:\/\/www.redline13.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.redline13.com\/blog\/#\/schema\/person\/51d282221e3230ab35f964f98ada9b20\",\"name\":\"David Koziel\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.redline13.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/2babf644e0993fc86893c24d7525f1e3be114a8746c01249797f25587ae1697a?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/2babf644e0993fc86893c24d7525f1e3be114a8746c01249797f25587ae1697a?s=96&d=mm&r=g\",\"caption\":\"David Koziel\"},\"url\":\"https:\/\/www.redline13.com\/blog\/author\/dkoziel\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Running JMeter from the Local Command Line - RedLine13","description":"In this article, we will show you how to run JMeter in non-GUI mode from the command line on your local machine.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.redline13.com\/blog\/2024\/07\/running-jmeter-from-the-local-command-line\/","og_locale":"en_US","og_type":"article","og_title":"Running JMeter from the Local Command Line - RedLine13","og_description":"In this article, we will show you how to run JMeter in non-GUI mode from the command line on your local machine.","og_url":"https:\/\/www.redline13.com\/blog\/2024\/07\/running-jmeter-from-the-local-command-line\/","og_site_name":"RedLine13","article_published_time":"2024-07-26T23:24:25+00:00","article_modified_time":"2024-07-26T23:26:38+00:00","og_image":[{"width":400,"height":300,"url":"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2024\/07\/word-image-11156-1.png","type":"image\/png"}],"author":"David Koziel","twitter_card":"summary_large_image","twitter_misc":{"Written by":"David Koziel","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.redline13.com\/blog\/2024\/07\/running-jmeter-from-the-local-command-line\/#article","isPartOf":{"@id":"https:\/\/www.redline13.com\/blog\/2024\/07\/running-jmeter-from-the-local-command-line\/"},"author":{"name":"David Koziel","@id":"https:\/\/www.redline13.com\/blog\/#\/schema\/person\/51d282221e3230ab35f964f98ada9b20"},"headline":"Running JMeter from the Local Command Line","datePublished":"2024-07-26T23:24:25+00:00","dateModified":"2024-07-26T23:26:38+00:00","mainEntityOfPage":{"@id":"https:\/\/www.redline13.com\/blog\/2024\/07\/running-jmeter-from-the-local-command-line\/"},"wordCount":395,"publisher":{"@id":"https:\/\/www.redline13.com\/blog\/#organization"},"keywords":["apache jmeter","Cloud Load Testing","command line","JMeter","Load Testing","RedLine13","redline13 customer"],"articleSection":["Blog"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.redline13.com\/blog\/2024\/07\/running-jmeter-from-the-local-command-line\/","url":"https:\/\/www.redline13.com\/blog\/2024\/07\/running-jmeter-from-the-local-command-line\/","name":"Running JMeter from the Local Command Line - RedLine13","isPartOf":{"@id":"https:\/\/www.redline13.com\/blog\/#website"},"datePublished":"2024-07-26T23:24:25+00:00","dateModified":"2024-07-26T23:26:38+00:00","description":"In this article, we will show you how to run JMeter in non-GUI mode from the command line on your local machine.","breadcrumb":{"@id":"https:\/\/www.redline13.com\/blog\/2024\/07\/running-jmeter-from-the-local-command-line\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.redline13.com\/blog\/2024\/07\/running-jmeter-from-the-local-command-line\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.redline13.com\/blog\/2024\/07\/running-jmeter-from-the-local-command-line\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.redline13.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Running JMeter from the Local Command Line"}]},{"@type":"WebSite","@id":"https:\/\/www.redline13.com\/blog\/#website","url":"https:\/\/www.redline13.com\/blog\/","name":"RedLine13","description":"(Almost) Free Load Testing in the Cloud","publisher":{"@id":"https:\/\/www.redline13.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.redline13.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.redline13.com\/blog\/#organization","name":"RedLine13","url":"https:\/\/www.redline13.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.redline13.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2013\/06\/cropped-rl13-header-logo.jpg","contentUrl":"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2013\/06\/cropped-rl13-header-logo.jpg","width":300,"height":68,"caption":"RedLine13"},"image":{"@id":"https:\/\/www.redline13.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.redline13.com\/blog\/#\/schema\/person\/51d282221e3230ab35f964f98ada9b20","name":"David Koziel","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.redline13.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/2babf644e0993fc86893c24d7525f1e3be114a8746c01249797f25587ae1697a?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/2babf644e0993fc86893c24d7525f1e3be114a8746c01249797f25587ae1697a?s=96&d=mm&r=g","caption":"David Koziel"},"url":"https:\/\/www.redline13.com\/blog\/author\/dkoziel\/"}]}},"_links":{"self":[{"href":"https:\/\/www.redline13.com\/blog\/wp-json\/wp\/v2\/posts\/11156","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.redline13.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.redline13.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.redline13.com\/blog\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/www.redline13.com\/blog\/wp-json\/wp\/v2\/comments?post=11156"}],"version-history":[{"count":2,"href":"https:\/\/www.redline13.com\/blog\/wp-json\/wp\/v2\/posts\/11156\/revisions"}],"predecessor-version":[{"id":11161,"href":"https:\/\/www.redline13.com\/blog\/wp-json\/wp\/v2\/posts\/11156\/revisions\/11161"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.redline13.com\/blog\/wp-json\/wp\/v2\/media\/11157"}],"wp:attachment":[{"href":"https:\/\/www.redline13.com\/blog\/wp-json\/wp\/v2\/media?parent=11156"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.redline13.com\/blog\/wp-json\/wp\/v2\/categories?post=11156"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.redline13.com\/blog\/wp-json\/wp\/v2\/tags?post=11156"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}