python - Enabling or Disabling Threads in jmeter from cmd using -J option -


i new jmeter , have following query.

i working on project involves me testing jmx file containing multiple threads. manually enabling or disabling simple controllers of before running. tried searching online , found following solution enabling or disabling cmd using -j option.

link here

the problem not working out me. using following command in cmd

jmeter.bat -n -t c:\pathtojmx\testfile.jmx -l c:\pathtooutput\jmeter_output.xml -jcondition1=true -jcondition=true

the tree structure of jmx file follows:

thread 1: (condition 1)

thread 2 (child of thread 1) ( condition 2).

the output running command

<?xml version="1.0" encoding="utf-8"?> <testresults version="1.2">  </testresults> 

i running jmeter eclipse using subprocess option. earlier when tried without -j options, able output test file specified.

any appreciated.

update :

i have 1 thread group in jmx file multiple simple controllers. since new jmeter did not know this. had added , if controller in each of simple controllers condition specified. possible disable simple controllers or o have create new test.jmx file multiple thread groups.

it isn't clear call "thread".

if "thread" stands thread group - can set number of threads 0 via -j command-line argument thread groups don't intend run.

if "thread" sampler - need put sampler as child of if controller. in case put following expression "condition" input:

"${__p(condition,)}"=="true" 

Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -