Ranorex script fails when remote system window is not opened

Best practices, code snippets for common functionality, examples, and guidelines.
ravihraj
Posts: 6
Joined: Fri Aug 26, 2016 4:48 pm

Ranorex script fails when remote system window is not opened

Post by ravihraj » Wed Oct 19, 2016 4:54 pm

Hi team, i am facing issue while executing my ranorex script in team city.

when i run the configured test case in team city to test, it will fail. (please make a note, when i run my test case in team city, actual execution will take place in agent server (in another system) and i have not logged in to view or verify the test execution.

If i keep open agent server window ( here i logged in and looking for test execution) and execute the test case in team city, it will pass with out an issue.

Any pointers to tackle this issue. Please suggest.

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: Ranorex script fails when remote system window is not opened

Post by krstcs » Wed Oct 19, 2016 5:50 pm

First, please provide the following information in ALL posts when raising an issue. Without this information it will be very difficult to give any meaningful help:

1. FULL Ranorex version (currently supported are 6.1.1 and 6.0.2)
2. Windows version
3. Technology of system under test (HTML, Flash/Flex, Java, WPF, etc.) and version
4. Ranorex SNAPSHOT (not a screenshot) of any element in question
5. RanoreXPath of any element in question
6. COMPLETE error message if applicable
7. Test Report from test run where issue happens



As for your current issue, the Ranorex documentation is very clear about the following:

1. Make sure that the remote system has a REALIZED, UNLOCKED DESKTOP while the test is running. Ranorex will NOT WORK if the system is locked, on screensaver, or if the desktop is not fully realized (such as when RDP is closed).

2. The TeamCity agent running the test MUST NOT BE STARTED AS A SERVICE. A service in Windows does not have access to a realized desktop (see 1 above) and cannot be used for testing with Ranorex.
Shortcuts usually aren't...

ravihraj
Posts: 6
Joined: Fri Aug 26, 2016 4:48 pm

Re: Ranorex script fails when remote system window is not opened

Post by ravihraj » Wed Oct 19, 2016 10:28 pm

Hi team,

please find the details:

Ranorex version: 6.1.1
Windows server 2008 R2 enterpirse , 64 bit

I have bunch of test cases which i will execute via Team City which in turn run in Agent Server(remote Desktop).

Based on your suggestion, I need to keep window open to execute the test case ? Its known issue of Ranorex ?

Cant i make my session active in Remote Destop ? so that actual UI execution takes place with out opening remote destkop? I dont want to see UI execution, all i will verify the success or failure in team city build. Please suggest ..

-Thanks
Raj

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

Re: Ranorex script fails when remote system window is not opened

Post by odklizec » Thu Oct 20, 2016 7:31 am

Hi,

Simply the MS Remote Desktop locks the screen if the remote window is minimized or closed . It's not a Ranorex issue, it's Remote Desktop "issue" (security-related thing?). You have two options. Try some of the registry/batch RD-related hacks you can find around the internet and even this forum (e.g. this). Or you will have to replace the remote desktop connection with VNC, which keeps the desktop unlocked, even if the VNC window is minimized/closed.
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

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: Ranorex script fails when remote system window is not opened

Post by krstcs » Thu Oct 20, 2016 3:18 pm

I use TightVNC and it works great, much more stable than Remote Desktop.

But, to answer your question, this is an issue with RDP, as Pavel said, that ALL functional UI test automation tools have to work around, whether it's Ranorex, QTP (or whatever they call it now), etc.
Shortcuts usually aren't...