Presentation is loading. Please wait.

Presentation is loading. Please wait.

Specification by example

Similar presentations


Presentation on theme: "Specification by example"— Presentation transcript:

1 Specification by example

2 What’s the problem?

3

4

5

6 Accidental Adversaries

7

8 Useless Crap

9 Business Failure Useless Crap

10 Business Failure Useless Crap Maintenance Nightmare

11 Business Failure Business Success Useless Crap Maintenance Nightmare

12 Specification by example
Business Failure Business Success Specification by example Useless Crap Maintenance Nightmare

13 Specification by example

14 Deriving scope from goals

15 Derive the scope: User Stories

16 Specify collaboratively

17 Refining the specification

18 Refining the specification
“Specifications with examples are acceptance tests” Gojko Adzic Be sure spec is testable Focus on business functionality not design Avoid UI details Avoid covering every possible combination

19 Refining the specification
Illustrating by examples Feature: Free delivery In order to save money As a VIP customer I want the system to offer free delivery on certain items to me

20 Refining the specification
In order to minimize the chances of misunderstanding, we write scripts in terms of Given -> When -> Then. Scenario: Free delivery Given I am a VIP customer And I am on product detail page And There are only books in my shopping cart And There are <= 10 books in my shopping cart And I have added 'ABC Press' book to my shopping cart When I press 'Go to checkout' button And I have chosen 'Moscow' in 'Ship To' dropdown Then I can choose free delivery

21 Automating examples Start small
Select important examples for automation Plan up-front to automate Avoid using pre-populated data Refactor your tests from time to time Validate frequently

22 Living documentation Keep specifications short Evolve specifications
Make documentation accessible Organize the documentation Put specifications under version control


Download ppt "Specification by example"

Similar presentations


Ads by Google