Jenkins with Ranorex

Ask general questions here.
geczi.zoltan
Posts: 4
Joined: Thu Jun 08, 2017 9:01 am

Jenkins with Ranorex

Post by geczi.zoltan » Thu Jun 08, 2017 9:09 am

Hi,

I'm trying to integrate automated ranorex tests into jenkins. The jenkins will run the tests on a virtual machine. Everything is configured, but when the test suit is started i'm getting this error:
Unexpected exception occured: System.InvalidOperationException: Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.
The ranorex that is on the virtual machine is still trial. We want to try it before we buy it. Am i getting this error because the little license evaluation dialog? Thanks for help.

krstcs
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: Jenkins with Ranorex

Post by krstcs » Thu Jun 08, 2017 7:54 pm

This error means that you are running Jenkins as a service on the test system, which is not supported by Ranorex.

You MUST start the Jenkin Slave as a user-level, interactive, desktop application, usually by running it in a batch script on login.

Note also that the system must have a REALIZED, UNLOCKED, LOGGED-IN desktop without a screensaver, or Ranorex won't work (nor will any other automation tool, this is a Windows security issue).


Also, note that the Jenkins server can be run as a service, just not the slave (where the tests actually run).
Shortcuts usually aren't...

geczi.zoltan
Posts: 4
Joined: Thu Jun 08, 2017 9:01 am

Re: Jenkins with Ranorex

Post by geczi.zoltan » Fri Jun 09, 2017 9:13 am

I'm connecting through ssh from jenkins to the virtual machine. Though I stopped the jenkins service, it is still working until the first dialog should appear.

Our operator configured the jenkins so it starts the slave.jar during the ssh connection. I don't really know what that slave.jar does but i think that starts the jenkins on the virtual machine.

I tried to configure the ssh server on the virtual machine (Bitvise SSH) to be in interactive mode. I'm sending you some pictures too with the ssh settings.

I am always logged in with remote desktop, so the computer wasn't on idle.

krstcs
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: Jenkins with Ranorex

Post by krstcs » Fri Jun 09, 2017 4:39 pm

SSH does not create a realized desktop, it is only a command-line shell. Ranorex must be run from the Remote Desktop session, not the SSH session (they are different).
Shortcuts usually aren't...

geczi.zoltan
Posts: 4
Joined: Thu Jun 08, 2017 9:01 am

Re: Jenkins with Ranorex

Post by geczi.zoltan » Wed Jun 14, 2017 7:57 am

Thanks for help! I will try to connect not through SSH and see what will happen.

geczi.zoltan
Posts: 4
Joined: Thu Jun 08, 2017 9:01 am

Re: Jenkins with Ranorex

Post by geczi.zoltan » Wed Jun 14, 2017 2:18 pm

Yes! Via JNLP agent is working. Thanks!

krstcs
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: Jenkins with Ranorex

Post by krstcs » Wed Jun 14, 2017 11:20 pm

You're welcome, glad you got it working!
Shortcuts usually aren't...