370 likes | 2.06k Views
ATDD (Acceptance Test Driven Dev). SDC 2013 Goteborg, Sweden. Intro Tiny bit about agile What is ATDD Work through an example Wrap-up Clarifying questions accepted throughout Q & A after. A little about me – twitter: janetgregoryca. First agile team – 2000
E N D
ATDD(Acceptance Test Driven Dev) SDC 2013 Goteborg, Sweden
Intro • Tiny bit about agile • What is ATDD • Work through an example • Wrap-up Clarifying questions accepted throughout Q & A after
A little about me – twitter: janetgregoryca First agile team – 2000 Currently – coaching, testing Book – Agile Testing; January 2009
A little about you • Programmers? • Testers? • Business stakeholders? • Other? • Who has an understanding of TDD? • Who has an understanding of ATDD?
Testing on agile projects is …….. • more than “just” testing code • an activity; not a phase Potentially shippable product Potentially shippable product
Feature / Epic some business capability that is releasable has many Stories • pieces of functionality that can be implemented in 2 -3 days has many Tasks • small chunks of work for a team member (usually less than 1 day
ATDD BDD Specification by Example EDD TDD “Begin with the end in mind.” — Stephen R. Covey
Features or Picture by Augusta Evangelisti, based on diagram from Elisabeth Hendrickson
ATDD (Acceptance Test Driven Development) Explore examples User Story Accept Story High level AT Fix defects Explore ++ other testing Expand Tests TDD & Execute tests Auto- mate tests
Tests / Examples passes to API test structure Test Method / Fixture Test Framework calls Developer Code
Let’s look at an example story Create account with user name and password High level acceptance tests to start the conversation
Questions we may ask… • What constitutes valid / invalid user names? • What constitutes valid / invalid passwords? • I notice you don’t have a confirm password … Is that something we overlooked? • What happens if you have duplicate use names? • Can there be more than one password the same? • How many times can they make a mistake?
It’s not about the tools !!! • Fit • FitNesse • Cucumber • Robot, framework • jBehave / Rspec • SpecFlow • Easyb • rSpec • Groovy • Concordia • ….. etc…. It depends on your context
Benefits of ATDD • Examples provide common language • Defines a DSL (domain specific language) • Shared common understanding of the problem • Shared definition of DONE • Coding and testing concurrently • Involves whole team • Prevents defects • Executable specifications: living documentation • Test at the API level (usually) – faster tests
Don’t get complacent ATDD and TDD arenot enough! • Exploratory testing • for things we didn’t think about • Thinking about quality attributes / constraints • for ‘fit and finish’
Additional reading • Markus Gartner, ATDD by Example • Gojko Adzic, Bridging the Communication Gap • http://testobsessed.com/wp-content/uploads/2011/04/atddexample.pdf • http://testobsessed.com/ • Elisabeth Hendrickson, Explore It! • Ellen Gottesdiener and Mary Gorman, Discover to Deliver
Now Available Agile Testing: A Practical Guide for Testers and Agile Teams By Lisa Crispin and Janet Gregory www.agiletester.ca My contact info www.janetgregory.ca http://janetgregory.blogspot.com/ Email: janet@agiletester.ca www.lisacrispin.com http://lisacrispin.com Email: lisa@agiletester.ca