2. What is ATDD
• ATDD - "Acceptance Test Driven Development"
• ATDD is a practice in which the whole team discusses
acceptance criteria and the tests needed to ensure that
the feature meets the user's expectations.
• ATDD is the best way to ensure that the team
understands what is needed to meet the user's
expectations - thus ensuring they have a shared
definition of Done.
• ATDD is about collaboration and communication and not
so much about testing, in that it clarifies the
requirements and the definition of done.
3. Stages of an ATDD Cycle
Discuss: The team discusses and list, from the
user’s perspective, the functionality that the
feature must include and won't include to
meet the users expectations and thus what
needs to be tested.
Distill: The team defines the tests, including the
test scenarios and the data needed to
complete and to confirm the tests.
Develop: The team follows the Test Driven
Design (TDD) approach. First developing and
implementing the unit tests that will by
design fail and then writes the code that will
result in the tests passing.
Demo: The team demos the feature to the
stake holders, including showing the tests
with results and listing any vulnerabilities
identified through the testing.
4. Sample
User Story
As a student taking an online test,
I need an online calculator,
so that I can complete my assignments within the
testing application.
Acceptance Criteria:
• The calculator will add
• The calculator will subtract
• The calculator will multiply
Sample Continues…
Wireframe
5. Sample
...Sample Continues
• The calculator will divide
• The calculator will support 10 digits
• The calculator will have a clear function that will clear
the calculator’s memory
• The calculator will have the ability to delete one digit
at a time
• The calculator will work with the keyboard for direct
entry
• The calculator will work by clicking the keys on the
screens
Wireframe
6. ATDD Cycle – Discuss Stage
Discuss: The team discusses and list, from the user’s
perspective, the functionality that the feature must include
and won't include to meet the users expectations and thus
what needs to be tested.
Start with the Acceptance Criteria, list all the functionality that
must be included and won't be included, then investigate for
missing criteria.
Missing Criteria
• An equal or totaling function
that is triggered by hitting the
“Enter Key”.
• Support decimals
• Support negative numbers
• Rounding up .5 or above
• Display error if an error occurs
• Errors are cleared by using the
clear function
Future Consideration
• An “=“ button
• Negative signing for
entered values
• Percentage
• Carrying previous
totals into the
operation
• Help
7. ATDD Cycle – Distill Stage
Distill: The team defines the tests, including the test scenarios and the data needed to complete and to
confirm the tests.
The following is designed for a FIT/SLIP test
Test V1 V2 V3 V4 Expected
Add 5 + 6 [Enter] 11
Subtract 7 - 2 [Enter] 5
Multiply 3 * 5 [Enter] 15
Divide 9 / 3 [Enter] 3
10 digits support 1234567890 + 1 [Enter] 1234567891
Clear all 5 + 5 C [Null]
del digit 1 by 1 123456 < < < 123
Keyboard entry manual test
Screens entry manual test
= “Enter Key” included above
Support decimals 5.5 x 0.1 [Enter] 0.55
Support Neg Num 5 - 6 [Enter] -1
Rndg up at .5+ 5 / 9 [Enter] 0.555555556
Display error 5 / 0 [Enter] E
Clear error After above error
C [Enter] [Null]
8. ATDD Cycle – Develop & Demo Stage
Develop: The team follows the Test Driven Design
(TDD) approach. First developing and
implementing the unit tests that will by design
fail and then writes the code that will result in
the tests passing.
Demo: The team demos the feature to the stake
holders, including showing the tests with results
and listing any vulnerabilities identified through
the testing.
9. ATDD Conclusion
ATDD dramatically improves the development
process according to a 2005 study reported by
Atlassian & cPrime, which stated:
• Project delivery time increase by 30% or more on
average.
• Defects dropped by as much as 75%.
• Long-term maintenance costs dropped
significantly
• Stakeholder confidence of development soared
10. ATDD Conclusion
This is due to:
• Improved understanding of requirements
• Closer collaboration
• Shared view of done
• Clear definition of done
• Common understandings of requirements
• More complete list of requirements
• Beginning testing earlier
11. ATDD Conclusion
• ATDD is a natural fit for Agile in that it
encourages team work and collaboration
while working with the client.
Thanks
Stephen Tucker, Enterprise Agile Coach