Forum Discussion

Jim_Cusack's avatar
Jim_Cusack
Contributor
16 years ago

Looping in SOAPUI Pro

    Is there a way to construct a test that includes a 'while' or 'repeat/until' loop around a series of steps in a test case?

I am using SOAPUI Pro 2.5.1

Thanks,

Jim Cusack
  • Does anyone have an example of a Groovy script loop that continues to loop until a test step returns a certain value? Possibly with a wait time inside of the loop.

    Thanks 
  • giseF's avatar
    giseF
    Occasional Visitor

    Hi,

    I need help bcause I want to retrieve some information from the response to a Request.

    My Request is like :

    <soapenv  : Enveloppe url>

       <soapenv : Header/>

       <soapenv : Body>

          <con : getData>

             <NumClient>aaaa</CustNumber>

         </con...>

      </...>

    ...

     

    And my Response like

    <soapenv : Enveloê url>

       <Soapnv : Body>

         <ser-root:getDataResponse url>

            <PivotFichClient>

               <CodePtf>bbbb</CodePtf>

            </PivotFichClient>

            <PivotContrat>

               <NumContrat>123</NumContrat>

            </PivotContrat>

            <PivotContrat>

               <NumContrat>456</NumContrat>

            </PivotContrat>

            <tns3:GetFonds>....</tns3:GetFonds>

    ....

     

    I want to retrieve every NumContrat in the Response.

    The Response can return 3 rows "Pivot Contrat" with 3 numbers contrats or 2 or 4 ,... it depends of the NumClient.

     I've already declared a datasink with a properties list {NumClint, Ptf, NumContrat},

     

    I've declared and Xpath which retrieved a NumContrat but just one and I don't know how many contract my customer have.

    I want to make a loop but I don't know how to do.

    Have you got a solution ?