INTRODUCTION

JMeter User interface can conduct any type of performance test execution. But we can also conduct a performance test using JMeter CLI or Command Line Interface (CLI). In this article on JMeter command line execution, you can learn how to execute a performance test using command line interface and its advantages.

We wrote this article specifically for those using Windows Operating systems.

Advantages of Jmeter command line execution

resource optimization

It reduces overhead of running JMeter using user interface, since it consumes comparatively less resource usage like CPU and memory in comparison.

headless performance testing

We can do a headless performance testing by running it using command line interface. This is helpful specially while we are running a test in a server machine or any other headless environment.

performance test automation

By running performance test using CLI, it can be integrated with any kind of Continuous Integration /Continuous deployment (CI/CD) pipelines. Hence it becomes useful in using this feature while scripts are running in any CI/CD pipelines as part of automating them.

Running jmeter command line execution

Now since we know advantages of running a performance test using CLI , let us see the details on steps to run a test using Command Line Interface. We can run a test using CLI in a simple 2 steps process.

Step 1-Place JMeter script and Test Reports/results

First Step is to place JMeter script and reports in any folder and place this folder in JMeter bin directory. JMeter script file will have a JMX extension and plan to keep results or test reports preferably in an excel with csv extension.

Jmeter files in Jmeter bin directory.
Placing script and result file in Bin directory

step 2-running in command line interface(cli)

In the second step, open the command prompt and navigate to JMeter bin directory using the change directory (CD command).

Now execute below mentioned command prompt to start executing the script in command prompt

jmeter -n -t Mention the Script location -l Mention the result file location

Explanation to above mentioned command is

-n indicates non graphical user interface mode of execution

-t indicate the location of the script

-l indicates location of the results file

JMeter CLI execution using command prompt.
CLI execution using the command

Conclusion

As you can see here , jmeter execution using command line is a very easy way of doing it .Many issue related to high resource intensive operations happening during test execution can be easily managed by planning to run it using JMeter command line execution.

If you are interested to learn more about related article, then find it below.

JMeter Recording | Performance Testing|Jmeter|Tech Articles (vprad.com)

You may also like….

JMeter API Testing

JMeter API Testing

JMeter API Testing In this article on JMeter API testing, we will be discussing the details on...

read more
JMeter Recording

JMeter Recording

In this article you can find three different ways of recording an application user flow as part of...

read more

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *