Slide 1

Slide 1 text

Acceptance Test Driven Development (ATDD) Acceptance Test Driven Development (ATDD) Automated Acceptance Testing (AAT) Automated Acceptance Testing (AAT) Behaviour Driven Development (BDD) Behaviour Driven Development (BDD) Pioneered by Dan North 2006 Pioneered by Dan North 2006 • Otsile Kesianye always start with bdd then move on to TDD, its a natural flow. took a while for me to get into this flow of this working idea but its natural. BDD then TDD is like starting with the destination then reconstructing the journey. BDD is the destination, TDD is the journey, the mode of transport.

Slide 2

Slide 2 text

What are the goals? What are the goals? What's in it for The Development Team? What's in it for The Development Team? What is it going to cost The Development Team? What is it going to cost The Development Team? What's in it for the business? What's in it for the business? What is it going to cost the business? What is it going to cost the business? What does it mean to be doing BDD or ATDD What does it mean to be doing BDD or ATDD Tooling options? Tooling options? How to deal with push back from management or team members. How to deal with push back from management or team members.

Slide 3

Slide 3 text

Goals Goals ● Communication bridge Communication bridge ● Measurability Measurability ● Ultimate visibility Ultimate visibility ● Assistance in being able to deliver every Sprint Assistance in being able to deliver every Sprint ● Provide confirmation that we have implemented specification Provide confirmation that we have implemented specification ● Code that is testable, of high quality, maintainable, extensible Code that is testable, of high quality, maintainable, extensible ● RoI RoI ● Write less code Write less code

Slide 4

Slide 4 text

Higher level tests = more expensive to create and maintain Higher level tests = more expensive to create and maintain Slower to run, not run in CI, usually run in nightly build Slower to run, not run in CI, usually run in nightly build ● Potential for latency in the development cycle Potential for latency in the development cycle ● Developers less likely to run them manually Developers less likely to run them manually ● Faults take longer to locate and fix Faults take longer to locate and fix Beware!

Slide 5

Slide 5 text

What's in it for the Devs? What's in it for the Devs? Clear, concise and often terse automatable specifications Clear, concise and often terse automatable specifications Living (always up to date) documentation Living (always up to date) documentation Confidence we're only writing what's needed Confidence we're only writing what's needed Clarification of assumptions Clarification of assumptions Product quality Product quality Unit tests tell us our software works... Unit tests tell us our software works... BDD tells us it does what the customer wants BDD tells us it does what the customer wants Instant feedback Instant feedback Assists in tight iterations Assists in tight iterations

Slide 6

Slide 6 text

Cost to the Development Team? Cost to the Development Team? Paradigm shift Paradigm shift Forced into active engagement Forced into active engagement Finding unit test and mocking frameworks Finding unit test and mocking frameworks Learning curve Learning curve Mocking frameworks I've evaluated recently: Mocking frameworks I've evaluated recently: ● NMock2, 3 NMock2, 3 ● Rhino Mocks Rhino Mocks ● TypeMock TypeMock ● Moq Moq

Slide 7

Slide 7 text

Cost of not doing BDD Cost of not doing BDD ● Product quality Product quality ● Predictability Predictability ● Accountability Accountability ● Rework... Ultimately costing the business. Rework... Ultimately costing the business.

Slide 8

Slide 8 text

What's in it for the Business? What's in it for the Business? ● Executable, living specifications providing assurance that the Executable, living specifications providing assurance that the business functionality is “Done” business functionality is “Done” ● Confidence in The Scrum Team Confidence in The Scrum Team ● Solid development KPI Solid development KPI ● Visibility of what to expect from a Done increment Visibility of what to expect from a Done increment ● Visibility into how much business value is being delivered Visibility into how much business value is being delivered ● Predictability. Empowerment Predictability. Empowerment ● Higher product quality = less money spent on rework and Higher product quality = less money spent on rework and maintenance maintenance ● Confidence that not only is the product being built correctly... Confidence that not only is the product being built correctly... but also that the but also that the correct product correct product is being built is being built

Slide 9

Slide 9 text

No content

Slide 10

Slide 10 text

Cost to the Business? Cost to the Business? ● A little team planning and a spike on tools A little team planning and a spike on tools ● PO and stakeholders to understand what they PO and stakeholders to understand what they are asking for. are asking for.

Slide 11

Slide 11 text

Cost of not doing BDD Cost of not doing BDD ● Visibility Visibility ● Forecast-ability Forecast-ability ● Ability to make informed decisions Ability to make informed decisions ● Software that does what it should do. Software that does what it should do. ● Speed to market. Software is a liability Speed to market. Software is a liability until it's released. until it's released.

Slide 12

Slide 12 text

How do we do it? How do we do it? → → Once tools are chosen Once tools are chosen → → At the beginning of the Sprint At the beginning of the Sprint → → Test condition workshop... Test condition workshop... Search BinaryMist on how-to-optimise-your-testing-effort Search BinaryMist on how-to-optimise-your-testing-effort

Slide 13

Slide 13 text

No content

Slide 14

Slide 14 text

Resources: Resources: You'll find everything you need here: You'll find everything you need here: https://github.com/techtalk/SpecFlow/wiki/Documentation https://github.com/techtalk/SpecFlow/wiki/Documentation

Slide 15

Slide 15 text

Resources: Resources: Best Intro Video: Best Intro Video: http://www.watchmecode.net/jasmine-standalone#preview http://www.watchmecode.net/jasmine-standalone#preview Standalone Runner: Standalone Runner: https://github.com/pivotal/jasmine/downloads https://github.com/pivotal/jasmine/downloads Best Intro Doc: Best Intro Doc: http://pivotal.github.com/jasmine/ http://pivotal.github.com/jasmine/ Serenity Runner with .NET: Serenity Runner with .NET: http://lostechies.com/josharnold/2012/02/25/running-jasmine-specs-i http://lostechies.com/josharnold/2012/02/25/running-jasmine-specs-i n-dotnet-with-serenity/ n-dotnet-with-serenity/

Slide 16

Slide 16 text

FitNesse FitNesse Resources: Resources: Two Minute Example: Two Minute Example: http://fitnesse.org/FitNesse.UserGuide.TwoMinuteExample http://fitnesse.org/FitNesse.UserGuide.TwoMinuteExample Test Driven .NET Development with FitNesse by Gojko Adzic Test Driven .NET Development with FitNesse by Gojko Adzic Start here with Installation: Start here with Installation: http://fitnesse.org/FitNesse.UserGuide.DownloadingAndInstallingF http://fitnesse.org/FitNesse.UserGuide.DownloadingAndInstallingF itNesse itNesse FitSharp: FitSharp: https://github.com/jediwhale/fitsharp/downloads https://github.com/jediwhale/fitsharp/downloads Source: Source: https://github.com/unclebob/fitnesse https://github.com/unclebob/fitnesse

Slide 17

Slide 17 text

Dealing with push back Dealing with push back This is never going to be easy. This is never going to be easy. Books I've found helpful: Books I've found helpful: ● Fearless Change: Patterns for Introducing New Ideas Fearless Change: Patterns for Introducing New Ideas by Mary Lynn Manns and Linda Rising by Mary Lynn Manns and Linda Rising ● Change Agent: Engaging your passion to be the one who makes Change Agent: Engaging your passion to be the one who makes a difference a difference by Os Hillman by Os Hillman

Slide 18

Slide 18 text

Resources Resources ● If not already TDD'ing If not already TDD'ing http://blog.binarymist.net/2012/12/01/moving-to-tdd/ http://blog.binarymist.net/2012/12/01/moving-to-tdd/ ● Guidance on prioritising areas to test that give biggest bang for Guidance on prioritising areas to test that give biggest bang for your buck your buck http://blog.binarymist.net/2012/03/24/how-to-optimise-your-testin http://blog.binarymist.net/2012/03/24/how-to-optimise-your-testin g-effort/ g-effort/ ● Book: Specification By Example Book: Specification By Example by Gojko Adzic by Gojko Adzic