View Full Version : What does the ExtJS team use for generating code coverage rep in tandem with Jasmine?

17 Oct 2013, 1:39 AM
I have some Jasmine specs set up and running for my app. I tried integrating Blanket.js earlier this morning and then realized I needed to manually include with data-cover all of my files, along with incorrect path lookups whenever a require block was hit in ExtJS code. There's got to be a better way of doing this.

What does the ExtJS team use for generating test coverage reports?

17 Oct 2013, 4:10 AM

I can't comment on the Sencha developers, but we used istanbul - there's an example project using Grunt and some custom Sencha jasmine extensions shown here: http://www.mattgoldspink.co.uk/2013/03/26/simplifying-grunt-jasmine-tests-on-an-ext-js-project/

H (http://www.mattgoldspink.co.uk/2013/03/26/simplifying-grunt-jasmine-tests-on-an-ext-js-project/)TH,

5 Jun 2014, 3:24 AM

I looked into different ways (also Blanket.js) and found that Karma was most suitable for us. We have different projects that needed the same setup, so the easiest way to share was to publish a npm module (https://www.npmjs.org/package/karma-extjs). The source files are loaded based on the jsb3 file of each project and the specs don't need a html-file to execute.

Using the karma-extjs module, this is how all our projects do coverage (from the gulp task runner)

var argv = require('yargs').argv;
var karma = require('karma-extjs');

staticPort: 9877,
coverage: true,
jsb3: 'APP/build/app.jsb3',
beforeSource: [
afterSource: [
tests: [
karma: {
browserNoActivityTimeout: 20000,
coverageReporter: {
type: 'html',
dir: argv.o ? argv.o : 'coverage/'