Using Jenkins to run Ranorex Nightly

Experiences, small talk, and other automation gossip.
krish299
Posts: 4
Joined: Tue Aug 11, 2020 9:51 pm

Using Jenkins to run Ranorex Nightly

Post by krish299 » Thu Jun 24, 2021 3:38 pm

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?

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

Re: Using Jenkins to run Ranorex Nightly

Post by odklizec » Fri Jun 25, 2021 11:30 am

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.
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

krish299
Posts: 4
Joined: Tue Aug 11, 2020 9:51 pm

Re: Using Jenkins to run Ranorex Nightly

Post by krish299 » Mon Jun 28, 2021 2:41 pm

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
)

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

Re: Using Jenkins to run Ranorex Nightly

Post by odklizec » Tue Jun 29, 2021 9:25 am

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 ;)
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

krish299
Posts: 4
Joined: Tue Aug 11, 2020 9:51 pm

Re: Using Jenkins to run Ranorex Nightly

Post by krish299 » Tue Jun 29, 2021 3:28 pm

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?

User avatar
tmcdoniel
Certified Professional
Certified Professional
Posts: 78
Joined: Mon Dec 07, 2020 6:30 pm

Re: Using Jenkins to run Ranorex Nightly

Post by tmcdoniel » Fri Jul 09, 2021 8:33 pm

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.
Sales Engineer @ Ranorex

TimoL
Posts: 46
Joined: Thu Sep 13, 2018 3:08 pm

Re: Using Jenkins to run Ranorex Nightly

Post by TimoL » Mon Sep 27, 2021 2:04 pm

Microsoft's Autologon is a free alternative to get the screen unlocked after a reboot.