mardi 13 septembre 2016

Karma disconnects before all tests run

We are using karma as the test runner for jasmine unit tests, testing an Angular application. We have over 6000 tests. Karma is so slow to run tests, and never gets past about 2700 tests (11 mins).

Is there a limit to the number of tests Karma can run, or is it normal for the performance of the test runner to degrade so much as the number of tests increase?

// Karma Config file
module.exports = function(config) {
  config.set({
    basePath: '../',
    frameworks: ['jasmine'],
    files: [
       ...list of files
    ],
    proxies: {
        '/images/': '/base/src/client/images/',
    },
    exclude: [
      'src/client/app/window/window.js'
    ],
    preprocessors: {
      '**/*.partial.html': ['ng-html2js']
    },
    reporters: ['progress'],
    port: 9876,
    colors: true,
    logLevel: config.LOG_INFO,
    autoWatch: false,
    browsers: ['Chrome'],
    singleRun: true,
    concurrency: Infinity,
    browserNoActivityTimeout: 100000,
    plugins: [
      'karma-jasmine',
      'karma-chrome-launcher',
      'karma-phantomjs-launcher',
      'karma-firefox-launcher',
      'karma-ie-launcher',
      'karma-ng-html2js-preprocessor'
    ],
    ngHtml2JsPreprocessor: {
      moduleName: 'templates',
      stripPrefix: 'src/client'
      }
  })
}

Aucun commentaire:

Enregistrer un commentaire