Thursday, January 28, 2010

Tip #4: Using JMeter properties

Sometimes I need to modify some parameters in the Test Plan and it requires me to start JMeter, open the Test Plan file and edit these parameters there. But it's better to use JMeter properties for this task. Look at the image below.



There are JMeter properties used as values of "Number of Threads (users)" and "Loop Count" options: ${__P(users)} and ${__P(count)}. Also we must add two parameters to JMeter command line:

jmeter -t TestPlan.jmx -Jusers=10 -Jcount=50

Now you can specify necessary parameters on the fly. I recommend you to use properties for the following options: number of users, loop count, host, port, results and data filenames, etc.

4 comments:

  1. We're new to jmeter and this is an eye-opener in terms of being able to automate it; thanks for this post!

    ReplyDelete
  2. Awesome Really ! ...Saurabh

    ReplyDelete
  3. Very helpful..Thanks

    ReplyDelete
  4. Hi very help full but how can I replace the endless bucle? Thanks

    ReplyDelete