bdd-gherkin-testing
Skill1 starsChanged 54 days agoMITView on GitHub
Use when writing or automating behavior-driven development (BDD) specs — Gherkin Given/When/Then, Cucumber, SpecFlow, Behave, pytest-bdd, Playwright-BDD, example mapping, living documentation, and fixing brittle or imperative feature files.
In this repository98 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- 42crunch-api-security-testingSkill
- a-b-testingSkill
- acceptance-testingSkill
- accessibility-testingSkill
- ai-agent-evaluationSkill
- ai-code-securitySkill
- ai-ml-testingSkill
- analytics-tracking-testingSkill
- api-testingSkill
- authn-authz-testingSkill
- autonomous-qa-orchestrationSkill
- blockchain-smart-contract-testingSkill
- bug-reportingSkill
- chaos-resilience-testingSkill
- chatbot-voice-agent-testingSkill
- cicd-testingSkill
- cli-testingSkill
- cloud-infrastructure-testingSkill
- code-coverage-analysisSkill
- compatibility-testingSkill
- compliance-testingSkill
- concurrency-race-condition-testingSkill
- configuration-feature-flag-testingSkill
- contract-testingSkill
- cross-browser-testingSkill
- database-testingSkill
- data-migration-testingSkill
- data-pipeline-etl-testingSkill
- date-time-timezone-testingSkill
- desktop-app-testingSkill
- disaster-recovery-backup-testingSkill
- e2e-testingSkill
- email-notification-testingSkill
- event-driven-messaging-testingSkill
- exploratory-testingSkill
- flaky-test-managementSkill
- functional-testingSkill
- fuzz-testingSkill
- game-testingSkill
- graphql-testingSkill
- iac-container-security-testingSkill
- installation-upgrade-testingSkill
- integration-testingSkill
- iot-embedded-testingSkill
- llm-security-auditSkill
- llm-testingSkill
- localization-testingSkill
- manual-testingSkill
- mcp-testingSkill
- memory-leak-resource-testingSkill
- microservices-testingSkill
- mobile-testingSkill
- mutation-testingSkill
- observability-testingSkill
- payment-ecommerce-testingSkill
- performance-testingSkill
- production-monitoring-synthetic-testingSkill
- property-based-testingSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 40
Use Background only for context every scenario needs and that is short.
- Very specific: line 41
Use Scenario Outline + Examples for data variation.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
BDD & Gherkin
BDD is a collaboration practice first, a test tool second. Feature files are executable specifications that product, dev and QA agree on before coding (the "three amigos").
Discovery: Example Mapping (25 min per story)
Cards: Story (yellow) → Rules (blue) → Examples (green) → Questions (red). If red cards outnumber green, the story is not ready. Each green card becomes one scenario.
Write declarative, not imperative
# BAD — imperative, UI-coupled, brittle
Scenario: Login
Given I open "https://app.test/login"
When I type "ann@x.com" into "#email"
And I click "#submit"
Then I see the element ".dashboard"
# GOOD — declarative, business language
Feature: Account access
Rule: Locked accounts cannot sign in
Scenario: Locked customer is told how to recover
Given Ann's account was locked after 5 failed attempts
When Ann signs in with the correct password
Then she is told the account is locked
And she is offered a password-reset linkGherkin rules of thumb
- One behavior per scenario; 3–7 steps; Given = state, When = one action, Then = observable outcome.
- Use
Backgroundonly for context every scenario needs and that is short. - Use
Scenario Outline+Examplesfor data variation; name example columns meaningfully. - Tag for selection:
@smoke @regression @wip @slow @api @ui. Run subsets with--tags. - No
Andchains inWhen; no assertions inGiven; no implementation words (click, table, id).
Tooling quick start
| Stack | Tool | Run |
| JS/TS | @cucumber/cucumber, playwright-bdd | npx cucumber-js --tags "@smoke and not @wip" |
| Python | behave, pytest-bdd | behave --tags=@smoke / pytest -m smoke |
| Java | Cucumber-JVM + JUnit 5 | mvn test -Dcucumber.filter.tags="@smoke" |
| .NET | Reqnroll / SpecFlow | dotnet test --filter Category=smoke |
| Ruby | Cucumber | cucumber --tags @smoke |
Step definitions stay thin: parse → call a domain/driver layer (API client or page object) → assert. Never put business logic in steps. Share state via a per-scenario World/context object, never globals.
Living documentation
Publish results (Cucumber HTML/JSON report, Allure, Serenity) so business readers see which rules are passing. A failing scenario should read as a business sentence.
Anti-patterns
- Feature files written by QA alone after the code ships (BDD as "Selenium with English").
- Scenarios per UI screen; hundreds of near-duplicates; steps like
I click the 3rd button. - Assertions on internals (DB rows) when an observable outcome exists.
- Slow suites: run most rules at API/service level; keep UI scenarios to critical journeys (
e2e-testing).
Related skills
acceptance-testing, test-design-techniques, e2e-testing, api-testing, test-automation
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

