I currently have a problem with Karma (0.12.31), when running with the karma-coverage plugin.
Executing Karma, without coverage, the tests are running after a few seconds. If I execute karma with karma-coverage plugin it will take significantly more time. I know coverage can take more time, but I think the amount of time is ridiculous.
With karma-coverage I get the message "karma chrome have not captured in 60000 ms, killing", then karma kills Chrome (i'm using 43.0.2357.132). After 5 minutes, a new Chrome window is open and after a few seconds the tests are finally executed.
Is my configuration correct and it's "normal" having to wait that long? We're talking about 4000 tests, even though I'm just running 12 of those 4000.
This is my karma.conf.js file:
module.exports = function(config){
config.set({
browserNoActivityTimeout: 60000,
basePath : '../',
preprocessors: {
'templates/*.tmpl.html': ['ng-html2js'],
'scripts/**/**/*.js': ['coverage']
},
files: [
{pattern: 'Styles/images/*.png', included: false, served: true},
'scripts/vendor/jquery-1.11.1.min.js',
'scripts/vendor/angular.js',
'tests/unit/angular-mocks.js',
'scripts/vendor/jquery.signalR-2.1.2.min.js',
'scripts/vendor/breeze.debug.js',
'scripts/vendor/go-debug.js',
'scripts/vendor/jqx-all.js',
'templates/*.tmpl.html',
'scripts/app.js',
'scripts/**/**/*.js',
'tests/unit/modelMetadata.js',
'tests/unit/solutionMetadata.js',
'tests/unit/testUtils/*.js',
'tests/unit/**/**/*.js'
],
proxies: {
'/styles': 'http://localhost:9876/styles/images',
'/scripts': 'http://localhost:9876/scripts/modules/ironPython'
},
autoWatch : true,
frameworks: ['jasmine'],
browsers : ['Chrome'/*, 'IE'*/], //, 'Firefox'
plugins : [
'karma-coverage',
'karma-chrome-launcher',
//'karma-firefox-launcher',
//'karma-ie-launcher',
'karma-jasmine',
//'karma-teamcity-reporter',
'karma-ng-html2js-preprocessor'
],
reporters: ['progress', 'coverage'],
ngHtml2JsPreprocessor: {
moduleName: 'templates'
},
coverageReporter: {
type : 'html',
// where to store the report
dir : 'coverage/'
}
});
};