Page 1 of 1

App closes after Jenkins cmd completes

Posted: Mon Nov 16, 2015 5:15 pm
by ablang_58
Running Ranorex 5.3.1 on a Virtual Machine (Windows 7). A Jenkins Project (on a remote system) issues a command line:
H:\Automation\VirtualDM\VirtualDM\bin\Debug\TestApps.exe /mo:StartApp

The Virtual Machine receives the command and starts the App.
When the Jenkins Project completes the App is closed on the Virtual Machine. My goal is to have the App remain active.
The TestSuite is "checked" and the solution has been built, F8.
TestSuite-->TestCase-->StartApp.
The Module has two entries.
1. Run Application
2. Delay

Re: App closes after Jenkins cmd completes

Posted: Mon Nov 16, 2015 6:21 pm
by krstcs
This is a Jenkins issue, not a Ranorex issue.

When Jenkins creates processes, they are in the context of the running job. When that job ends, the processes associated with it end.

If you want to find a way around that, you should search Jenkins forums and Google.



In addition, you should update Ranorex to a newer version (5.4.3 is current) as 5.3.1 is no longer supported.

Re: App closes after Jenkins cmd completes

Posted: Tue Nov 17, 2015 12:02 am
by ablang_58
Thanks for your comments.
I have two versions of my StartApp, each with one action where one works and the other does not so I thought it was a Ranorex issue.

Option 1.
Run Application - This does not keep the application running after Jenkins Project closes

Option 2.
Double click (on the desktop icon) This keeps the app running after Jenkins closes

Re: App closes after Jenkins cmd completes

Posted: Tue Nov 17, 2015 4:28 pm
by krstcs
That is because a link in Windows always creates a new process for the application, so Jenkins has no control over the new process and it won't be killed when the Jenkins job ends.