1

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?

Ori Marko
  • 56,308
  • 23
  • 131
  • 233
Bill Software Engineer
  • 7,362
  • 23
  • 91
  • 174

1 Answers1

2

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")
  • Note you may set ramp up same as thread number property

Start with Ramp-up = number of threads and adjust up or down as needed.

Ori Marko
  • 56,308
  • 23
  • 131
  • 233