I have read through the similar posts with the same question as mine, but there wasn't enough detail for me to figure it out. So I was wondering if someone could correct what I'm doing wrong. And as the question states I want to run a single Thread Group from a Test plan using the CLI.
So my Test Plan contains 4 Thread Groups. Each Thread Group is the exact same except the Cookie Manager in each Thread Group contains a different value for a specific Cookie. So when I run from the command line I want to tell JMeter to only Execute Thread Group 1 or 2 or 3 etc... What I read so far is that you can use a While Controller and a Variable to accomplish this, but I can't seem to get it to work.
My Test Plan Looks like this:
+ Test Plan - Logging-In + Thread Group - Server 1 Login - While Controller (*with variable "server1ThreadActive") - HTTP Request Defaults - Cookie Manager + HTTP Request - Load Homepage + HTTP Request - Load Login Page + HTTP Request - Login Form + HTTP Request - Do something + HTTP Request - Do something else + HTTP Request - Logout + Thread Group - Server 2 Login - While Controller (*with variable "server2ThreadActive") - HTTP Request Defaults - Cookie Manager + HTTP Request - Load Homepage + HTTP Request - Load Login Page + HTTP Request - Login Form + HTTP Request - Do something + HTTP Request - Do something else + HTTP Request - Logout
So the Test Plan above has 2 more of the exact same Thread Groups for Server 3 and 4 as you could imagine... Do I have the While loops configured in the correct locations?
--FIRST TRY--
While Controllers: 1st I had the conditions set to this below for each respective Thread:
Condition (function or variable) = "${__P(server1ThreadActive)}" == "false"
Command Line: Then to try and execute only Thread for Server 2 I would use this on the CLI:
jmeter -n -t Server_Login.jmx -Jserver1ThreadActive=true
RESULT: This resulted in all 4 Threads executing when I only was trying to run Server 2 Thread.
--SECOND TRY--
While Controllers: 2nd I had the conditions set to this below for each respective Thread:
Condition (function or variable) = ${__P(server1ThreadActive)}
Command Line: Then to try and execute only Thread for Server 2 I would use this on the CLI, assuming that without a value assignment in while controller it defaults to true, so I set all vars to false except the one I want to run:
jmeter -n -t Server_Login.jmx -Jserver1ThreadActive=false -Jserver3ThreadActive=false -Jserver4ThreadActive=false
RESULT: This resulted in all 4 Threads executing when I only was trying to run Server 2 Thread.
There was a few other things that I tried as well but I am assuming they were wrong too since I had the same result. I had also tried adding a User Defined Variables section and creating 4 vars, but couldn't figure that out either... I even tried creating a file called "Server_Login.properties" and inserted those variable names, one on each line with the value set to false for each one, and included it on the command-line with the -S option, but no such luck...
Could anyone tell me where I am going wrong with this? Any thoughts or suggestions would be greatly appreciated!
Thanks in Advance,
Matt