I'm relatively new to Jmeter, but I have a scenario, that I've not been able to figure out where I need to perform the following:

  1. All user log in to application with a ramp-up period of 15 seconds between users.
  2. No activity continues until all users log in to application.
  3. Once all users are logged in, perform their set of business activities (will vary depending on business process, and based on iterations, not a time loop).
  4. Once all users are complete business processes, users begin to logout with ramp-down time of 15 seconds between users.

Is this possible to configure my script to execute this way and if so, how? I have tried use of Once only controllers, loop controllers, constant timers, and some various plugins (Custom Thread Groups). I've also viewed various threads and not been able to find this exact scenario, but cannot imagine this is an overly unique test case.

Any recommendations or advice is appreciated.

1 Answer 1

  1. Ramp-up period can be easily configured using "normal" Thread Group

  2. To "wait" until all the users are logged in use Synchronizing Timer

  3. Use Loop Controller to run the "business activities" as many times a you want

  4. The same to wait until all the users finish executing their "business activities"

  5. To implement ramp-down you can use JSR223 Timer and the following code:

    return (ctx.getThreadNum() + 1) * 15000

    where ctx stands for JMeterContext, see JavaDoc for all available functions and Top 8 JMeter Java Classes You Should Be Using with Groovy for more information on this and other JMeter API shorthands available for the JSR223 Test Elements.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.