Forum Discussion

lars_andersson's avatar
lars_andersson
New Contributor
15 years ago

How does one deal with iteration in loadUI?

Hi

I'd like to create a project in loadUI that implements a scenario in which a number of virtual users are ramped up to a certain number, and then each virtual user should iterate over a number of soapUI runners in sequence. When the last runner has executed, I'd like a delay and then it should start all over with next iteration. So far, I've worked with the Ramp and VirtualUser components to create a modified component that does the first part. Next, I'd like to solve the iteration problem. Has anyone out there an idea of how to do that. I guess it neads two input terminals; one that is connected to the generator I created, and one that is connected from the last runner (or Delay) in the sequence of soapUI test cases that a virtual user is to invoke. It also needs one output terminal that would invoke the first soapUI runner. However, what I can't figure out is how to associate the input terminal that receives messages from the last runner (or Delay) with a certain virtual user and keep track of the number of iterations that has been performed.

I know there's loop functionality in soapUI, but that's not really where I wan't to put the iteration logic, because then the soapUI testcase would have to consist of all the service invocations a certain virtual user woould make during one iteration (or am I missing something?).

Any input on how to solve this problem is appreciated.

Lars

2 Replies

  • Hi Lars,

    sorry for the long delay; your questions started a bunch of internal discussions on how this should be best handled :-)

    For now the current runner components just add their response times to the incoming message before they pass it to the output, so you should be able to create a component that adds a "sessionId" property to the message before it is sent to the first runner, the same component could have a separate input that would come from the last runners output (just like you describe), in which it would see the sessionId and could add/increase a counter property "sessionCounter" before it gets dispatched to the first runner again (if desired).

    Does that make sense? If you get this working ok, please don't hesitate to submit your component to our component-competition :-)

    regards!

    /Ole
    eviware.com
  • Ole,

    That sounds like the way I imagined it, more or less. I wasn't sure if the 'sessionId' would get forwarded all the way until the last runner. It would certainly be a good solution if I had the time to do it right now. However, tests are starting on Monday next week so I can't take the chance of not having the scripts ready by then. But it could be interesting just for the sake of argument to try it out when there's time.

    / Lars