Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

cucumber-junit-formatter

mvtm-dn15.8kMIT0.2.2

Cucmber.js junit xml formatter

cucumber, junit, xml, test, testing, cucumber-js, ci/cd

readme

cucumber-junit-formatter

Build Status Coverage Status

Cucumber.js formatter that produced valid junit XML file for Jenkins/GitLab CI/CD and so on.

Based on cucmber-pretty and cucmber-junit. 'pending' or 'undefined' steps will be reported in xml as failures.

Installation

npm install --save-dev cucumber-junit-formatter

Use

cucumber-js -f node_modules/cucumber-junit-formatter[:<output-file>]

Configuration

You can configure formatter via --format-options <JSON-OPTIONS>:

parameter default value Description
scenarioAsStep false If set to true means that feature is an testsuite and scenario is a step in test suite. Default value false (means that scenario is testsuite)
withPackage false If set then formatter add package attribute to testsuite element. Default value false.
propertiesInTestcase false Add <properties...> to <testcase...>. Works only with scenarioAsStep=true

References

changelog

Changelog

All notable changes to this project will be documented in this file.

[0.2.2] - 2019-12-10

Added

  • Added missed implementation of 'withPackage' option for v6 code

    Fixed

  • Duration values in v6 code. From version 6 duration in nanoseconds, not milliseconds

[0.2.1] - 2019-12-10

Added

  • On node 8.x works only with babel. Fixed.
  • Added missing file in package.

[0.2.0] - 2019-12-10

Added

  • cucmber version 6 support

[0.1.3] - 2019-03-25

Added

  • <properties...> in <testcase...> (configurable). Thanks to @kschillz
  • this file

Fixed

  • typo in scenarioAsSuite. Thanks again to @kschillz

Removed

  • obsolte .npmignore