javascriptnode.jsjenkinskarma-runnerslimerjs

How to setup karma-slimerjs-launcher to work with Firefox 47 or newer in Jenkins?


I am looking how to get karma-slimerjs-launcher to run with a version of Firefox that supports ES6.

This karma launcher uses an older version of slimerjs, while the last version, SlimerJS 0.10.2, supports Firefox 38 to 50.

I see that now Firefox has to be installed separately and SlimerJS may need to be pointed to it.

How can that be done in Jenkins?


Solution

  • Considering no answer was offered, I decided to change things a bit. Instead of using karma-slimerjs-launcher, I am now using karma-firefox-launcher.

    SlimerJS 0.10.2 requires that you install Firefox yourself and point Slimer to the Firefox binary. Having that in mind, it just makes sense to use karma-firefox-launcher instead.

    1. First you will need to install Firefox. You can find the available versions here: https://ftp.mozilla.org/pub/firefox/releases/.
    2. If you are using Linux for Jenkins, go to Configure in your project and check "Start Xvfb before the build, and shut it down after." in Build Environment. Here is more about the plugin: https://wiki.jenkins-ci.org/display/JENKINS/Xvfb+Plugin
    3. Configure browsers in karma.conf.js to user Firefox. Check more configurations here: http://karma-runner.github.io/1.0/config/configuration-file.html