---
title: Using Commandline Parameters in JMeter
description: Loadium blog
image: https://cdn-images-1.medium.com/max/2560/1*I2JuevH7E-vU2770oXAy0w.jpeg
---

[Skip to content](https://explore.loadium.com/loadium-blog/best-practices-for-api-security-testing-1-0-0-0-0-0-0-0-0-0-1-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-1756-e219b2b6#main-content)

 Sep 8, 2025 10:10:13 AM

# Using Commandline Parameters in JMeter

![Picture of Erdem KIRMIZI](https://explore.loadium.com/hs-fs/hubfs/bio.jpg?width=50&name=bio.jpg) [Erdem KIRMIZI](https://explore.loadium.com/loadium-blog/authors/erdem-kirmizi)

Share: [facebook-f icon](http://www.facebook.com/share.php?u=https://explore.loadium.com/loadium-blog/best-practices-for-api-security-testing-1-0-0-0-0-0-0-0-0-0-1-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-1756-e219b2b6) [linkedin-in icon](http://www.linkedin.com/shareArticle?mini=true&url=https://explore.loadium.com/loadium-blog/best-practices-for-api-security-testing-1-0-0-0-0-0-0-0-0-0-1-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-1756-e219b2b6) [Twitter icon](https://twitter.com/intent/tweet?url=https://explore.loadium.com/loadium-blog/best-practices-for-api-security-testing-1-0-0-0-0-0-0-0-0-0-1-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-1756-e219b2b6) [pinterest-p icon](http://pinterest.com/pin/create/link/?url=https://explore.loadium.com/loadium-blog/best-practices-for-api-security-testing-1-0-0-0-0-0-0-0-0-0-1-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-1756-e219b2b6) [envelope icon](mailto:?body=https://explore.loadium.com/loadium-blog/best-practices-for-api-security-testing-1-0-0-0-0-0-0-0-0-0-1-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-1756-e219b2b6)

![](https://cdn-images-1.medium.com/max/2560/1*I2JuevH7E-vU2770oXAy0w.jpeg)

### Using Commandline Parameters in JMeter

It is a common practice to create performance test scripts by using JMeter GUI. For test execution however, it would be best to use command line mode of JMeter. So whenever you need to change a parameter like thread number, base url, etc.. you need to go to GUI mode, do some modifications and run your test. We can’t call that a good practice. JMeter lets you pass parameters in command line mode.

### How to Pass Argument via Command Line

Basic command line parameter is

**JMeter -n -t your\_script.jmx**

- -n — tells JMeter to run in non-GUI mode
- -t — specifies the path to source .jmx script to run

In case you want to send parameters via command line, add the parameters below:

**JMeter -n -t your\_script.jmx *-Jurl=www.abcdef.com -Jusername=canberk***

Then you need to change your JMeter file. You can receive these parameters by built-in function of JMeter. This function is ${\_\_P(VariableName)}

![](https://cdn-images-1.medium.com/max/800/0*jJWnIc79ydO1wOc_.png)

By this way, your test scripts are going to be dynamic in terms of parametrization.

### How to Pass Argument via Loadium

When you want to run your tests in Loadium, you can use Advanced Settings tab in Create JMeter Test. Then you can add the necessary parameters. As a result, you don’t need to re-upload your scripts everytime you change something in jmx file.

![](https://cdn-images-1.medium.com/max/800/0*EjD2P6dCSCD0op2Z.png)

You can reach the original artical and more in [https://loadium.com/blog/using-commandline-parameters-in-JMeter/](https://loadium.com/blog/using-commandline-parameters-in-jmeter/)

Happy load testing…

## Related posts

[![](https://cdn-images-1.medium.com/max/800/0*uZxhOS7GRUN3byrF.jpeg)](https://explore.loadium.com/loadium-blog/load-tests-and-end-to-end-back-end-analysis)

[Loadium Product](https://explore.loadium.com/loadium-blog/tag/loadium-product), [Load Testing](https://explore.loadium.com/loadium-blog/tag/load-testing)

## [Load Tests and End-to-End Back-end Analysis](https://explore.loadium.com/loadium-blog/load-tests-and-end-to-end-back-end-analysis)

![Picture of Erdem KIRMIZI](https://explore.loadium.com/hs-fs/hubfs/bio.jpg?width=50&name=bio.jpg) [Erdem KIRMIZI](https://explore.loadium.com/loadium-blog/authors/erdem-kirmizi) 

 Sep 8, 2025 10:35:15 AM

Even though load testing and performance testing have different meanings in the software world, the...

[Read more](https://explore.loadium.com/loadium-blog/load-tests-and-end-to-end-back-end-analysis)

[![](https://cdn-images-1.medium.com/max/800/1*Qq9qf6x_6_zwM96KMmcByQ.png)](https://explore.loadium.com/loadium-blog/openapi-vs.-swagger-whats-the-difference)

[API Testing](https://explore.loadium.com/loadium-blog/tag/api-testing), [Tools](https://explore.loadium.com/loadium-blog/tag/tools)

## [OpenAPI vs. Swagger: What’s the Difference?](https://explore.loadium.com/loadium-blog/openapi-vs.-swagger-whats-the-difference)

![Picture of Erdem KIRMIZI](https://explore.loadium.com/hs-fs/hubfs/bio.jpg?width=50&name=bio.jpg) [Erdem KIRMIZI](https://explore.loadium.com/loadium-blog/authors/erdem-kirmizi) 

 Sep 8, 2025 10:16:08 AM

OpenAPI vs. Swagger: What’s the Difference? What Is OpenAPI? The OpenAPI Specification (OAS) is a...

[Read more](https://explore.loadium.com/loadium-blog/openapi-vs.-swagger-whats-the-difference)

[![](https://cdn-images-1.medium.com/max/800/1*QJDmW8UJBXQyGNUyQtLjfA.png)](https://explore.loadium.com/loadium-blog/how-to-add-a-variable-number-of-parameters-in-apache-jmeter)

[JMeter](https://explore.loadium.com/loadium-blog/tag/jmeter), [Best Practices](https://explore.loadium.com/loadium-blog/tag/best-practices), [Examples](https://explore.loadium.com/loadium-blog/tag/examples)

## [How to Add a Variable Number of Parameters in Apache JMeter](https://explore.loadium.com/loadium-blog/how-to-add-a-variable-number-of-parameters-in-apache-jmeter)

![Picture of Erdem KIRMIZI](https://explore.loadium.com/hs-fs/hubfs/bio.jpg?width=50&name=bio.jpg) [Erdem KIRMIZI](https://explore.loadium.com/loadium-blog/authors/erdem-kirmizi) 

 Sep 8, 2025 10:56:40 AM

Some requests have more than one parameter, and the number of parameters may change. You can also...

[Read more](https://explore.loadium.com/loadium-blog/how-to-add-a-variable-number-of-parameters-in-apache-jmeter)

---

```json
{
  "@context" : "https://schema.org",
  "@type" : "BlogPosting",
  "author" : {
    "@type" : "Person",
    "name" : "Erdem KIRMIZI",
    "url" : "https://explore.loadium.com/loadium-blog/author/erdem-kirmizi"
  },
  "dateModified" : "2025-09-08T07:10:13.380Z",
  "datePublished" : "2025-09-08T07:10:13.000Z",
  "headline" : "Using Commandline Parameters in JMeter",
  "image" : [ "https://cdn-images-1.medium.com/max/2560/1*I2JuevH7E-vU2770oXAy0w.jpeg" ],
  "mainEntityOfPage" : {
    "@id" : "https://explore.loadium.com/loadium-blog/best-practices-for-api-security-testing-1-0-0-0-0-0-0-0-0-0-1-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-1756-e219b2b6",
    "@type" : "WebPage"
  },
  "publisher" : {
    "@type" : "Organization",
    "logo" : {
      "@type" : "ImageObject",
      "url" : "https://explore.loadium.com/hubfs/Logo-1.png"
    },
    "name" : "Loadium"
  }
}
```