Dear all,
I would like to automatize some Installation tests of an Installation package. One of the Installation steps is a restart of the whole PC. Is it possible to let Ranorex continue the test execution afterwards automatically?
Best regards,
Andy
Does Ranorex survive a Windows restart?
Re: Does Ranorex survive a Windows restart?
No, Ranorex doesn't support this kind of activity out of the box. Ranorex is not designed for system testing, it is a Functional UI Test Automation tool.
It's only possible in the same test if you use some kind of data store (database, CSV file, etc.) where you write the last test case that was run and then you would need to start the test again at system start-up and read the data store and figure out where to go from there. You could have your test write it's own start-up batch file to the start menu's Startup folder and then remove it at the 'end' of the test. Note that this whole thing would require a LOT of user code and could be very brittle.
You could also create two tests, one that does the part before reboot and the second that runs on startup. This is probably the easier way to do it.
Also note that Ranorex (and all other Windows UI automation tools) requires that the desktop be unlocked** and active in order to function properly.
**I use "Autologon" to automatically log my test users onto my test VMs and then unlock the systems when I run the tests. DO NOT USE THIS ON SYSTEMS THAT CAN BE ACCESSED FROM OUTSIDE YOUR FIREWALL!!!
It's only possible in the same test if you use some kind of data store (database, CSV file, etc.) where you write the last test case that was run and then you would need to start the test again at system start-up and read the data store and figure out where to go from there. You could have your test write it's own start-up batch file to the start menu's Startup folder and then remove it at the 'end' of the test. Note that this whole thing would require a LOT of user code and could be very brittle.
You could also create two tests, one that does the part before reboot and the second that runs on startup. This is probably the easier way to do it.
Also note that Ranorex (and all other Windows UI automation tools) requires that the desktop be unlocked** and active in order to function properly.
**I use "Autologon" to automatically log my test users onto my test VMs and then unlock the systems when I run the tests. DO NOT USE THIS ON SYSTEMS THAT CAN BE ACCESSED FROM OUTSIDE YOUR FIREWALL!!!
Shortcuts usually aren't...
-
- Posts: 30
- Joined: Thu Feb 13, 2014 10:29 pm
Re: Does Ranorex survive a Windows restart?
Hello,
I am using AutoIT (https://www.autoitscript.com) to solve this issue.
I am trying NOT to hard code my values but I need a pointer to the ranorex project EXE to tell my autoIT code what ranorex project file to run.
NOTE: My ranorex project is VB.net.
Is there some built in method/api that exposes the full path of the ranorex test EXE file that I can put into a code module (like autoit's @ScriptFullPath macro?)
So if for example my ranorex project's full path is:
d:\Ranorex_Projects\Project01\Project01\bin\Debug\Project01.exe
What method could I call to get this string so that I could then write it to a state file for later use?
Thanks...
I am using AutoIT (https://www.autoitscript.com) to solve this issue.
I am trying NOT to hard code my values but I need a pointer to the ranorex project EXE to tell my autoIT code what ranorex project file to run.
NOTE: My ranorex project is VB.net.
Is there some built in method/api that exposes the full path of the ranorex test EXE file that I can put into a code module (like autoit's @ScriptFullPath macro?)
So if for example my ranorex project's full path is:
d:\Ranorex_Projects\Project01\Project01\bin\Debug\Project01.exe
What method could I call to get this string so that I could then write it to a state file for later use?
Thanks...
-
- Posts: 254
- Joined: Tue Mar 24, 2015 5:05 pm
- Location: Des Moines, Iowa, USA
Re: Does Ranorex survive a Windows restart?
There are a bunch of ways to get the exe path programmatically. I have no idea if one is better than an other
Code: Select all
Dim appPath As String = Application.StartupPath()
Code: Select all
Dim exePath As String = Application.ExecutablePath()
Code: Select all
Dim strPath As String = System.IO.Path.GetDirectoryName( _
System.Reflection.Assembly.GetExecutingAssembly().CodeBase)
Doug Vaughan
-
- Posts: 30
- Joined: Thu Feb 13, 2014 10:29 pm
Re: Does Ranorex survive a Windows restart?
Awesome thank you!!!