Page 1 of 1

Jenkins with Ranorex

Posted: Thu Jun 08, 2017 9:09 am
by geczi.zoltan
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.

Re: Jenkins with Ranorex

Posted: Thu Jun 08, 2017 7:54 pm
by krstcs
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).

Re: Jenkins with Ranorex

Posted: Fri Jun 09, 2017 9:13 am
by geczi.zoltan
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.

Re: Jenkins with Ranorex

Posted: Fri Jun 09, 2017 4:39 pm
by krstcs
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).

Re: Jenkins with Ranorex

Posted: Wed Jun 14, 2017 7:57 am
by geczi.zoltan
Thanks for help! I will try to connect not through SSH and see what will happen.

Re: Jenkins with Ranorex

Posted: Wed Jun 14, 2017 2:18 pm
by geczi.zoltan
Yes! Via JNLP agent is working. Thanks!

Re: Jenkins with Ranorex

Posted: Wed Jun 14, 2017 11:20 pm
by krstcs
You're welcome, glad you got it working!