bdd-writing

Write BDD specifications using Gherkin syntax, feature files, and step definitions.

Updated Mar 30, 2026
One-click install
npx skills add https://github.com/rubrical-works/idpf-praxis-skills --skill bdd-writing-rubrical-works
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: bdd-writing
Source: https://github.com/rubrical-works/idpf-praxis-skills/tree/main/Skills/bdd-writing
Command: npx skills add https://github.com/rubrical-works/idpf-praxis-skills --skill bdd-writing-rubrical-works

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Teams struggle to bridge the gap between business requirements and executable tests, leading to miscommunication between technical and non-technical stakeholders. This Skill provides structured guidance for writing behavior-driven development specifications that serve as both documentation and automated tests. ## Core Features & Use Cases - Gherkin Syntax Reference: Complete coverage of Feature, Scenario, Given/When/Then, Background, Scenario Outline, Data Tables, Doc Strings, Tags, and Rule keywords. - Step Definition Patterns: Ready-to-use examples for Cucumber.js (JavaScript), pytest-bdd (Python), and Cucumber-JVM (Java), including hooks, fixtures, and state sharing. - Tool Selection Guidance: Comparison of Cucumber.js, pytest-bdd, Behave, SpecFlow, Karate, and RSpec with selection flowcharts by language and use case. - Use Case: A QA engineer needs to automate acceptance tests for a shopping cart feature. Use this Skill to write a Gherkin feature file with scenario outlines for discount codes, then implement matching step definitions in pytest-bdd. ## Quick Start Ask the AI to write a Gherkin feature file with scenarios and step definitions for user login using Cucumber.js.

Frequently Asked Questions about bdd-writing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write a Gherkin feature file for BDD testing?▼

Start with a Feature keyword describing the functionality, add a Background for shared preconditions, then write Scenarios using Given for preconditions, When for actions, and Then for expected outcomes. Keep scenarios to 3-7 steps and use business language rather than technical jargon.

What is the difference between Scenario and Scenario Outline in Gherkin?▼

A Scenario tests a single case with fixed values, while a Scenario Outline is a parameterized template using placeholders like <username> combined with an Examples table. Use Scenario Outline for data-driven tests covering multiple input combinations.

Cucumber.js vs pytest-bdd: which BDD tool should I use?▼

Choose Cucumber.js for JavaScript or TypeScript projects, especially with Playwright or Puppeteer. Choose pytest-bdd for Python projects already using pytest, since it integrates with pytest fixtures, coverage, and parallel execution plugins.

How do I run only specific tagged scenarios in Cucumber?▼

Use tag expressions on the command line, such as cucumber-js --tags "@smoke" or cucumber-js --tags "@smoke and not @wip". For pytest-bdd, use pytest -m "smoke" with markers mapped to your Gherkin tags.

What are common BDD anti-patterns to avoid?▼

Avoid UI-focused steps like clicking specific button IDs, scenarios with more than 10 steps, coupled steps that pass variables between each other, and inconsistent terminology. Write declarative steps focused on behavior, such as "When I submit my order" instead of UI mechanics.

How does BDD combine with TDD in a development workflow?▼

Use the double-loop approach: write a failing BDD scenario as the outer loop, then apply the TDD inner loop of RED (failing unit test), GREEN (minimal code), and REFACTOR. Repeat the inner loop until the acceptance scenario passes, then move to the next scenario.