Skip to content
Back to skills

Acceptance Test Driven Development

ASecurity

Write acceptance tests before unit tests to ensure you're building the right thing

  • 57 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added October 17, 2026
testing

Security analysis

A100/100

Scanned October 17, 2026

npx -y skills add diegosouzapw/awesome-omni-skill --skill acceptance-test-driven-development --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Acceptance Test Driven Development?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Acceptance Test Driven Development
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/diegosouzapw-acceptance-test-driven-development/badge)](https://www.skillsdirectory.com/skills/diegosouzapw-acceptance-test-driven-development)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: acceptance-test-driven-development
description: Write acceptance tests before unit tests to ensure you're building the right thing
globs: "**/*.ts,**/*.tsx,**/*.js,**/*.jsx"
---

# Acceptance Test-Driven Development (ATDD)

## Workflow

ATDD extends TDD by adding an outer acceptance test loop:

1. **Write an acceptance test** that describes the desired behavior from the user's perspective
2. **Run it — it should fail** (the feature doesn't exist yet)
3. **Enter the TDD inner loop:**
   - Write a failing unit test (RED)
   - Write minimal code to pass (GREEN)
   - Refactor (REFACTOR)
   - Repeat until the acceptance test passes
4. **Verify the acceptance test passes** — the feature is complete

## Acceptance Test Patterns

Acceptance tests should be named with these patterns:
- `*.acceptance.test.ts` — acceptance/integration tests
- `*.e2e.test.ts` — end-to-end tests

## Key Principles

- **Acceptance tests describe WHAT**, not HOW — they test observable behavior
- **Unit tests describe HOW** — they test internal mechanics
- **Write acceptance tests in the language of the user/stakeholder**
- **One acceptance test per user story or feature**
- **Multiple unit tests per acceptance test** — the inner TDD loop

## Example Workflow

```
Feature: User registration

1. Write acceptance test: user-registration.acceptance.test.ts
   - Test: "User can register with email and password"
   - Test: "Registration fails with duplicate email"
   - Run → FAIL (no registration endpoint)

2. TDD inner loop:
   a. Unit test: validate-email.test.ts → RED → implement → GREEN
   b. Unit test: hash-password.test.ts → RED → implement → GREEN
   c. Unit test: create-user.test.ts → RED → implement → GREEN
   d. Unit test: registration-handler.test.ts → RED → implement → GREEN

3. Run acceptance test → PASS → Feature complete!
```

## Anti-Patterns to Avoid

- ❌ Writing unit tests without an acceptance test that frames the feature
- ❌ Writing acceptance tests that test implementation details
- ❌ Skipping the acceptance test because "it's a small feature"
- ❌ Writing all acceptance tests upfront (write them one feature at a time)

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.