Page 1 of 1

Automation fails in CI (Jenkins)

Posted: Wed May 30, 2018 10:25 am
by kapoor.aishvarya
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?

Re: Automation fails in CI (Jenkins)

Posted: Thu May 31, 2018 9:20 am
by odklizec
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.

Re: Automation fails in CI (Jenkins)

Posted: Thu May 31, 2018 9:36 am
by kapoor.aishvarya
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.

Re: Automation fails in CI (Jenkins)

Posted: Thu May 31, 2018 9:43 am
by odklizec
Hi,

You can find this option in Jenkins slave configuration:
keepthisagent.png