Is there a way to restart an iteration after it fails?

Ask general questions here.
quaymat321234
Posts: 1
Joined: Fri Jun 23, 2017 5:43 pm
Contact:

Is there a way to restart an iteration after it fails?

Post by quaymat321234 » Fri Jun 23, 2017 6:41 pm

Hi everyone,

is there a way to restart an iteration after it fails?
In our Tests we have iterations where a website is shown. Sometimes the server behind the website isn't working so the surface don't show up. After a restart it works.

thanks for your help,
Jan
Hello, my name is Qmat :) Visit my site giup viec gia dinh - giup viec nha

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3930
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Is there a way to restart an iteration after it fails?

Post by odklizec » Mon Jun 26, 2017 9:25 am

Hi Jan,

No, as far as I know, there is no way to restart the iteration. But what you can do is to use the Try...Catch block, to handle the exception caused by failure and then in the catch block, restart the server and eventually access the page again. So basically, you will fix the page within the same iteration, in which it fails. Hope this helps?
Last edited by odklizec on Mon Jun 26, 2017 9:33 am, edited 1 time in total.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

User avatar
RobinHood42
Posts: 239
Joined: Fri Jan 09, 2015 3:24 pm

Re: Is there a way to restart an iteration after it fails?

Post by RobinHood42 » Mon Jun 26, 2017 9:28 am

Hi Jan,
is there a way to restart an iteration after it fails?
Not out of the box. You would have to implement your own logic here.
In our Tests we have iterations where a website is shown. Sometimes the server behind the website isn't working so the surface don't show up. After a restart it works.
I would rather suggest to ensure that the website is fully loaded instead of re-iterating your test case. This can be achieved by using "WaitForDocumentLoaded"-actions and/or other (UI) validations.

Cheers,
Robin 8)