jasmine-xml-reporter

1.2.1 • Public • Published

Jasmine XML Reporter

This module adds the --junitreport and --output command-line params to Jasmine 2 npm module (jasmine).

Jasmine 2 npm module lost 2 features when compared with jasmine-node (no more maintained):

  • ability to provide results in JUnit XML format (using the --junitreport param);
  • an option to specify an output dir while running from the command line (--output param).

This module uses jasmine-reporters module to generate the JUnit XML report (when --junitreport param is present) and, optionally, place the generated files at folder specified by --output param.

Install

Simple as any node module:

npm install jasmine-xml-reporter

Usage

To run tests with command line output only (default behavior, same as use jasmine directly):

./node_modules/jasmine-xml-reporter/bin/jasmine.js

To run tests and generate a JUnit XML report:

./node_modules/jasmine-xml-reporter/bin/jasmine.js --junitreport

To run tests, generate a JUnit XML report and place the output in a specific folder:

./node_modules/jasmine-xml-reporter/bin/jasmine.js --junitreport --output=shippable/testresults/

Additionally you can specify the output file prefix name (default output file is results.xml, so you can change the results prefix):

./node_modules/jasmine-xml-reporter/bin/jasmine.js --junitreport --output=shippable/testresults/ --filePrefix=myTestResults

If npm test is already an alias to ./node_modules/jasmine-xml-reporter/bin/jasmine.js, then run with:

npm test -- --junitreport --output=shippable/testresults/

Readme

Keywords

none

Package Sidebar

Install

npm i jasmine-xml-reporter

Weekly Downloads

3,174

Version

1.2.1

License

MIT

Unpacked Size

5.79 kB

Total Files

6

Last publish

Collaborators

  • raelgc