3

Have an issue with my testplan. I'm trying to check several groups of link.

  • Positive Loop - Anonymous is allowed to visit URLs.
  • Negative Loop - URLs forbidden for Anonymous.

enter image description here

Each loop works when other are collapsed.

But if all Loops are enabled than only the first Loop is performed. Where is my mistake?

Have another way - add LoopCount manually instead of using "Forever" + "Stop Thread on EOF=True". This is not nice a solution as for me. enter image description here

  • Have made workaround. It is ugly, but it is working. Just added Loop Count into the each loop equal to strings count. Help me to correct, please. –  Jul 03 '12 at 11:05
  • by first you mean `positive` ? because you loop forever. can you re-structure your question more clearly in short lines I want this this and that. Instead of putting it all together in one sentence. – ant Jul 03 '12 at 11:05

1 Answers1

1

Uncheck the forever in your loop count for starters. If your first loop loops forever and test it executed sequentially within a thread group then the second won't kick off until the first is done.

EDIT:

One way to go about this is :

  • Create 2 thread groups (1 for positive and 1 for negative)

So you would have some kind of input file where your links would be stored(each line containing one link) which you want to visit both as authorized(logged in) or unauthorized(not logged in).

I'd do this if I were you :

  1. Create one thread group and login inside

  2. Create second thread group. In the second thread group (positive), when user is logged create CSV Data Set Config. Important points Recycle on EOF -> True and Stop thread on EOF -> False. Set the loopcount to Forever as you did in your loopcontroller in the screenshot and it will quit after it completes all the wesites. These should return 200 OK status code.

  3. Logout in the third thread group

  4. Create another thread group (negative), use the same file (which containts ulrs to visit). And create another CSV Data Set Config under this thread group as well. And do the rest as you did in step two. These should return response code 401 unauthorized or 403 Forbidden, depending on your service implementation.

There is always more than one solution to a problem. This is just one of those, pick one which you like the most.

ant
  • 22,634
  • 36
  • 132
  • 182