1.2.1 • Published 6 years ago

jasmine-xml-reporter v1.2.1

Weekly downloads
3,461
License
MIT
Repository
github
Last release
6 years ago

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/
1.2.1

6 years ago

1.2.0

6 years ago

1.1.0

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago