Page 2 of 2

Re: Running Ranorex tests (remotly) using jenkins - fails

Posted: Sun May 14, 2017 9:33 pm
by ahoisl
The error message is coming from the .NET Framework and means that it is trying to show a UI dialog box, but the process is a console application or does not have access to the UI desktop - for example, if running as a service without UI access.

Are you sure the Jenkins slave is not running as a service or started by a service?
Do you open some UI dialog in your test?
This dialog could also be the Ranorex evaluation dialog; do you have a valid Ranorex license installed on the system?


Regards,
Alex
Ranorex Team

Re: Running Ranorex tests (remotly) using jenkins - fails

Posted: Tue May 16, 2017 7:40 am
by yam
odklizec wrote:OK, so it's the same as in our case. Anyone can access Jenkins GUI via URL and eventually, with appropriate rights, run or manage the tests jobs. But still, it's just a master-slave configuration. So I'm afraid, I'm still not getting why do you access slave machine via RDP/VNC? :) Black screenshots in reports definitely means there is not realized desktop (either locked or test is started with wrong privileges).
odklizec, as you mentioned, I didn't have appropriate rights.
I have a scheduler task that runs Jenkins slave on computer startup.
In Jenkins Slave scheduler task properties, Security options:
‘Run whenever user is logged on or not’ option was checked – which is wrong. I’ve changed the option to ‘Run only when user is logged on’.
Run Ranorex job from Jenkins – works. But, now, we are back with the UI problem:
When I run the tests using Jenkins, when RDP session is opened, everything works fine.
The problem is that as it runs at 1AM, the Jenkins master computer gets locked and so is the RDP session (with the Ranorex tests). This causes the tests to fail – it does not recognize UI controls (shows black screen).

** I forgot to mention that Jenkins slave machine (where I run Ranorex ui test) is a virtual machine.

Re: Running Ranorex tests (remotly) using jenkins - fails

Posted: Wed May 17, 2017 9:38 am
by qwertzu
Hi Yam,

Have you tried creating and running a batch file on master and slave as described under the following link?
https://www.ranorex.com/support/user-gu ... tml#c13444

This file will log off from your machine but the machine won´t get locked.

regards,

qwertzu

Re: Running Ranorex tests (remotly) using jenkins - fails

Posted: Wed May 17, 2017 9:47 am
by yam
Yes I did but I run it only on slave computer. It didn't help.
Should I also run it on the master computer?

Re: Running Ranorex tests (remotly) using jenkins - fails

Posted: Wed May 17, 2017 11:58 am
by qwertzu
Hi yam,

Please try using a VNC System instead of RDP as suggested by a user before in this Thread.
For example TightVNC.

But usually, the batch file should work with RDP windows.

regards,

qwertzu