Run test in ranorex after a PC restart

Best practices, code snippets for common functionality, examples, and guidelines.
nirs
Posts: 7
Joined: Mon Mar 12, 2018 10:35 am

Run test in ranorex after a PC restart

Post by nirs » Tue Mar 12, 2019 8:11 am

Hi,

I would like to know if there's an option to continue running test after a PC restart?

Thanks in advance.

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

Re: Run test in ranorex after a PC restart

Post by odklizec » Tue Mar 12, 2019 8:24 am

Hi,

I'm afraid, there is no out-of-the-box functionality like this in Ranorex. But you can find some suggestions, how to continue with test after windows restart, in this post:
viewtopic.php?f=4&t=8262&p=38921#p33435
The downside of any solution you may probably find is, that even if you restart the test, it will not store the test results in a single report (the one generated before restart). And there is currently no way to merge multiple reports into one.
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

loonquawl
Posts: 64
Joined: Wed Nov 22, 2017 10:08 am

Re: Run test in ranorex after a PC restart

Post by loonquawl » Fri Mar 29, 2019 11:06 am

I put a batch file in the Autostart folder (with a delay to ensure the computer has finished housekeeping), that will call the executable of the Test.

The first test case (that will end in a reboot) writes the second testcase (the one after the reboot) in the /tc argument of the call inside that batch file, and a comment about success.

The second testcase verifies the comment of the first, so the Failure or Sucess gets taken into the second report (as there will always be two), and then comments the whole line containing the call for the executable.