Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cucumberjs-junitxml

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cucumberjs-junitxml

Provide a cucumber-js support file and json2xml converter to generate JUnitXML file for CI

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
7.9K
increased by0.42%
Maintainers
1
Weekly downloads
 
Created
Source

Cucumberjs-junitxml

If your result.json cannot be consumed by cucumber-junit, you may want to use this package to output better json result and generate JUnitXML file for CI.

Install

  1. Copy reporter/reporter.js to your cucumber support folder

  2. Configure the options parameter as shown below. If unimplemented steps should be reported as a failure, set strict: true, otherwise set it to false:

var xml = junit(JSON.stringify(testResult), { indent: '    ', strict: true });
  1. Cucumberjs-junitxml should be added to your test codebase as a dev dependency. You can do this with:
$ npm install cucumberjs-junitxml --save-dev 

Alternatively you can manually add it to your package.json file:

{
  "devDependencies" : {
    "cucumberjs-junitxml": "latest"
  }
}

then install with:

$ npm install --dev

Run

Run your cucumber-js command. The reports should be saved to tests/features/output/

$ ./node_modules/.bin/cucumber.js

And you can manually convert your json to xml by

$ cat cucumber_report.json | ./node_modules/.bin/cucumber-junit > cucumber_report.xml

License

MIT

Keywords

FAQs

Package last updated on 16 Nov 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc