moving towards zero defects with specification by example
DESCRIPTION
Love tracing bugs in a defect tracking system? Love the bug-fix cycle? If so, then don't come to this presentation. We'll be discussing how Specification by Example (also known as Acceptance Test Driven Development) will help move you towards a zero defect system by building the right thing the first time.TRANSCRIPT
Moving towards zero defects with Specification By ExampleSteve Rogalsky
(Track Sponsor)
@srogalskywinnipegagilist.blogspot.com
Choose 2 of these topics to discuss:1. Talk about your approach to quality and
the results of that approach.2. Talk about your approach to
requirements and how you keep those requirements up to date.
3. Talk about any previous experience with automated testing.
4. Talk about your team’s current bug tracking process.
5. Talk about zero defects – Is it possible? Is it responsible? Cost effective?
A story of Zero Defects
A SCIENCE EXPERIMENT
Specification By Example improves Quality & Speed
HYPOTHESIS:
DEFINITIONS:
Acceptance Testing Is...
Goal: To build the right thing the first time.
What is Specification By Example?
Also known as / similar to:
ATDD – Acceptance Test Driven Development
BDD – Behaviour Driven Development
What is Specification By Example?
WRITE EXAMPLES (Acceptance Tests)(up front but not UP FRONT)
instead of requirements
SPECIFICATION BY EXAMPLE
To do this we:
1.Given muppet <Animal> When measuring <Craziness> Then return <10>
Given muppet <Animal> When <Drumming> Then return <Phenomenal Skillz>
Given muppet <Animal> When <talking> Then return <Grunt>
TEST AS SOON AS POSSIBLEFIRST
in collaboration with the developers and customers
2.To do this we:
AUTOMATE our examples
To do this we:
3.
AN EXAMPLE:
Requirement: Bring home something small from Europe
What I brought: What she wanted:
ANOTHER EXAMPLE
User Story: As an employee I want to receive overtime pay
a standard wage per hour for the first 40 hours worked
1.5 times their wage for each hour after the first 40 hours
2 times their wage for each
hour worked on Sundays and
holidays
For each week, hourly employees are paid:
(40*$20) = $800.00
a standard wage per hour for the first 40 hours worked
1.5 times their wage for each hour after the first 40 hours
(40*$20) + (5*$20*1.5) = $950.00
2 times their wage for each
hour worked on Sundays and
holidays
(40*$20) + (8*$20*1.5) +(8*$20*2) = $1,360.00
(40*$20) + (8*$20*1.5) +(8*$20*2 ) = $1,360.00
*1.5
2 times their wage for each
hour worked on Sundays and
holidays
Executable Specificatio
ns
Credit: This example is from “The Role of Quality Assurance in Lean-Agile” – Allan Shalloway
Defect Tracking
Where should we focus our automated testing?
UI
Services
Classes/Functions
Focus Here First
TDD
Later…
Credit: Testing Triangle first shown by Patrick Wilson-Welsh
'''
What does it take to set this up?
It is simpler than this…
1. Download FitNesse (free)2. Run FitNesse3. Add A Reference to your
project4. Create a Fixture per set of
examples5. Write the examples6. Press a button
Steps:
How to do it?
Choose Story
Expand into
Examples
Think about how
Review
Automate
Examples
Code / TDD
Passes All
tests = done
High Level Tests
Tester
Developer
Customer and Team
THE EXPERIMENT
Steps:• Fold the paper in half• Open the folded paper up and make two
triangle folds for the ‘nose’ of the plane• Re-fold the plane in half and fold two wings
(one on each side…)• Finally, fold two wing flaps
Airplane Factory!
CONCLUSIONS
1. Communicate!2. Write Executable Examples
instead of requirements3. The Tooling is simple to use
and free4. Zero Defects isn’t impossible –
build it right the first time5. Trash your Defect Tracker
TO SUMMARIZE
Specification By Example:
winnipegagilist.blogspot.com
@srogalskyhttp://fitnesse.org/
http://gojko.net/fitnesse/
http://seleniumhq.org/
Links Contact Info
Questions?
THANKS!
http://www.slideshare.net/SteveRogalsky/moving-towards-zero-defects-with-specification-by-example