Page 1 of 1

Black/Blank Screenshots

Posted: Mon Nov 20, 2017 9:55 am
by TPeter
We run Ranorex nightly against our SUT on a build server.
Usually, the build succeeds but sometimes Ranorex doesn't see anything e.g. takes black/blank screenshots (See attachement for example).

We found out that if we disconnect all RDP-Sessions on the build server, it works again. But since some days, this does not help anymore (we didn't update Ranorex during this time so this is not a new "bug" introduced).
We tried restarting of course, but this did not help either.

We were able to recreate this with logging in on the build server via RDP, but as I said we can't get the tests running again and thus we are not able to reproduce it.

Is this a known problem and are there any solutions?

Thank you for your help!

Build Server: Windows Server 2016 Standard
Ranorex Version: 7.2.0

Re: Black/Blank Screenshots

Posted: Tue Nov 21, 2017 9:51 am
by TPeter
We found that the problem was that the TeamCity Service mustn't run as a service. When we start it directly, the problem is fixable again.

However, we still get black screenshots when we connect to the build server with RDP. But now we can delete open connections or restart the server to get the tests running again.

Still asking though, is it possible that we don't have to go through this procedure everytime after we've logged in on the buildserver?

Re: Black/Blank Screenshots

Posted: Tue Nov 21, 2017 10:38 am
by odklizec
Hi,

The problem with Remote Desktop connection is, that it must not be closed or even minimized while running automated test! If you do either action, RD locks the remote screen and hence Ranorex cannot access the UI elements. For successful UI test automation, the desktop must be unlocked. I remember there was a discussion about a RD hack, which allows to close/minimize RD window. Just search the forum for RD topics. Or you can simply dump the RD and use some kind of VNC tool, which keeps the desktop unlocked after minimizing/closing VNC dialog.

And yes, you must not run TeamCity (Jenkins and any other CI tool) as a service. It's clearly described in Team City integration guide (Windows service does not have sufficient rights to start UI-applications)...
https://www.ranorex.com/blog/integratin ... i-process/

Re: Black/Blank Screenshots

Posted: Tue Nov 21, 2017 11:30 am
by TPeter
Thank you for your reply!

Just to clarify, there was no connection opened to start the tests nor while the tests were running.
But apparently there must not be any RDP-connection (neither opened nor closed) existing on the server.

Thanks again for the clarifications!