fakhrul
fakhrul

Reputation: 25

How can execute specific Thread Group in Jmeter with command?

I want to run any specific Thread Group with Command in windows. I have tried with using properties file but got failed. Now need help for executing any specific thread group selecting from command prompt.

Upvotes: 0

Views: 2590

Answers (2)

Dmitri T
Dmitri T

Reputation: 168147

You can easily achieve this using Taurus tool. It is a wrapper around JMeter (and several other performance testing tools) which provides an easy way of configure (or create) and run a JMeter test using simple YAML syntax.

For instance if you need to disable Thread Group B the relevant configuration would be something like:

---
execution:
  scenario:
    script: test.jmx
    modifications:
      disable:  # Names of the tree elements to disable
      - Thread Group B
      enable:  # Names of the tree elements to enable
      - Thread Group A

References:

Upvotes: 1

Ori Marko
Ori Marko

Reputation: 58862

If Thread group's Number of Threads is set to 0 it won't execute.

Based on that, you can set for each thread group Number of Threads with __property with default 0 per group number, e.g. for Thread group 1:

${__property(group1,,0)}

so if you execute in command prompt jmeter -Jgroup3=1 ... - if you want only thread group 3 be executed with 1 thread/user (other groups will have 0 users and won't get executed)

Upvotes: 0

Related Questions