Jump to content

Connect Leeroopedia MCP: Equip your AI agents to search best practices, build plans, verify code, diagnose failures, and look up hyperparameter defaults.

Principle:Nightwatchjs Nightwatch Cucumber Test Execution

From Leeroopedia
Knowledge Sources
Domains Testing, BDD, CLI
Last Updated 2026-02-12 00:00 GMT

Overview

A CLI execution pattern for running Cucumber BDD tests with Nightwatch, supporting tag filtering, parallel execution, and Cucumber-specific formatters.

Description

Cucumber Test Execution runs BDD tests via the Nightwatch CLI with a Cucumber-specific configuration file. The execution pipeline loads the Cucumber runner, discovers feature files, matches steps to definitions, and executes them with the Nightwatch browser integration. Cucumber-specific options like --tags, --format, --dry-run, and --fail-fast are available.

Note that Nightwatch's built-in reporters (JUnit, HTML) are NOT available when using the Cucumber runner. Instead, Cucumber's own formatters (progress, JSON, JUnit) are used.

Usage

Run Cucumber tests from the CLI specifying the Cucumber-specific config file. Use tags to filter scenarios and formatters for output customization.

Theoretical Basis

The Cucumber execution pipeline:

  1. Load config with test_runner.type = 'cucumber'
  2. Discover .feature files via feature_path
  3. Parse Gherkin into scenario objects
  4. Match steps to registered step definitions
  5. Execute each step with browser commands
  6. Format output via Cucumber formatters

Related Pages

Implemented By

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment