Service Virtualization

  • 1.  How to wait till a condition is successfull in CA DevTest

    Broadcom Employee
    Posted Mar 13, 2017 11:23 AM

    How to wait till a condition is successfull in CA DevTest?

     

    Create a test case

    Add a rest step where I have a service which takes time to start.

    Only if this service is up then only I need to move to next steps

    Is there way I can wait till the service is up and if it is not up then it should run in loop till it gets up.

     

    Please suggest



  • 2.  Re: How to wait till a condition is successfull in CA DevTest

    Posted Mar 13, 2017 11:29 AM

    You can just make the call and add a response code assertion, if the response code is not 200 (ex. 500 for internal server error and unavailable), then just loop back. and call again..etc..etc.  Finally when the code is 200 (meaning successful), then break out to the next step in your logic.  You could just as well add a wait step for x seconds inside of the loop vs immediately looping baclk