Child pages
  • Using Istanbul to integrate code coverage report in Jenkins

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Servoy JS files are lazy-loading. If files are never referenced on code code coverage will ignore them. Solutions: 1) move the variable and the self-executing block of code of each instrumented JS file in a single scope and force the loading of the scope at the solution open. 2) modify the coverage.json file by adding the sources to the ignored JS files.
  • TODO after the second build Cobertura loss data in the source files. Won't be able to display the lines of code until the workspace is deleted.
  • Servoy Javascript uses the Rhino Javascript. Istanbul does not recognize all Rhino commands, won't be able to instrument the file when is not able to parse the code and will copy the file as-is. Known issue is the XML code, istanbul won't instrument any file containing plain XML code.
    Known commands not recognized are:
       plain XML code
       try {} catch (e if e instanceof ....) {}
       for each loops 
  • TODO Servoy variables and Prototype functions are always reported as never executed.
  • NodeJs is asynchronous, read-write operations on files are not immediate.
  • Use Ant Patched to use formatted junit report result (.xm1 extension)
  • in the Jenkins job config is not possible to use custom properties (example servoy.test.property.file = ${antRunner.dir}/servoy.properties ) since ANT wont translate them to full path.

...