bdd-testing
Skill10 starsChanged 4 months agoMITView on GitHub
Write and maintain Behavior-Driven Development tests with Gherkin and Cucumber. Use when defining acceptance scenarios, writing feature files, implementing step definitions, running Three Amigos sessions, or diagnosing BDD test quality issues. Keywords: bdd, gherkin, cucumber, given when then, feature files, step definitions, acceptance criteria, three amigos, example mapping.
In this repository86 other files it gives its agents.
- AGENTS.mdAGENTS.md
- skills/agentic-harness/skill-quality-auditor/AGENTS.mdAGENTS.md
- skills/development/biome-complete/AGENTS.mdAGENTS.md
- skills/development/bun-development/AGENTS.mdAGENTS.md
- skills/development/commanderjs/AGENTS.mdAGENTS.md
- skills/documentation/markdown-authoring/AGENTS.mdAGENTS.md
- skills/package-mgmt/mise-complete/AGENTS.mdAGENTS.md
- skills/testing/bdd-testing/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- agents-mdSkill
- cache-auditSkill
- context-radar-auditSkill
- create-contextSkill
- guided-interviewSkill
- handover-document-creatorSkill
- load-contextSkill
- pick-modelSkill
- pinSkill
- professional-honestySkill
- rules-managementSkill
- save-contextSkill
- session-reflectionSkill
- skill-quality-auditorSkill
- socratic-methodSkill
- vault-captureSkill
- vault-consolidateSkill
- vault-fetchSkill
- vault-searchSkill
- bird-fortune-political-satireSkill
- brooker-esque-media-satireSkill
- clarke-dawe-esqueSkill
- comedy-style-skill-generatorSkill
- cunk-esque-mockumentarySkill
- gervais-esque-cringe-satireSkill
- monty-python-esqueSkill
- pryor-esque-confessional-standupSkill
- rock-esque-observational-standupSkill
- biome-completeSkill
- bun-developmentSkill
- commanderjsSkill
- adr-creatorSkill
- conventional-commitsSkill
- humanizerSkill
- journal-entry-creatorSkill
- journal-entry-importSkill
- markdown-authoringSkill
- mermaid-diagramsSkill
- plain-englishSkill
- professional-communicationSkill
- sop-structureSkill
- logql-generatorSkill
- mise-completeSkill
- context-indexSkill
- create-context-fileSkill
- follow-upSkill
- goal-trackerSkill
- nasa-pm-lessonsSkill
- plan-createSkill
- plan-executeSkill
- plan-reviewSkill
- The first 60 shown.
The file
Show its rules and text
We split this skill into the rules it gives an agent
13 rules. About 0 are common, 10 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈10
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 10
Use this skill when behavior needs to be specified and validated in shared, business-readable scenarios.
- Distinctive: line 14
Do not use BDD feature files for low-level unit behavior that is internal and not stakeholder-facing.
- Distinctive: line 19
Keep a shared language across product, engineering, and QA.
- Very specific: line 26
Write scenarios in Gherkin using Given/When/Then.
- Distinctive: line 29
Validation checkpoint: If scenarios fail due to incorrect business logic, loop back to step 2 to clarify requirements.
- Distinctive: line 30
Validation checkpoint: If scenarios fail due to step definition errors or missing steps, loop back to step 3 to fix implementation.
- Very specific: line 31
Error recovery: Run npx cucumber-js --dry-run to identify missing step definitions before full execution.
- Distinctive: line 81
Check that step definitions return or await promises.
- Very specific: line 83
Pattern: Ensure async functions use await for all asynchronous calls.
- Distinctive: line 97
Use business-facing language in feature files.
- Distinctive: line 98
Keep each scenario focused on one behavior.
- Distinctive: line 99
Avoid cross-scenario state coupling.
- Distinctive: line 104
Prefer explicit examples over abstract wording.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 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 Testing
When to Use
Use this skill when behavior needs to be specified and validated in shared, business-readable scenarios.
When Not to Use
Do not use BDD feature files for low-level unit behavior that is internal and not stakeholder-facing.
Core Principles
- Specify observable behavior, not implementation details.
- Keep a shared language across product, engineering, and QA.
- Scenarios should be deterministic and independently executable.
- Feature files should remain readable by non-developers.
Deterministic Workflow
- Align on examples in a Three Amigos discussion.
- Write scenarios in Gherkin using Given/When/Then.
- Implement step definitions that map to business language.
- Execute Cucumber and review failures by scenario intent.
- Validation checkpoint: If scenarios fail due to incorrect business logic, loop back to step 2 to clarify requirements.
- Validation checkpoint: If scenarios fail due to step definition errors or missing steps, loop back to step 3 to fix implementation.
- Error recovery: Run
npx cucumber-js --dry-runto identify missing step definitions before full execution. - Error recovery: For async timing issues, verify step definitions properly await promises.
- Refactor scenarios and steps to remove duplication.
Quick Commands
Run all feature tests
npx cucumber-js featuresExpected result: scenario pass/fail summary and non-zero exit on failures.
Dry-run to detect missing step definitions
npx cucumber-js --dry-run featuresExpected result: undefined steps listed without full execution.
Run a tagged subset
npx cucumber-js --tags "@smoke and not @wip"Expected result: only matching scenarios execute.
Generate JSON report
npx cucumber-js --format json:reports/cucumber-report.jsonExpected result: machine-readable execution report for CI/reporting.
Troubleshoot common Cucumber failures
Step definition mismatch:
npx cucumber-js --dry-run featuresExpected result: lists undefined steps that need implementation or have mismatched patterns.
Async timing issues:
Check that step definitions return or await promises. Steps that don't wait for async operations will complete before actions finish.
Pattern: Ensure async functions use await for all asynchronous calls.
Evaluate this skill quality
sh skills/agentic-harness/skill-quality-auditor/scripts/evaluate.sh bdd-testing --jsonExpected result: updated quality dimensions and grade.
Constraints
Hard Constraints
- Use business-facing language in feature files.
- Keep each scenario focused on one behavior.
- Avoid cross-scenario state coupling.
Soft Constraints
- Scenario count per feature should stay manageable.
- Prefer explicit examples over abstract wording.
- Reuse step phrases only when semantics are identical.
Anti-Patterns
NEVER encode implementation details in Gherkin steps
WHY: Implementation-centric steps break when internals change.
BAD: When I click the submit button and call validateForm()
GOOD: When I submit the form
Consequence: Scenarios become brittle and unreadable to stakeholders.
NEVER skip Three Amigos before writing key scenarios
WHY: Missing perspectives create ambiguous or incomplete acceptance behavior.
BAD: Engineering writes scenarios alone from assumptions. GOOD: Product, QA, and engineering align on examples first.
Consequence: Rework increases and acceptance disputes appear late.
NEVER use vague Then steps without observable outcomes
WHY: Unverifiable outcomes cannot fail meaningfully.
BAD: Then it should work correctly
GOOD: Then I should see "Order confirmed"
Consequence: Tests pass without validating user-visible behavior.
NEVER couple scenarios with ordering dependencies
WHY: Scenario order dependence creates flaky suites.
BAD: Scenario B assumes data created by scenario A. GOOD: Each scenario creates or mocks its own prerequisites.
Consequence: Parallel runs and CI become unstable.
References
references/principles-core-philosophy.mdreferences/gherkin-syntax.mdreferences/principles-three-amigos.mdreferences/principles-example-mapping.mdreferences/cucumber-setup.md
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.

