Moving to tdd bdd

Embed Size (px)

Citation preview

Acceptance Test Driven Development (ATDD)Automated Acceptance Testing (AAT)Behaviour Driven Development (BDD)

Pioneered by Dan North 2006

What are the goals?

What's in it for The Development Team?

What is it going to cost The Development Team?

What's in it for the business?

What is it going to cost the business?

What does it mean to be doing BDD or ATDD

Tooling options?

How to deal with push back from management or team members.

Goals

Communication bridge

Measurability

Ultimate visibility

Assistance in being able to deliver every Sprint

Provide confirmation that we have implemented specification

Code that is testable, of high quality, maintainable, extensible

RoI

Write less code

Higher level tests = more expensive to create and maintainSlower to run, not run in CI, usually run in nightly buildPotential for latency in the development cycle

Developers less likely to run them manually

Faults take longer to locate and fix

Beware!

What's in it for the Devs?

Clear, concise and often terse automatable specificationsLiving (always up to date) documentationConfidence we're only writing what's neededClarification of assumptionsProduct qualityUnit tests tell us our software works...
BDD tells us it does what the customer wantsInstant feedbackAssists in tight iterations

Cost to the Development Team?

Paradigm shiftForced into active engagementFinding unit test and mocking frameworksLearning curve

Mocking frameworks I've evaluated recently:NMock2, 3

Rhino Mocks

TypeMock

Moq

Cost of not doing BDD

Product quality

Predictability

Accountability

Rework... Ultimately costing the business.

What's in it for the Business?

Executable, living specifications providing assurance that the business functionality is Done

Confidence in The Scrum Team

Solid development KPI

Visibility of what to expect from a Done increment

Visibility into how much business value is being delivered

Predictability. Empowerment

Higher product quality = less money spent on rework and maintenance

Confidence that not only is the product being built correctly...
but also that the correct product is being built


Cost to the Business?

A little team planning and a spike on tools

PO and stakeholders to understand what they are asking for.

Cost of not doing BDD

Visibility

Forecast-ability

Ability to make informed decisions

Software that does what it should do.

Speed to market. Software is a liability until it's released.

How do we do it?

Once tools are chosen At the beginning of the Sprint Test condition workshop...
Search BinaryMist on how-to-optimise-your-testing-effort

Resources:

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

Resources:

Best Intro Video:http://www.watchmecode.net/jasmine-standalone#previewStandalone Runner:https://github.com/pivotal/jasmine/downloadsBest Intro Doc:http://pivotal.github.com/jasmine/Serenity Runner with .NET:http://lostechies.com/josharnold/2012/02/25/running-jasmine-specs-in-dotnet-with-serenity/

FitNesse

Resources:

Two Minute Example:http://fitnesse.org/FitNesse.UserGuide.TwoMinuteExample

Test Driven .NET Development with FitNesse by Gojko Adzic

Start here with Installation:http://fitnesse.org/FitNesse.UserGuide.DownloadingAndInstallingFitNesseFitSharp:https://github.com/jediwhale/fitsharp/downloadsSource:https://github.com/unclebob/fitnesse

Dealing with push back

This is never going to be easy.Books I've found helpful:

Fearless Change: Patterns for Introducing New Ideas
by Mary Lynn Manns and Linda Rising

Change Agent: Engaging your passion to be the one who makes
a difference by Os Hillman

Resources

If not already TDD'ing
http://blog.binarymist.net/2012/12/01/moving-to-tdd/

Guidance on prioritising areas to test that give biggest bang for your buck
http://blog.binarymist.net/2012/03/24/how-to-optimise-your-testing-effort/

Book: Specification By Example by Gojko Adzic