Overview

Chapter 9. Acceptance TDD explained

Acceptance test-driven development extends test-driven thinking from code quality to product value. Rather than focusing on whether individual classes or methods behave correctly, it asks whether the software as a whole delivers the functionality the customer actually wants. The chapter frames acceptance TDD as a practical way to keep development aligned with business needs, using lightweight requirements that invite conversation, clarification, and shared understanding instead of heavy up-front specification.

A central idea is the use of user stories and acceptance tests as complementary artifacts. User stories are brief reminders of who needs what and why, while acceptance tests spell out the conditions of satisfaction in concise, domain-friendly language. The chapter emphasizes that these tests should be owned by the customer, written collaboratively with developers and testers, and focused on the desired behavior rather than implementation details. They should be precise, unambiguous, and easy to understand, whether written as notes, tables, or structured examples.

The acceptance TDD process is presented as a simple cycle: choose a story, write acceptance tests, automate them, and then implement the functionality until the tests pass. This cycle fits inside larger iteration planning and helps teams see progress early, manage scope, and stop at the right time. The chapter also highlights broader benefits such as stronger cooperation, clearer trust between customer and team, better definitions of done, and a practical way to verify system behavior using tools and interfaces appropriate to the context, from UI tests to business-logic checks.

Example of a user story, written on a story card
Example tests for the story, written on the back of the story card from figure 9.1
Acceptance tests focusing too much on the implementation
Trimmed-down version of the tests from figure 9.3
Revamped acceptance tests from figure 9.2
The acceptance TDD cycle
Example of an executable test, sketched on a piece of paper
Contrast between a sketch and an actual, implemented executable acceptance test
The relationship between test-driven development and acceptance test-driven development
Putting acceptance test-driven development on a time line

FAQ

What is acceptance test-driven development (Acceptance TDD)?Acceptance TDD is a development approach where the team first defines the customer-valued behavior of a feature using acceptance tests, then automates those tests, and finally implements the functionality to make them pass. It focuses on whether the system does what the customer wants, not just whether the code works technically.
How is Acceptance TDD different from regular TDD?Regular TDD drives the design of code through unit tests at the technical level, while Acceptance TDD drives the development of whole features through acceptance tests at the business or customer level. Acceptance TDD checks the system’s behavior from the user’s perspective, and TDD is then used as the internal implementation method.
What are user stories in the context of Acceptance TDD?User stories are short, lightweight expressions of requirements that describe who wants something, what they want, and why. In Acceptance TDD, they act as a promise of a future conversation and a basis for defining acceptance tests, rather than as detailed documentation of the requirement.
What should acceptance tests focus on?Acceptance tests should focus on the what and why of the desired behavior, not the how of the implementation. They should describe customer-visible behavior in the language of the domain, staying concise, precise, and free from unnecessary technical details.
Who should own and write acceptance tests?Acceptance tests should be owned by the customer, because the customer is the business expert best positioned to define acceptance criteria. In practice, they are often written collaboratively by the customer, developer, and tester so that domain knowledge and technical insight are both included.
Why should acceptance tests use the language of the domain?Using the domain language makes acceptance tests understandable to the customer and reduces the risk of building the wrong thing. It also helps keep the tests less tied to implementation details, which makes refactoring easier and reduces maintenance when the system changes.
What are the four steps in the Acceptance TDD cycle?The four steps are: pick a user story, write acceptance tests for it, automate the tests, and implement the functionality so the tests pass. This cycle repeats throughout the iteration until the story is complete.
What are the main benefits of Acceptance TDD?Acceptance TDD helps define “done,” makes progress visible, reduces scope creep, improves cooperation between team members, and builds trust between the customer and the developers. It also supports specification by example, making requirements easier to understand and validate.
What are acceptance tests actually testing?Acceptance tests verify that a user story has been implemented correctly from the perspective of the customer. Depending on the situation, they may test through the UI, through an internal API, or directly against business logic, but the goal is always to validate the system’s behavior in a way that matters to the customer.
What tools are commonly used for automating acceptance tests?Common tools include table-based frameworks like Fit, FitNesse, and Selenium, text-based frameworks like Exactor and TextTest, scripting-language-based frameworks like Systir, and even homegrown tools built for a team’s specific needs. The best tool is the one that supports writing, running, and reporting acceptance tests in a customer-friendly way.

pro $24.99 per month

  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose one free eBook per month to keep
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime

lite $19.99 per month

  • access to all Manning books, including MEAPs!

team

5, 10 or 20 seats+ for your team - learn more


Close
choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Test Driven Test Driven ebook for free
Close
choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Test Driven Test Driven ebook for free