karma-tfs-reporter

1.0.2 • Public • Published

karma-tfs-reporter

A Karma plugin for reporting test results to TFS.

usage

Add the karma-tfs-reporter to your project:

npm install --save karma-tfs-reporter

Example karma.conf.js (view the sample project):

module.exports = function (config) {
    config.set({
        frameworks: ['jasmine'],
        files: [
            './src/*.spec.js',
            './src/**/*.spec.js'
        ],
        plugins: [
            require('karma-jasmine'),
            require('karma-webpack'),
            require('karma-phantomjs-launcher'),
            require('karma-tfs-reporter')
        ],
        preprocessors: {
            './src/*.spec.js': ['webpack'],
            './src/**/*.spec.js': ['webpack']
        },
        webpack: {
        },
        webpackMiddleware: {
            stats: 'errors-only'
        },
        browsers: ['PhantomJS'],
        reporters: ['progress', 'tfs'],
        // Default settings (optional)
        tfsReporter: {
            outputDir: 'testresults',
            outputFile: 'testresults_${date}.xml'
        }
    })
}

Setup the build steps in TFS:

build-steps

See the results:

test-results

Package Sidebar

Install

npm i karma-tfs-reporter

Weekly Downloads

1,716

Version

1.0.2

License

MIT

Unpacked Size

10.2 kB

Total Files

5

Last publish

Collaborators

  • sgbj