Forum Discussion

TomaszSkalski's avatar
TomaszSkalski
Occasional Contributor
6 years ago

Loop trough multiple Soap and Rest requests

Hi guys,

 

I'm new to Soap UI and testing with it. I work for a company who is using soap and rest requests for sending messages between few applications. At the moment are queue system is being fixed and it is my job to test it under heavy load etc.

 

The problem I have at the moment is that I only know how to run these request in sequence or parallel, but I would like to have a flow in which these messages will be sent.

I send the messages from 5 different API's and have about 20 different XML SOAP/REST requests.

I've already prepared all the data source with exel files and all works fine.

 

The flow I mean could be as follow:

System 1 send an message to create an person to 3 different applications. One of these application then sends back an ID of this person to the rest of the applications etc.

 

Is there a way to do this in SOAP UI pro. My self I was thinking of doing this in For loops, but I'm not sure if this is the right way to dot it.

 

I've added a screenshot of how the setup look right now of the projects.

  • Lucian's avatar
    Lucian
    6 years ago

    Well that is tehnically possible using a groovy script but I guess maybe you could do it a little bit differently by restructuring your tests.

     

    What do you mean by 'first message'? Are you using a datasource to loop through your steps? If so, can't you merge the two test cases to have something like:

     

    - loop

    -- send message 1 (old test case 1)

    -- extract whatever data you need

    -- send message 2 (old test case 2)

    - endloop

  • Lucian's avatar
    Lucian
    Community Hero

    Hi TomaszSkalski ,

     

    I don't understand what the problem really is. What is it that you don't know how to solve?

    • TomaszSkalski's avatar
      TomaszSkalski
      Occasional Contributor

      The exact problem is that I can run each test case separately. What it does now it first sends for example 1000 messages from the first test case then 1000 of the second and so on.

      What I would like to have is that it send first message of the first test case then the first message of the second and so on.

       

      Is it more clear like this?

      • Lucian's avatar
        Lucian
        Community Hero

        Well that is tehnically possible using a groovy script but I guess maybe you could do it a little bit differently by restructuring your tests.

         

        What do you mean by 'first message'? Are you using a datasource to loop through your steps? If so, can't you merge the two test cases to have something like:

         

        - loop

        -- send message 1 (old test case 1)

        -- extract whatever data you need

        -- send message 2 (old test case 2)

        - endloop