JMeter - Thread Group

98 Views Asked by At

Is it possible to specify programmatically the number of threads from within the Thread Group?
My scenario: I need to run two Thread Groups. Each group will read files that specify the number of threads for that group to run. The groups should run concurrently.
Thanks

1

There are 1 best solutions below

2
On BEST ANSWER

You can use properties.

For ex:

In the number of threads field, you can set like this $(__P(usercount)}

When you run the test through command line, you can pass the value as shown here

jmeter -n -t test.jmx -Jusercount=10

Now the test will run for 10 users.

You can also use $(__P(usercount,5)} That is, if the property value is passed to the test, then it will use it, otherwise, it will take the default value which is 5.