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
![Page 1: Moving Towards Zero Defects with Specification by Example](https://reader033.vdocument.in/reader033/viewer/2022061300/54cc56b84a79597d4a8b4592/html5/thumbnails/1.jpg)
Moving towards zero defects with Specification By ExampleSteve Rogalsky
(Track Sponsor)
@srogalskywinnipegagilist.blogspot.com
![Page 2: Moving Towards Zero Defects with Specification by Example](https://reader033.vdocument.in/reader033/viewer/2022061300/54cc56b84a79597d4a8b4592/html5/thumbnails/2.jpg)
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?
![Page 3: Moving Towards Zero Defects with Specification by Example](https://reader033.vdocument.in/reader033/viewer/2022061300/54cc56b84a79597d4a8b4592/html5/thumbnails/3.jpg)
![Page 4: Moving Towards Zero Defects with Specification by Example](https://reader033.vdocument.in/reader033/viewer/2022061300/54cc56b84a79597d4a8b4592/html5/thumbnails/4.jpg)
![Page 5: Moving Towards Zero Defects with Specification by Example](https://reader033.vdocument.in/reader033/viewer/2022061300/54cc56b84a79597d4a8b4592/html5/thumbnails/5.jpg)
A story of Zero Defects
![Page 6: Moving Towards Zero Defects with Specification by Example](https://reader033.vdocument.in/reader033/viewer/2022061300/54cc56b84a79597d4a8b4592/html5/thumbnails/6.jpg)
A SCIENCE EXPERIMENT
![Page 7: Moving Towards Zero Defects with Specification by Example](https://reader033.vdocument.in/reader033/viewer/2022061300/54cc56b84a79597d4a8b4592/html5/thumbnails/7.jpg)
Specification By Example improves Quality & Speed
HYPOTHESIS:
![Page 8: Moving Towards Zero Defects with Specification by Example](https://reader033.vdocument.in/reader033/viewer/2022061300/54cc56b84a79597d4a8b4592/html5/thumbnails/8.jpg)
DEFINITIONS:
Acceptance Testing Is...
![Page 9: Moving Towards Zero Defects with Specification by Example](https://reader033.vdocument.in/reader033/viewer/2022061300/54cc56b84a79597d4a8b4592/html5/thumbnails/9.jpg)
Goal: To build the right thing the first time.
What is Specification By Example?
![Page 10: Moving Towards Zero Defects with Specification by Example](https://reader033.vdocument.in/reader033/viewer/2022061300/54cc56b84a79597d4a8b4592/html5/thumbnails/10.jpg)
Also known as / similar to:
ATDD – Acceptance Test Driven Development
BDD – Behaviour Driven Development
What is Specification By Example?
![Page 11: Moving Towards Zero Defects with Specification by Example](https://reader033.vdocument.in/reader033/viewer/2022061300/54cc56b84a79597d4a8b4592/html5/thumbnails/11.jpg)
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>
![Page 12: Moving Towards Zero Defects with Specification by Example](https://reader033.vdocument.in/reader033/viewer/2022061300/54cc56b84a79597d4a8b4592/html5/thumbnails/12.jpg)
TEST AS SOON AS POSSIBLEFIRST
in collaboration with the developers and customers
2.To do this we:
![Page 13: Moving Towards Zero Defects with Specification by Example](https://reader033.vdocument.in/reader033/viewer/2022061300/54cc56b84a79597d4a8b4592/html5/thumbnails/13.jpg)
![Page 14: Moving Towards Zero Defects with Specification by Example](https://reader033.vdocument.in/reader033/viewer/2022061300/54cc56b84a79597d4a8b4592/html5/thumbnails/14.jpg)
AUTOMATE our examples
To do this we:
3.
![Page 15: Moving Towards Zero Defects with Specification by Example](https://reader033.vdocument.in/reader033/viewer/2022061300/54cc56b84a79597d4a8b4592/html5/thumbnails/15.jpg)
AN EXAMPLE:
Requirement: Bring home something small from Europe
What I brought: What she wanted:
![Page 16: Moving Towards Zero Defects with Specification by Example](https://reader033.vdocument.in/reader033/viewer/2022061300/54cc56b84a79597d4a8b4592/html5/thumbnails/16.jpg)
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:
![Page 17: Moving Towards Zero Defects with Specification by Example](https://reader033.vdocument.in/reader033/viewer/2022061300/54cc56b84a79597d4a8b4592/html5/thumbnails/17.jpg)
(40*$20) = $800.00
a standard wage per hour for the first 40 hours worked
![Page 18: Moving Towards Zero Defects with Specification by Example](https://reader033.vdocument.in/reader033/viewer/2022061300/54cc56b84a79597d4a8b4592/html5/thumbnails/18.jpg)
1.5 times their wage for each hour after the first 40 hours
(40*$20) + (5*$20*1.5) = $950.00
![Page 19: Moving Towards Zero Defects with Specification by Example](https://reader033.vdocument.in/reader033/viewer/2022061300/54cc56b84a79597d4a8b4592/html5/thumbnails/19.jpg)
2 times their wage for each
hour worked on Sundays and
holidays
(40*$20) + (8*$20*1.5) +(8*$20*2) = $1,360.00
![Page 20: Moving Towards Zero Defects with Specification by Example](https://reader033.vdocument.in/reader033/viewer/2022061300/54cc56b84a79597d4a8b4592/html5/thumbnails/20.jpg)
(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
![Page 21: Moving Towards Zero Defects with Specification by Example](https://reader033.vdocument.in/reader033/viewer/2022061300/54cc56b84a79597d4a8b4592/html5/thumbnails/21.jpg)
Executable Specificatio
ns
Credit: This example is from “The Role of Quality Assurance in Lean-Agile” – Allan Shalloway
![Page 22: Moving Towards Zero Defects with Specification by Example](https://reader033.vdocument.in/reader033/viewer/2022061300/54cc56b84a79597d4a8b4592/html5/thumbnails/22.jpg)
Defect Tracking
![Page 23: Moving Towards Zero Defects with Specification by Example](https://reader033.vdocument.in/reader033/viewer/2022061300/54cc56b84a79597d4a8b4592/html5/thumbnails/23.jpg)
![Page 24: Moving Towards Zero Defects with Specification by Example](https://reader033.vdocument.in/reader033/viewer/2022061300/54cc56b84a79597d4a8b4592/html5/thumbnails/24.jpg)
![Page 25: Moving Towards Zero Defects with Specification by Example](https://reader033.vdocument.in/reader033/viewer/2022061300/54cc56b84a79597d4a8b4592/html5/thumbnails/25.jpg)
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
![Page 26: Moving Towards Zero Defects with Specification by Example](https://reader033.vdocument.in/reader033/viewer/2022061300/54cc56b84a79597d4a8b4592/html5/thumbnails/26.jpg)
'''
What does it take to set this up?
It is simpler than this…
![Page 27: Moving Towards Zero Defects with Specification by Example](https://reader033.vdocument.in/reader033/viewer/2022061300/54cc56b84a79597d4a8b4592/html5/thumbnails/27.jpg)
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:
![Page 28: Moving Towards Zero Defects with Specification by Example](https://reader033.vdocument.in/reader033/viewer/2022061300/54cc56b84a79597d4a8b4592/html5/thumbnails/28.jpg)
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
![Page 29: Moving Towards Zero Defects with Specification by Example](https://reader033.vdocument.in/reader033/viewer/2022061300/54cc56b84a79597d4a8b4592/html5/thumbnails/29.jpg)
THE EXPERIMENT
![Page 30: Moving Towards Zero Defects with Specification by Example](https://reader033.vdocument.in/reader033/viewer/2022061300/54cc56b84a79597d4a8b4592/html5/thumbnails/30.jpg)
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!
![Page 31: Moving Towards Zero Defects with Specification by Example](https://reader033.vdocument.in/reader033/viewer/2022061300/54cc56b84a79597d4a8b4592/html5/thumbnails/31.jpg)
CONCLUSIONS
![Page 32: Moving Towards Zero Defects with Specification by Example](https://reader033.vdocument.in/reader033/viewer/2022061300/54cc56b84a79597d4a8b4592/html5/thumbnails/32.jpg)
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:
![Page 33: Moving Towards Zero Defects with Specification by Example](https://reader033.vdocument.in/reader033/viewer/2022061300/54cc56b84a79597d4a8b4592/html5/thumbnails/33.jpg)
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