Automation fails in CI (Jenkins)

Ask general questions here.
kapoor.aishvarya
Posts: 2
Joined: Wed May 23, 2018 7:43 am

Automation fails in CI (Jenkins)

Post by kapoor.aishvarya » Wed May 30, 2018 10:25 am

I am working on integrating Ranorex in CI. I was able to do all the configuration and my tests run well except for one scenario.
If I am not RDP into my remote (jenkins slave), the automation tests fail giving me black screenshots.
If I RDP into the remote and run my tests they work fine. If I close RDP then also tests continue to work fine. Tests also work fine if I have recently close the RDP.
Now I know that my remote does not logs off or locks because I have that configuration already setup with my IT.
The issue only comes I the remote has been idle for sometime and then I trigger my jenkins job to run the test.

My setup-
Remote machine is configured as a jnlp jenkins slave.
I can configure my remote machine as a jenkins slave by running agent jar as a local user
I have tried the batch solution that does not work.

I think my issue closely related to a question posted in 2014 titled -problems-with-scheduled-test-suite-on-virtual-machine. I am hopeful that Ranorex will have a solution by now.

Why is this issue happening?
How can I solve this?

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

Re: Automation fails in CI (Jenkins)

Post by odklizec » Thu May 31, 2018 9:20 am

Hi,

Black screens in report mean that there is not realized desktop. Usually, this is caused by locked desktop. How exactly do you have the VM connected to Jenkins? I'm using JNLP agent (started from batch file, located in VM's autostart folder) and enabled option "keep this agent online as much as possible". Also, make sure, that the desktop is not auto-locked after certain amount of time. There is no way around it. Ranorex (any UI testing tool) simply requires realized desktop.
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

kapoor.aishvarya
Posts: 2
Joined: Wed May 23, 2018 7:43 am

Re: Automation fails in CI (Jenkins)

Post by kapoor.aishvarya » Thu May 31, 2018 9:36 am

Hi odklizec,

Where can I find the option - "keep this agent online as much as possible"?
My setup is also similar to yours - a jnlp java agent triggered by a batch file auto kicked at system start-up.

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

Re: Automation fails in CI (Jenkins)

Post by odklizec » Thu May 31, 2018 9:43 am

Hi,

You can find this option in Jenkins slave configuration:
keepthisagent.png
You do not have the required permissions to view the files attached to this post.
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