A Karma plugin for reporting test results to VSTS


1.3.03 years ago3 years agoMinified + gzip package size for @dhigroup/karma-vsts-reporter in KB


Karma VSTS Reporter

npm version

A Karma plugin for reporting test results to Visual Studio Team Services (VSTS).

Getting started

Add the karma-vsts-reporter to your project:

npm i @dhigroup/karma-vsts-reporter -D

Example karma.conf.js:

module.exports = function (config) {
    frameworks: ['jasmine'],
    files: [
    plugins: [
    preprocessors: {
      './src/*.spec.js': ['webpack'],
      './src/**/*.spec.js': ['webpack']
    webpack: {
    webpackMiddleware: {
      stats: 'errors-only'
    browsers: ['ChromeHeadless'],
    reporters: ['progress', 'vsts'],

    // Default settings (optional)
    vstsReporter: {
      outputDir: 'coverage-vsts',
      outputFile: 'coverage-${date}.xml'

Setup the build steps in VSTS:

build setup

Run your build, then you should see: build summary


Contributions are welcome.

Here's a small guide on how to do it:

  • create a branch from master
  • (do changes)
  • run npm test to make sure tests still pass
  • run npm run format to format your code
  • commit your changes on that branch
  • make a pull request

We'll then review it and accept if all looks good :)

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.