Forum Discussion

rfortune's avatar
rfortune
Contributor
14 years ago

Creating a loop within a request

Hi Guys,
just wondering if you can help with the following. I'd like to get a response from one of our endpoints and use the results to control a loop within a request.

For example if the number of items returns by endpoint A was 20, then I would like to use each of those 20 values in requests to endpoint B. The number of items being returned is variable, and I'd like to exercise them all.

Is there a kind of property expansion or looping feature that we can use within requests? Perhaps using values stored in properties?

Any suggestions in this area would be most helpful.

regards,
Richard
  • Hi Richard!

    You can use an XML DataSource that uses your first Request TestStep (the TestStep that queries endpoint A) as Source Step.

    Does that help you?

    Henrik
    SmartBear Software
  • rfortune wrote:
    Thanks for the response Henrik, I will check it out.

    This topic actually gave me an idea for a blog post. Check out the soapUI blog over at smartbear.com next week if you want to know more about XML DataSource and how they can be used.

    /Henrik