Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jmeter - simulating more complex load scenarios?

Been experimenting with Jmeter, and I'd like to know the best way to accomplish:

20 users logging onto an application, over 20 minutes, and performing some actions for another 20 minutes, before logging off over a period of 20 minutes. I.e. have 200 users logging on, and then once ALL of them are logged on, begin 20 minute timer. Once 20 minutes are up, start to log the ones who logged on earliest off.

I realise this MAY or MAY NOT BE a realistic testing scenario, but i'd like to see if it's possible.

At the moment I have a test plan whereby a user logs on, performs some actions, and then logs off. I can't see how I can ramp up and ramp down.

like image 603
Dominic Bou-Samra Avatar asked Mar 17 '11 03:03

Dominic Bou-Samra


2 Answers

There's an option in Test Plan "Run thread groups consecutively". Set it to checked.

Then add 3 thread groups to your test plan. I'd suggest using Thread Group for first (20 threads, loop count 1, ramp up time 1), Ultimate Thread Group (20 threads starting immediately and holding load for 20min) for second and Thread Group again for third (20 threads, loop count 1, ramp up time 1).

Place appropriate samplers inside each TG - first just logs in, second does actions, third logs off.

That's it. If you have any troubles - let me know.

like image 132
Andrey Pokhilko Avatar answered Oct 04 '22 07:10

Andrey Pokhilko


You'll need several thread groups in JMeter starting off and running at different intervals, in that way you could ensure that the users who start first will end first.

Also see a related question on this.

like image 36
JoseK Avatar answered Oct 04 '22 05:10

JoseK