1
votes

I have 2 thread groups containing a series of http requests.

The thread groups are configured to run in parallel by: Run consecutively checkbox under Test Plan being deselected.

Please note that the Run consecutively checkbox under Test Plan is deselected.

The Thread Groups are configured like this:

Thread Group 1: Http Request 1, Http Request 2, Http Request 3

Thread Group 2: Http Request 4, Http Request 5, Http Request 6

Now, when i run the above thread groups parallelly, the requests under each thread group run in sequence even though the Thread groups run in parallel. Now, I want 'Http Request 5' to wait for 'Http Request 3' to commence when the thread groups are running in parallel. How to achieve this?

2
And what are you trying to achieve ? Might as well use only one thread for this.John
Did you try to set up 1,2 and 4 requests in setUp Thread group and then req 3 and 5 in two threads that will run in parallel? As the setUp thread goes first and then goes the rest of the threads if you set to run in parallel you should have the effect you want. Then you can add tearDown thread with req 6 if it is something that should go at the endFaflok
@Faflok, thanks a lot. This approach worked fine!katebl58
Nice. Then I'll do a proper answer from it for future reference.Faflok

2 Answers

1
votes

Your requirement looks a bit strange and maybe you should think again to be sure that you really need this.

If it appears you still do, then have a look at this:

0
votes

As I mentioned in the comment the best way to go with something like this is to prepare:

  • setUp Thread with all login requests and so on (requests no. 1, 2 and 4 in your case)
  • two threads with requests that should run in parallel (req 3 and 5)
  • tearDown Thread for logout and cleaning if necessary (req 6)

Of course Test Plan needs 'Run Thread Groups consecutively' check box deselected and 'Run tearDown Thread Groups after shutdown of main threads' selected for that type of test you need.