0.4.3 • Published 5 years ago

karma-trx-reporter v0.4.3

Weekly downloads
5,089
License
MIT
Repository
github
Last release
5 years ago

karma-trx-reporter

Reporter for the VisualStudio TRX format.

Status

BranchStatus
masterBuild Status
developBuild Status

Installation

The easiest way is to keep karma-trx-reporter as a devDependency in your package.json.

{
  "devDependencies": {
    "karma": "~0.10",
    "karma-trx-reporter": "~0.1"
  }
}

You can simple do it by:

npm install karma-trx-reporter --save-dev

Configuration

// karma.conf.js
module.exports = function(config) {
  config.set({
    plugins: [
      ...
      require('karma-trx-reporter')
    ],
    
    reporters: ['progress', 'trx'],

    // the default configuration
    trxReporter: {
      outputFile: 'test-results.trx',
      shortTestName: false
    }
  });
};

outputFile

The output file specifies where the trx file will be written.

shortTestName

The trx reporter will attend the browser name to the test name by default. This can be switched off with the shortTestName config property.

nameFormatter

You can provide a custom function to format the testName field of the trx. The nameFormatter is a function with parameters (browser, result) which returns a string. When shortTestName is true, nameFormatter is ignored.

You can pass list of reporters as a CLI argument too:

karma start --reporters trx,dots

For more information on Karma see the homepage.

0.4.3

5 years ago

0.4.2

5 years ago

0.4.1

5 years ago

0.4.0

5 years ago

0.3.0

6 years ago

1.0.0-alpah3

8 years ago

1.0.0-alpah2

8 years ago

1.0.0-alpah1

8 years ago

0.2.9

8 years ago

0.2.8

8 years ago

0.2.7

8 years ago

0.2.6

9 years ago

0.2.5

9 years ago

0.2.4

10 years ago

0.2.3

10 years ago

0.2.2

10 years ago

0.2.0

10 years ago

0.1.0

10 years ago