Forum Discussion

Baharul's avatar
Baharul
Occasional Contributor
7 years ago

Loop over testStep in soapUi testSuite

Hi All,

I makingone testSuite where I need to repeat one testStep multiple time. Again repeat count depends on output of previous step where getting response in some JSON string. Need to get the iteration count of of response document and loop-over for 2nd testStep.

Kindly help ifyou can get something.

 

As per below pic I needto do loopover policyList based on the response of Add step



Thanks
Baharul Islam

  • Hi Baharul,

     

    In your K Loop, where you are running the Request, just after the execution, write your code to save the response somewhere so that you can use in future, either in Properties step or excel file.

     

    Refer link on how to store Response to Excel file or notepad How to save response data in Excel

     

     

     

  • Baharul's avatar
    Baharul
    Occasional Contributor

    Hi All,

     

    I am able to achive this through Groovy script as per below screen-shot. I am not sure if this is the implementation is supposed to be or is there anyother way..

     

    Can anyone please help me in getting how to collect response time for each step..

     

     

     

     

     

    Thanks in advance...

    • HimanshuTayal's avatar
      HimanshuTayal
      Community Hero

      Hi Baharul,

       

      In your K Loop, where you are running the Request, just after the execution, write your code to save the response somewhere so that you can use in future, either in Properties step or excel file.

       

      Refer link on how to store Response to Excel file or notepad How to save response data in Excel