getsuga
getsuga

Reputation: 117

Run sequential requests with simultaneous users using jmeter

I am testing the CRUD operation and my test plan looks like below :

  Test Plan 
  |_Login 
  |_Create 
  |_Read 
  |_Update 
  |_Delete 

Now I have 100 users. I want all the 100 users to finish login, then go to Create operation ,all 100 users finish create operation, then go to Read operation ...

I used the loop controller to execute the same request 100 times with only one user.But this doesn't cover the scenario of 100 simultaneous users logging in(hitting a url).Is there any way in jmeter to perform the above explained procedure?

Upvotes: 0

Views: 2942

Answers (2)

Dmitri T
Dmitri T

Reputation: 168002

  1. Add a Test Action sampler after each of the requests
  2. Add a Synchronizing Timer as a child of each Test Action sampler and set Number of Simulated Users to Group by to the number of threads in your Thread Group

JMeter Synchronizing Timer

Test Action samplers will act as a rendezvous points for all threads and they will not be displayed in the test results.

Upvotes: 1

Ori Marko
Ori Marko

Reputation: 58774

You can achieve it with 3 Thread Groups

  • Check in Test Plan checkbox Run Thread Groups Consecutively

  • Login Thread Group with Number of Threads 100 - Add Synchronizing Timer with Number 100 and Timeout 0

  • Create Thread Group with Number of Threads 100 - Add Synchronizing Timer with Number 100 and Timeout 0

  • Read Thread Group with Number of Threads 100 - Add Synchronizing Timer with Number 100 and Timeout 0

Each Thread Group can read users from CSV/file.

Upvotes: 0

Related Questions