bdd-best-practices

Provide BDD best practices for structuring Gherkin scenarios and test pyramid adherence.

1|Updated Mar 5, 2026
One-click install
npx skills add https://github.com/baphled/dotopencode --skill bdd-best-practices
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: bdd-best-practices
Source: https://github.com/baphled/dotopencode/tree/main/skills/bdd-best-practices
Command: npx skills add https://github.com/baphled/dotopencode --skill bdd-best-practices

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps teams write clearer, more maintainable, and business-focused executable specifications using Behaviour-Driven Development (BDD) principles, bridging the gap between business and technical stakeholders.

Core Features & Use Cases

  • Gherkin Best Practices: Learn to write effective Given/When/Then scenarios.
  • Test Pyramid Guidance: Understand where BDD fits within your testing strategy.
  • Anti-pattern Identification: Avoid common pitfalls that lead to brittle tests.
  • Use Case: When defining a new user registration flow, use this skill to ensure the scenarios are outcome-oriented and understandable by product owners, testers, and developers alike.

Quick Start

Follow the core principles to refine your Gherkin scenarios for better clarity and maintainability.

Frequently Asked Questions about bdd-best-practices

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

FAQPage Schema
How do I write better BDD specifications using Gherkin?

To write better BDD specifications, structure Gherkin scenarios with clear Given/When/Then steps that focus on business outcomes. Encapsulate step definitions properly to ensure executable specifications remain maintainable and understandable by both technical and business stakeholders.

What are common BDD anti-patterns that make executable specifications brittle?

Common BDD anti-patterns include writing scenarios that focus on UI interactions rather than business logic, leaking implementation details into Gherkin steps, and ignoring test pyramid guidelines. These practices create brittle tests that fail to bridge communication between developers and product owners.

How does BDD fit into an overall test pyramid strategy?

BDD fits into the test pyramid by defining high-level, outcome-oriented executable specifications that validate business rules. These scenarios should guide development without replacing lower-level unit tests, ensuring your testing strategy remains balanced and maintainable across the application stack.

What is the best way to structure BDD scenarios for user registration flows?

The best way to structure BDD scenarios for user registration is to define outcome-oriented Given/When/Then steps that clearly express business rules. This ensures the executable specifications are easily understood by product owners, testers, and developers collaborating on the feature.

Can I use BDD specifications to bridge communication between business and technical teams?

Yes, BDD specifications bridge business and technical communication by using clear, outcome-oriented examples written in Gherkin. This shared vocabulary ensures developers, testers, and product owners collaborate effectively on defining maintainable executable specifications.

When should I not use BDD for my testing strategy?

You should avoid BDD when scenarios become overly focused on low-level technical implementation rather than business outcomes, or when steps cannot be properly encapsulated. If your tests require excessive UI coupling, the resulting executable specifications will be brittle and hard to maintain.