This is a migrated thread and some comments may be shown as answers.

Dynamically exit a loop

1 Answer 81 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Engage QA
Top achievements
Rank 1
Engage QA asked on 10 Apr 2016, 09:10 PM

Hi All,

I'm trying to find a way to dynamically exit a loop before its completed its number of iterations if a certain even occurs. so logically it need to look something like this ..

Loop 20 times

Refresh page

wait 1sec

    If (Text = bob)

          exit loop 

    else

          Loop count ++

end loop

The reason im needing to do this is that we have a cloud service that can 'acceptably' take upto 10mins to process new information if it takes longer than 10mins i want the test to fail, but i don't want the test to wait 10 mins if the data comes back quicker. the data is not pushed to the page but has to be pulled by a page refresh. from the research we've done here we cant find a way to force exit the loop, has anyone done this before? 

Thanks,

Dan

1 Answer, 1 is accepted

Sort by
0
Boyan Boev
Telerik team
answered on 13 Apr 2016, 11:52 AM
Hello Dan,

For this purposes it is better to use While conditional step

In this case Test Studio will loop until some verification condition fails.

Let me know if that helps.

Regards,
Boyan Boev
Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
Tags
General Discussions
Asked by
Engage QA
Top achievements
Rank 1
Answers by
Boyan Boev
Telerik team
Share this question
or