Reputation: 7782
I have wrote a JMeter test and I want to run it in Command Line with some parameters, let's say ThreadNumber.
How do I read it in JSR223/BeanShell?
Upvotes: 1
Views: 1095
Reputation: 58772
Send property in command line using -J
which adds new property
-JthreadNum=100
Inside Thread Group use the value using __P
function in Number of Users(threads) field
${__P(threadNum)}
simplified property function which is intended for use with properties defined on the command line.
Use props
to get properry in JSR223/BeanShell
props.get("threadNum")
Start with Ramp-up = number of threads and adjust up or down as needed.
Upvotes: 2