2
votes

I have a test plan something like this : enter image description here

Here if you loop at the thread group "ClassCreation", you will see it has 4 samplers where the output of one goes to the others input, so these samplers have to be run sequentially. Moreover I've to repeat this thread group 12 times as well. So, is there any way to tell Jmeter, in a thread group before going to the next iteration, pls wait for all the samplers to finish.

2
based on picture, for each user j_spring_security_check ... addSubject will run sequentially, and won't go to next iteration before they are done without any additional controlling. So I guess the question is unclear. Are you trying to synch them so that all threads are done before going to next iteration? Or what do you actually want to achieve?Kiril S.

2 Answers

3
votes

In case you have to set up something there is a special thread group for that very purpose: Setup Thread Group

enter image description here

This is handy to run something before all of the other threadgroups are started. It is mostly used to setup the environment but as I understand from your question it is sutable for you as well.

The "inverse" of this action is the TearDown Thread Group. It is ment to clean up the test data and it is running after all the other thread groups are done.

TL.DR.: In your case, you can create a Setup Thread Group doing the thing that needs to be done before an other, basic Thread Group is starting with a ramp up period.

For detailed read you can visit: the source of the image.

0
votes

If you want to wait until all threads are finish a simple solution will be adding a Synchronizing_Timer at the end of your thread group.

Set Number of Simultaneous Users to Group by by Number of threads/users.

The purpose of the SyncTimer is to block threads until X number of threads have been blocked, and then they are all released at once.