JSPM

@serenity-js/cucumber

2.11.4
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 9754
  • Score
    100M100P100Q143051F
  • License Apache-2.0

Serenity/JS adapter for Cucumber test runners version 1.x - 6.x

Package Exports

  • @serenity-js/cucumber
  • @serenity-js/cucumber/lib/cli

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@serenity-js/cucumber) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Serenity/JS

Serenity/JS is a Node.js library designed to make acceptance and regression testing of modern full-stack applications faster, more collaborative and easier to scale.

Serenity/JS Cucumber

The @serenity-js/cucumber module contains a set of adapters that can be registered with Cucumber CLI runner to enable integration and reporting between Cucumber and Serenity/JS.

Please note: To use Cucumber and Serenity/JS to execute web-based acceptance tests, you should register the Cucumber adapter via the Protractor configuration file. Learn more.

Installation

npm install --save-dev @serenity-js/core @serenity-js/cucumber cucumber

Configuration

When used with a configuration file written in JavaScript:

// features/support/setup.js

const { configure } = require('@serenity-js/core');

configure({
    // ... configure Serenity/JS 
});

When used with a configuration file written in TypeScript:

// features/support/setup.ts

import { configure } from '@serenity-js/core';

configure({
    // ... configure Serenity/JS 
});

Command line usage

Cucumber versions 1 and 2

cucumber-js --require=node_modules/@serenity-js/cucumber/lib/index.js \
    --require ./features/support/setup.js \
    --require ./features/step_definitions/sample.steps.js 

Cucumber versions 3 and above

cucumber-js --format node_modules/@serenity-js/cucumber \
    --require ./features/support/setup.js \
    --require ./features/step_definitions/sample.steps.js