0

Right now I'm running Jenkins as windows service. Most likely because of that I'm unable to spawn test application window. It's just appearing as a process in the background. I already tried Log-On option to allow service to interact with desktop, but that doesn't seem to change anything in this case.

I'd like to try running Jenkins through jenkins.war, however the first thing I've noticed is that it begins all the configuration prompting about plugins etc. Application is already configured and has all the builds in place.

Could someone explain if it's necessary to reconfigure everything or it just keeps all the settings in some different location when running as service? There's was no dedicated user, the service was operated just by local system account.

yoger
  • 282
  • 3
  • 15
  • test application window ? you mean the URL you enter in the browser ? – rohit thomas Jun 22 '18 at 03:09
  • It's actually WPF application. But quite same thing. Jenkins service runs some bat script that launches nunit for UI tests and all that happens in the background without actually displaying UI, which is required for framework to do the clicking. – yoger Jun 22 '18 at 06:59
  • Jenkins runs on a tomcat server...so you have to connect it using your browser have you tried localhost:8080 ?? – rohit thomas Jun 22 '18 at 09:23
  • Well that's not the issue. It's currently working fully configured as windows service. And as I mentioned I just wan't to run it from console so that the slave (which is actually the master - only building agent) can pop up my application UI for testing instead of keeping it in the background. – yoger Jun 22 '18 at 23:10
  • did you give this a try ?? https://stackoverflow.com/questions/9618774/jenkins-selenium-gui-tests-are-not-visible-on-windows – rohit thomas Jun 22 '18 at 23:54
  • @rohitthomas Yes I have, that's how I ended up with running through jenkins.war solution. Unfortunately after that, web pops up with all the configuration promps which suggest brand new setup. Right now I'm giving a shot backing up the original service running configuration and trying to restore that on the version launched through the command line. – yoger Jun 23 '18 at 15:38
  • Not the Jenkins. War option there other one allow interactions options in services ...also are there drivers you use for testing headless ? – rohit thomas Jun 24 '18 at 15:01

1 Answers1

0

So the solution was fairly simple. The main problem was when Jenkins ran as a service entire configuration was saved in it's install directory so upon running jenkins.war configuration was set in current account user directory so it was like fresh installation.

The thing that helped was thin backup plugin. Ran the backup while service instance was running, then restored it for the new instance that allowed full plugin, configuration and builds restore. After that also passwords for source control had to be updated (restored ones didn't work probably because of per instance encryption key).

yoger
  • 282
  • 3
  • 15