It is always useful to share a common vocabulary in a team, and some terms lead to confusion, as it happens with Definition of Done and Acceptance Criteria.
In an agile project the work to be performed is described in User Stories, for example:
“As a premium user I want to check the special offers addressed to me so that I can purchase them”
Every User Story can have a set of “conditions of satisfaction”, things that must be satisfied in order to consider the User Story finished:
- The premium user can list the special offers addressed directly to him
- Each offer has a price, and it’s shown in the user’s currency
- If the list is empty the user is notified about it and he can see the conditions
- Every item has link so it can be purchased
These conditions are the Acceptance Criteria and are set per User Story, and are meant to remove ambiguity. In Scrum terminology they are the Product Owner's expectations.
The Definition of Done (DoD) is a term used in Scrum but can also used in other methodologies. DoD is a set of conditions that every developer must satisfy in order to say he has completely finished with a User Story, so that it’s potentially shippable. It's a statement on quality, and it’s meant to avoid “Technical debt”. You cannot say “it’s done, just some documentation pending”.
Every team defines their own requirements for Done. The obvious one is “all Acceptance Criteria pass” but other teams must choose some of the following:
- All code has been reviewed (if not pair-programmed)
- Code has been deployed using Continuous Integration
- Documentation updated
- Systems Administrators notified about changes
- Training manual updated
- No pending bugs
- Performance tests passed
- All code under version control
- All code needs to have automatic acceptance test
- Business Analyst accepted
- Unit Tests pass
- Code coverage over 70%
If a User Story is not done, it must pass to the following sprint.
In Scrum you can have a Definition of Done for a User Story, for a Release and for a Sprint Planning.
Definition of Done is a team commitment on quality. Acceptance Criteria sets the minimum validations to check on a User Story completion.
There are some practices to include Acceptance Criteria in the development process, like BDD (Behavioural Driven Developmen) and ATDD (Acceptance Test Driven Development), but that’ll be another day.