Agile Testing

ATDD (Acceptance Test-Driven Development)

A collaborative practice where the team defines acceptance tests from the user's perspective before development begins, ensuring shared understanding of requirements.

Junior Senior Test Lead

What it is

ATDD is a collaborative requirements practice where the whole team—business stakeholders, developers, and testers—work together to define acceptance criteria as concrete, testable examples before any code is written. These examples are then automated and become the living acceptance test suite.

The practice is often framed around The Three Amigos:

  • Business (Product Owner / BA) — clarifies the problem, desired outcomes, and business rules.
  • Development — identifies technical constraints, implementation approach, and edge cases.
  • Testing — probes for ambiguity, missing scenarios, and risks from a quality perspective.

By the end of a Three Amigos session, the team has a shared set of acceptance criteria written as executable examples. These examples are automated (often using Gherkin syntax and tools like SpecFlow or Cucumber), run in CI, and operationalise the team's Definition of Done.

Tip: ATDD is not just "testing first." It is a requirements-discovery technique. The tests serve as a contract between business intent and implementation.

When to use it

OccasionWhy ATDD helps
Story refinement / backlog groomingClarify acceptance criteria before sizing; expose hidden complexity early.
Before development startsPrevents rework caused by misunderstood requirements.
When onboarding new team membersExecutable specs document intent better than static requirements.
Regulated or compliance-heavy projectsProvides auditable traceability from requirement to test.

Key concepts

ConceptDescription
The Three AmigosA structured conversation between business, development, and testing to reach shared understanding before implementation.
Gherkin FormatGiven / When / Then syntax that bridges natural language with automation. Readable by non-technical stakeholders.
Executable SpecificationsAcceptance criteria written as automated tests that run in CI and always reflect the current system behaviour.
Living DocumentationThe automated test suite becomes up-to-date documentation that evolves with the codebase.

Common pitfalls

PitfallHow to avoid it
Writing tests without business involvementAlways include the Product Owner or BA in Three Amigos. If they can't attend, defer the story.
UI-specific tests that break on every layout changeWrite acceptance tests at the business-rule layer (API or service level) where possible.
Focusing on tooling before requirementsStart with conversation and examples. Tooling comes after the team understands what to build.
Treating ATDD as a testing activity onlyIt is a whole-team practice. Developers must be involved in writing and maintaining the specs.
Too many acceptance testsFocus on the "happy path" and critical edge cases. Don't exhaustively cover what unit tests should catch.
Warning: Automated acceptance tests at the UI layer are notoriously brittle. Prefer testing through APIs or domain layers, and reserve UI automation for critical user journeys.

NZ context

New Zealand's regulated industries—finance, health, and government—often require requirements traceability for audit and compliance purposes. ATDD provides a natural mechanism for this: each acceptance test directly traces back to a business requirement, and every failure is a signal that the system no longer meets agreed criteria.

For teams working under the Privacy Act 2020 or Financial Markets Conduct Act, ATDD examples can include data-privacy and consent scenarios, ensuring compliance is built in from the start rather than bolted on later.

Career level guidance

LevelFocusWhat to practise
Junior Participation & comprehension Attend Three Amigos sessions, ask clarifying questions, read Gherkin scenarios, and learn how acceptance tests map to story criteria.
Senior Facilitation & automation Facilitate Three Amigos, challenge ambiguous requirements, write Gherkin scenarios, automate acceptance tests, and mentor juniors on testable thinking.
Test Lead Strategy & organisational adoption Roll out ATDD across squads, choose and maintain tooling, coach Product Owners on writing testable acceptance criteria, and measure defect escape rates pre vs post adoption.
← Back to Agile Techniques