Running JMeter from command line

I trust that someday, you will understand me.

Though out there are plenty documents to run JMeter with Ant task, sometimes it’s not the best solution. For example, if the plan is to run several test scripts on several cloud server instances, it may not worth the effort to install Ant on each of those instances.

In that case, we can run JMeter script from command line, using one statement in the followings:

[jmeterBinDirectoryPath]/jmeter -n -t <testfile> 

or

[jmeterBinDirectoryPath]/java -jar ApacheJMeter.jar -n -t <testfile>

Credit goes to this blog post and this discussion in mailing list.

3 thoughts on “Running JMeter from command line

  1. neil

    i save my test cases under the ” test folder” [i.,e my path is :D :apache-jmeter-2.7bintest] , so what should i write in the command prompt to run any test case which is under test folder

    1. ledohoanglong

      Hi neil,

      Sorry for my late reply.

      According to the document, part 2.4.3 (Command Line Mode), I don’t think that jmeter support running batch of .jmx files. However, I think you still need to run the scripts one by one, so I think it would be ok if we write some bash scripts (in case you are on Linux) to perform this task.

Comments are closed.