🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

cucumber-to-junit

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cucumber-to-junit

Converts [Cucumber.js](https://github.com/cucumber/cucumber-js) json results files to JUnit XML.

0.1.3
latest
Source
npm
Version published
Weekly downloads
5.7K
-3.64%
Maintainers
1
Weekly downloads
 
Created
Source

Overview

Converts Cucumber.js json results files to JUnit XML.

Useful for reporting tests in Azure DevOps or Jenkins etc.

Installation

To install the latest version, run:

npm i cucumber-to-junit --save

Usage

Typescript / ES6:

import { CucumberConverter } from 'cucumber-to-junit';

const converter = new CucumberConverter({
  markUndefinedAsFailed: true // undefined scenario steps will fail the test case
});

converter.convertToJunit('path/to/cucumber.json', 'path/to/output.xml');

JavaScript / CommonJS

const { CucumberConverter } = require('cucumber-to-junit');

const converter = new CucumberConverter({
  markUndefinedAsFailed: true // undefined scenario steps will fail the test case
});

converter.convertToJunit('path/to/cucumber.json', 'path/to/output.xml');

Development

To run the project:

npm start # or yarn start

This builds to /dist and runs the project in watch mode so any edits you save inside src causes a rebuild to /dist.

To do a one-off build, use npm run build or yarn build.

To run tests, use npm test or yarn test.

License

MIT

Changelog

0.1.3

  • Update documentation

0.1.2

  • Bug fixes

0.1.1

  • Bug fixes

0.1.0

  • Initial release

Keywords

cucumber

FAQs

Package last updated on 07 May 2021

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