Execute Ranorex tests via SSH on Ranorex VM results in black chrome screens

Ranorex Spy, Recorder, and Studio.
boris0dev
Posts: 15
Joined: Fri Nov 09, 2018 11:28 am

Execute Ranorex tests via SSH on Ranorex VM results in black chrome screens

Post by boris0dev » Fri Feb 08, 2019 8:03 am

I have the following setup:
One Windows 7 machine and one Windows 10 machine.
On the Windows 10 machine I've installed Ranorex Studio and compiled my testsuite.
The testsuite executed directly (not from within Ranorex Studio) causes no problems.

But I want to execute this testsuite from the Windows 7 machine without Ranorex Remote as it isn't supported by Bamboo, our continuous integration server.
My idea was to connect to the Window 10 machine via SSH and execute this way the compiled testsuite.

Well, it starts up without any problems except: when the testsuite opens Chrome the screen of Chrome is black. A picture is worth a thousand words:
black screens.png
black screens.png (75.13 KiB) Viewed 173 times
I thought if I install Ranorex on a different machine and execute the testsuite it gets started as a desktop app (like I would start it on the server manually) but this doesn't seem to be the case.

Is there any way I can get this working?

Thanks for any support
Boris

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

Re: Execute Ranorex tests via SSH on Ranorex VM results in black chrome screens

Post by odklizec » Fri Feb 08, 2019 8:41 am

Hi Boris,

Black screen in report means, that there is either locked desktop on target machine or the Bamboo agent is installed as a service, which is a big 'no-no'! Apps started on service account does not have sufficient rights to access UI. Please read the Ranorex-Bamboo integration guide here...
https://www.ranorex.com/blog/bamboo-ci- ... utomation/
Once the Bamboo and Ranorex job is configured as described in this guide, all should work as expected.
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

boris0dev
Posts: 15
Joined: Fri Nov 09, 2018 11:28 am

Re: Execute Ranorex tests via SSH on Ranorex VM results in black chrome screens

Post by boris0dev » Fri Feb 08, 2019 8:50 am

Thanks Pavel,
but Bamboo (in this case) doesn't matter.
The question is more: Is it possible to start the testsuite remotely without using Ranorex Remote?

But maybe starting the testsuite via SSH has the same restrictions like starting the testsuite with bamboo as a service...

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

Re: Execute Ranorex tests via SSH on Ranorex VM results in black chrome screens

Post by odklizec » Fri Feb 08, 2019 9:06 am

Hi,

I'm afraid, I don't have any experience running apps via SSH, but yes, I guess that running app via ssh (and without logging to desktop with user account) could cause such issue? I'm curious, what's the problem with using normal Bamboo job to launch an app from master Bamboo server on Bamboo 'slave' (or whatever the machine connected to bamboo server is called)?

I'm personally using Jenkins server and an array of Jenkins slave VMs, where each VM has installed and running a small Jenkins agent, which keeps slave VM connected to Jenkins master server. Now I have defined a Jenkins job (multiple of them), which runs tests on given slave machine. The job simply gets the code from TFS, compiles and test and runs it on VM of my choice (connected to Jenkins). No Ranorex remoting, no ssh or another way of remote execution is used. Everything is done from Jenkins job. And as far as I remember Bamboo (I've used it in the past too), it works pretty similar as in Jenkins. I'm sure Bamboo has some kind of 'slave' agent too?
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

boris0dev
Posts: 15
Joined: Fri Nov 09, 2018 11:28 am

Re: Execute Ranorex tests via SSH on Ranorex VM results in black chrome screens

Post by boris0dev » Fri Feb 08, 2019 11:00 am

The problem with running Bamboo _not_ as a service but starting it from the console is that the company I'm working for doesn't want to start Bamboo from the console because ... I can't remember. They had a discussion about it and decided Bamboo running from the console isn't an option. I think one reason is if the server gets rebooted they have to login manually and start Bamboo as a special user manually again ...

And yes, you are right, Bamboo works with slaves as Jenkins does...

But thanks again a lot for your thoughts and input

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

Re: Execute Ranorex tests via SSH on Ranorex VM results in black chrome screens

Post by odklizec » Fri Feb 08, 2019 12:45 pm

Well, company (security/network) processes are sometimes weird to understand :) On the one hand, companies want a test automation, but on the other hand, they are doing everything to prevent TA persons to achieve their goal :D

We are restarting slave machines every night and for login, we are are using LogonExpert, which also keeps the desktop unlocked...
https://www.logonexpert.com/
Of course, from security reasons, we are not using a real-person's credentials to auto-login to slave machines. We have a dedicated TA user, with limited rights and which is used just for TA purposes and only on Jenkins machines. Such approach should clear all security concerns?
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

boris0dev
Posts: 15
Joined: Fri Nov 09, 2018 11:28 am

Re: Execute Ranorex tests via SSH on Ranorex VM results in black chrome screens

Post by boris0dev » Fri Feb 08, 2019 2:26 pm

Wow! That's sounds really interesting!
I will check it out
Thank a lot Pavel!

User avatar
Stub
Posts: 257
Joined: Fri Jul 15, 2016 1:35 pm

Re: Execute Ranorex tests via SSH on Ranorex VM results in black chrome screens

Post by Stub » Fri Feb 08, 2019 3:52 pm

FWIW we also use LogonExpert (I got the tip from these boards too!).

Our test machine also reboots every night, LogonExpert unlocks the desktop upon startup, our build system software kicks in via the realised desktop (built on MSBuild, it's something we brewed internally many, many years ago now, so I've not tried Jenkins or Bamboo), and finally LogonExpert then re-locks the desktop until a test request arrives. We then unlock the desktop, run our Ranorex tests, and re-lock the desktop afterwards. Seems to work quite well. LogonExpert made all the difference for us too.