Page 1 of 1

Using Jenkins to run Ranorex Nightly

Posted: Thu Jun 24, 2021 3:38 pm
by krish299
Currently, I have a remote desktop with Ranorex version 8.2 installed that I would like to use to run the tests nightly. I have the Jenkins slave installed on the remote desktop, and have it set to trigger the test nightly, mainly using the following guide: https://www.ranorex.com/help/latest/int ... roduction/

However, when the tests are run I see a black screenshot for where the tests usually take a screenshot. I saw this forum post, https://www.ranorex.info/viewtopic.php? ... top#p66557, and ensured that Jenkins is not running as a service. But still no luck. Does anyone know how to solve this issue?

Re: Using Jenkins to run Ranorex Nightly

Posted: Fri Jun 25, 2021 11:30 am
by odklizec
Hi,

At first, the Ranorex 8.2 is way too old and no longer supported. You will have to update it with something more recent, like 9.5.3 ;)

At next, the black screens in report means that the remote desktop was most probably locked. You must ensure that the remote desktop has logged-in user and that the desktop is not locked. I'm using LogonExpert app for this, which keeps the desktop logged and unlocked.

Re: Using Jenkins to run Ranorex Nightly

Posted: Mon Jun 28, 2021 2:41 pm
by krish299
Hello, thank you for the speedy reply! Thus far, to run the tests I have been manually logging into the remote desktops, then allowing jenkins to trigger the tests, and run a .bat script that safely logs the user off while allowing the test to run. I have pasted this .bat script at the end of this message. My question is, is there any way to automate the logging in procedure to the remote desktop (either via jenkins or some other means)? I had a look at the LogonExpert app you mentioned. Is there a free alternative?

.bat script:
for /f "skip=1 tokens=3 usebackq" %%s in (
`query user %username%`
) do (
%windir%\\\\System32\\\\tscon.exe %%s /dest:console
)

Re: Using Jenkins to run Ranorex Nightly

Posted: Tue Jun 29, 2021 9:25 am
by odklizec
Hi,

I'm afraid, I'm not aware of any free alternative to LogonExpert. Honestly, LogonExpert is quite cheap and does exactly what it promises. Exposing username/password (even for service account) in command line, is definitely not a very good idea ;)

Re: Using Jenkins to run Ranorex Nightly

Posted: Tue Jun 29, 2021 3:28 pm
by krish299
Thank you for the reply. Just out of curiosity, is there a way to login to the remote desktop via the command line? What should be executed within the Jenkins job?

Re: Using Jenkins to run Ranorex Nightly

Posted: Fri Jul 09, 2021 8:33 pm
by tmcdoniel
You can view the MSTSC arguments at the following website, https://www.parallels.com/blogs/ras/mst ... ernatives/ to launch an RDP session from the command line.

Re: Using Jenkins to run Ranorex Nightly

Posted: Mon Sep 27, 2021 2:04 pm
by TimoL
Microsoft's Autologon is a free alternative to get the screen unlocked after a reboot.