I have a JMeter test plan which performs a simple action once.
The problem I am having is that my test setup needs to know how many threads the thread group will have. To make things clearer, here is a simple representation of the test plan:
setUp Thread Group
needs to know the number of threads in the below thread group
Thread Group
The number of threads for this thread group is determined via the "Number of Threads (users)" Thread Property.
I can dynamically get the number of threads from within the thread group, but I can't find any way of getting this number from within the setup thread group instead.
Any ideas?
Ideally I was hoping to find something like ${__groovy(ctx.getTestPlan().getThreadGroupByIndex(1).getNumThreads())}
, but I can't find anything of the sort.
To be clear, I'm looking for the number of threads as assigned directly in JMeter in the Thread Group properties. This question has absolutely nothing to do with BlazeMeter and is therefore not a duplicate of Get number of threads (defined via BlazeMeter) in a thread group from the setup thread group (jmeter)