vendredi 30 octobre 2015

Jenkins/SonarQube unit testing code coverage for JavaScript

We set up Jenkins/SonarQube to fail a build if a developer commits new code that has less than 70% of unit testing code coverage for Java. We would love to do the same for JavaScript. This turned out to be problematic.

To get SonarQube to analyze JavaScript unit tests you have to use an option like this (taken from Jenkins context):

sonar.javascript.jstestdriver.reportsPath=${WORKSPACE}/my-project/generated-reports/jstd

The problem is that using JSTestDriver (http://ift.tt/13lC3CG) is out of the question because it's old and not compatible with modern JavaScript frameworks like AngularJS or ReactJS.

Question: has anybody encountered and solved this problem?

Aucun commentaire:

Enregistrer un commentaire