0
votes

let say i want to test the same http request for 10 users, 25 users ,50 users and 100 users separately and generate a report for each group of users. One solution is to manually create as many thread group as a number of group of users:

  • ThreadGroup for 10 users
  • ThreadGroup for 25 users
  • ...

is there any other solution to create this plan in jmeter?

1

1 Answers

1
votes
  1. Define the desired number of threads using __P() function like:

    ${__P(threads,)}
    

    enter image description here

  2. When you will be running JMeter in command-line non-GUI mode you will be able to pass the number of threads using -J command-line argument like:

    jmeter -Jthreads=10 -n -t test.jmx -l 10-threads-result.jtl
    
    jmeter -Jthreads=25 -n -t test.jmx -l 25-threads-result.jtl
    
    etc.