I have set up a Jenkins job that should run Firefox. Signed in to Ubuntu with the Jenkins user, I can manually launch Firefox without any problem. However, when I run the job in
Got it. It turns out the problem originated from a misconception on how to run karma in the first place.
The Jenkins task was doing karma start
, with autowatch set to true. Instead, I fired up karma with autowatch false in rc.local (script ran on boot) and the Jenkins task executes karma run
instead. This solved the problem entirely.
Edit: Installing the xvnc plugin, and activating it for build works for karma start and karma run.
Edit: The problem came back when I upgraded to 14.04. The fix was to make sure the environment variables injected in the build pointed to the X11 versions.
FIREFOX_BIN=/usr/bin/X11/firefox
CHROME_BIN=/usr/bin/X11/google-chrome
Would you mind running karma with --log-level
debug and also --no-colors
so we can have a better idea of the reason why it fails?
I you also tried with another browser? I often encounter issues while running a GUI tool within Jenkins.
You might want to try running your test suite with PhantomJS (http://phantomjs.org/) just to see if a headless browser would solve the problem