How to start a specific Jmeter stream from command line

I am trying to run only specific Jmeter threads at a time from the command line. I added an if controller in my test plan, and in the conditional block I wrote ${__P(threadActive)} == true

so that I could specify the "threadActive" value from the command line.
I did the same for another thread group and gave a condition ${__P(group)} == true

.

Now when I run, want to run only one thread group, I write
JMeter -n -t "TestPlanName.jmx" -JthreadActive=true" or "JMeter -n -t "TestPlanName.jmx" -Jgroup=true


to run only one thread, it starts executing both threads. Where, when I change the value of the conditions in the conditions block to false and write JMeter -n -t "TsetPlanName.jmx" -JthreadActive=false

, it executes this thread. Obviously this means the default for these variables is true, so how do you change the default for these user variables?

+3


source to share


1 answer


Try the following:

  "${__P(threadActive)}" == "true"

      



Wherein:

  • JMeter -n -t "TestPlanName.jmx" -JthreadActive = true
+3


source







All Articles