Forum Discussion

Vallalarasu_P's avatar
Vallalarasu_P
Frequent Contributor
2 years ago

How to exit Conditional Goto In Readyapi without Groovy Scripting?

In the ReadyAPI Test, I've a REST test step which when executed trigger the status as "Processing" after sometime to "In Progress" later to "Completed", The time of these status change is not consistent. 

 

I've a added a conditional GoTo to validate for TestStatus = "Completed" with a delay of 10 Seconds , Until its true it will re-execute the REST test step. This works fine.

But how to exit the loop say after 200 Seconds. I understand the complete steps can be done via Groovy Scripting. Is there an option to do without Scripting?

 

Can PropertyWait used for achieving this ?

2 Replies

  • nmrao's avatar
    nmrao
    Champion Level 3

    Vallalarasu_P 

    If I understand it correct, I don't think it is possible in the way you are looking for.

    The reason being that Conditional Goto step uses Xpath to evaluate if certain condition is met or not.  And doen't use any time bound condition for the same.

  • Vallalarasu_P's avatar
    Vallalarasu_P
    Frequent Contributor

    nmrao We need to exit because it goes into a indefinite loop unless the condition is met. 

     

    I found the solution, It is by setting a timeout on the testcase level in ReadyAPI. 

    Assuming the time delay between execution is 10 Seconds, The time out will be set to 100 Seconds, So it it goes into indefinite loop due to xpath condition is not met, It stop the execution after 100 Seconds