reduced specification by_example2

50

Upload: afreidah

Post on 07-Jul-2015

70 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Reduced specification by_example2
Page 2: Reduced specification by_example2

Specification By Example• Derive scope from goals

• Specify collaboratively

• Illustrate using examples

• Refine the specification

• Automate validation

• Validate frequently

• Evolve a documentation system

Page 3: Reduced specification by_example2
Page 4: Reduced specification by_example2

Specification By Example• Derive scope from goals

• Specify collaboratively

• Illustrate using examples

• Refine the specification

• Automate validation

• Validate frequently

• Evolve a documentation system

Page 5: Reduced specification by_example2

How do we do it?Deriving Scope from goals

• Who sets the scope of the work? o Traditionally the product/business owner

Page 6: Reduced specification by_example2

How do we do it?Deriving Scope from goals

• Who sets the scope of the work? o Traditionally the product/business owner

• Is there a better way? o Let the team develop scope from goals

Page 7: Reduced specification by_example2

Why do we need to derive scope from goals like this?• Sometimes the real goal isn’t what you thought, or

there is a better solution

Page 8: Reduced specification by_example2

Specification By Example• Derive scope from goals

• Specify collaboratively

• Illustrate using examples

• Refine the specification

• Automate validation

• Validate frequently

• Evolve a documentation system

Page 9: Reduced specification by_example2

Specifying CollaborativelyWhy do we want to do this?

• Leverage expertise

“Specification by Example won’t work if we write documents in insolation, even if we implement all the other patterns described in this book.” – Gojko Adzic

Page 10: Reduced specification by_example2

Specifying CollaborativelyWhy do we want to do this?

• Leverage expertise

• Promote communication and involvement

“Specification by Example won’t work if we write documents in insolation, even if we implement all the other patterns described in this book.” – Gojko Adzic

Page 11: Reduced specification by_example2

Specifying CollaborativelyWhy do we want to do this?

• Leverage expertise

• Promote communication and involvement

• Shared understanding

“Specification by Example won’t work if we write documents in insolation, even if we implement all the other patterns described in this book.” – Gojko Adzic

Page 12: Reduced specification by_example2

Specifying CollaborativelyWhy do we want to do this?

• Leverage expertise

• Promote communication and involvement

• Shared understanding

• Breaking down walled gardens

“Specification by Example won’t work if we write documents in insolation, even if we implement all the other patterns described in this book.” – Gojko Adzic

Page 13: Reduced specification by_example2

Feature: Free Delivery

Scenario Outline:

Free delivery is offered to VIP customers once they

purchase a certain number of books. Free delivery

is not offered to regular customers.

Given that the number of books to get free delivery is 5

And I am a VIP customer

When I checkout with 5 books in my shopping cart

Then the delivery methods listed should be Free and Standard

Page 14: Reduced specification by_example2

Specification By Example• Derive scope from goals

• Specify collaboratively

• Illustrate using examples

• Refine the specification

• Automate validation

• Validate frequently

• Evolve a documentation system

Page 15: Reduced specification by_example2

Illustrating Using Examples

• Avoid ambiguities

Page 16: Reduced specification by_example2

Illustrating Using Examples

• Avoid ambiguities

• Examples should cover complete scope

Page 17: Reduced specification by_example2

Feature: Free Delivery

Scenario Outline:Free delivery is offered to VIP customers once they purchase a

certain number of books. Free delivery is not offered to regular

customers.

Given that the number of books to get free delivery is 5And I am a <customer> customer

When I checkout with <contents> in my shopping cart

Then the delivery methods listed should be <delivery>

Scenarios:| customer | contents | delivery |

| VIP | 5 books | Free, Standard |

| VIP | 4 books | Standard |

| Regular | 10 books | Standard |

Page 18: Reduced specification by_example2

Illustrating Using Examples

• Avoid ambiguities

• Examples should cover complete scopeo - Experiment with data

Page 19: Reduced specification by_example2

Feature: Free Delivery

Scenario Outline:

Free delivery is offered to VIP customers once they purchase a certain

number of books. Free delivery is not offered to regular customers or

customers buying anything other than books

Given that the number of books to get free delivery is 5

And I am a <customer> customer

When I checkout with <contents> in my shopping cart

Then the delivery methods listed should be <delivery>

Scenarios:

| customer | contents | delivery |

| VIP | 5 books | Free, Standard |

| VIP | 4 books | Standard |

| Regular | 10 books | Standard |

| VIP | 5 Washing Machines | Standard |

| VIP | 5 books, 1 Washing Machine | Standard |

| VIP | 6 books | Free, Standard |

| Regular | 100 books | Standard |

| Regular | 15 Washing Machines | Standard |

| VIP | 4 books, 1 Washing Machine | Standard |

Page 20: Reduced specification by_example2

Illustrating Using Examples

• Avoid ambiguities

• Examples should cover complete scopeo - Experiment with data

o - Come up with alternate ways to test it

• Easy to understand

Page 21: Reduced specification by_example2

Illustrating Using Examples

• Avoid ambiguities

• Examples should cover complete scopeo - Experiment with data

o - Come up with alternate ways to test it

• Easy to understando - avoid specifying every combination possible

Page 22: Reduced specification by_example2

Feature: VIP customers get free delivery

Free delivery is offered to VIP customers once they purchase a certain

number of books. Free delivery is not offered to regular customers or VIP

customers buying anything other than books

Scenario Outline: Free Delivery

Given that the number of books to get free delivery is five

And I am a <Customer> customer

When I checkout with <Contents> in my shopping cart

Then the delivery methods listed should be <Delivery>

Scenarios: VIP customers

| Customer | Contents | Delivery |

| VIP | 5 books | Free, Standard |

| VIP | 4 books | Standard |

| VIP | 5 Washing Machines | Standard |

| VIP | 5 Books, 1 Washing Machine | Standard |

| Regular | 10 books | Standard |

Page 23: Reduced specification by_example2

Illustrating Using Examples

• Avoid ambiguities

• Examples should cover complete scopeo - Experiment with data

o - Come up with alternate ways to test it

• Easy to understando - avoid specifying every combination possible

o - implied concepts

Page 24: Reduced specification by_example2

Specification By Example• Derive scope from goals

• Specify collaboratively

• Illustrate using examples

• Refine the specification

• Automate validation

• Validate frequently

• Evolve a documentation system

Page 25: Reduced specification by_example2

Refining the Specification• Polish the specification for maximum clarity

Page 26: Reduced specification by_example2

Refining the Specification• Polish the specification for maximum clarity

o - lack of ambiguity

Page 27: Reduced specification by_example2

Refining the Specification• Polish the specification for maximum clarity

o - lack of ambiguity

o - maintainability

Page 28: Reduced specification by_example2

Refining the Specification• Polish the specification for maximum clarity

o - lack of ambiguity

o - maintainability

• What to focus ono - examples should be precise and testable

Page 29: Reduced specification by_example2

Refining the Specification• Polish the specification for maximum clarity

o - - lack of ambiguity

o - maintainability

• What to focus ono - examples should be precise and testable

o - business functionality, not software design

Page 30: Reduced specification by_example2

Refining the Specification• Polish the specification for maximum clarity

o - lack of ambiguity

o - maintainability

• What to focus ono - examples should be precise and testable

o - business functionality, not software design

o - use descriptive titles and explanations

Page 31: Reduced specification by_example2

Feature: VIP customers get free delivery

Free delivery is offered to VIP customers once they purchase a certainnumber of books. Free delivery is not offered to regular customers or VIP

customers buying anything other than books

Scenario Outline: Free Delivery

Given that the number of books to get free delivery is fiveAnd I am a <Customer> customer

When I checkout with <Contents> in my shopping cart

Then the delivery methods listed should be <Delivery>

Scenarios: VIP customers

| Customer | Contents | Delivery |

| VIP | 5 books | Free, Standard |

| VIP | 4 books | Standard |

| VIP | 5 Washing Machines | Standard |

| VIP | 5 Books, 1 Washing Machine | Standard |

Scenarios: Regular customers

| Customer | Contents | Delivery |

| Regular | 10 books | Standard |

Page 32: Reduced specification by_example2

Specification By Example• Derive scope from goals

• Specify collaboratively

• Illustrate using examples

• Refine the specification

• Automate validation

• Validate frequently

• Evolve a documentation system

Page 33: Reduced specification by_example2

Automating Validation Without Changing

Specifications• Initial upfront investment, long term savings

Page 34: Reduced specification by_example2

Automating Validation Without Changing

Specifications• Initial upfront investment, long term savings

• Design for automation

Page 35: Reduced specification by_example2

Automating Validation Without Changing

Specifications• Initial upfront investment, long term savings

• Design for automation

• Treat automation code as first-class

Page 36: Reduced specification by_example2

Automating Validation Without Changing

Specifications• Initial upfront investment, long term savings

• Design for automation

• Treat automation code as first-class

• Avoid pre-populated transaction data

Page 37: Reduced specification by_example2

Specification By Example• Derive scope from goals

• Specify collaboratively

• Illustrate using examples

• Refine the specification

• Automate validation

• Validate frequently

• Evolve a documentation system

Page 38: Reduced specification by_example2

Validate Frequently• Promotes reliability and stability

Page 39: Reduced specification by_example2

Validate Frequently• Promotes reliability and stability

• Provides rapid feedback

Page 40: Reduced specification by_example2

Validate Frequently• Promotes reliability and stability

• Provides rapid feedback

• Allows the generation of metrics

Page 41: Reduced specification by_example2

Validate Frequently• Promotes reliability and stability

• Provides rapid feedback

• Allows the generation of test metrics

• Isolate external systems for reliability and speed

Page 42: Reduced specification by_example2

Validate Frequently• Promotes reliability and stability

• Provides rapid feedback

• Allows the generation of test metrics

• Isolate external systems for reliability and speed

• Separate tests into units for targeted validation

Page 43: Reduced specification by_example2

Specification By Example• Derive scope from goals

• Specify collaboratively

• Illustrate using examples

• Refine the specification

• Automate validation

• Validate frequently

• Evolve a documentation system

Page 44: Reduced specification by_example2

Evolving a Documentation System

• Tests must remain easy to understand

Page 45: Reduced specification by_example2

Evolving a Documentation System

• Tests must remain easy to understand

• Avoid complexity and redundancy in your tests

Page 46: Reduced specification by_example2

Evolving a Documentation System

• Tests must remain easy to understand

• Avoid complexity and redundancy in your tests

• Use a consistent domain language

Page 47: Reduced specification by_example2

Evolving a Documentation System

• Tests must remain easy to understand

• Avoid complexity and redundancy in your tests

• Use a consistent domain language

• Make sure documentation is easily accessible

Page 48: Reduced specification by_example2

Specification By Example• Derive scope from goals

• Specify collaboratively

• Illustrate using examples

• Refine the specification

• Automate validation

• Validate frequently

• Evolve a documentation system

Alex FreidahPatch/AOL Data Warehouse [email protected]

Page 49: Reduced specification by_example2

http://specificationbyexample.com/

http://gojko.net/

http://techbus.safaribooksonline.com/book/-/9781617290084

Additional Information

Tools

http://cukes.info/ Cucumberhttp://fitnesse.org/ FitNessehttp://jbehave.org/ Jbehavehttp://www.concordion.org/ Concordionhttp://www.specflow.org/specflownew/ specflowhttp://www.greenpeppersoftware.com/ Green Pepper

Page 50: Reduced specification by_example2

Image Credits• http://funpicc.blogspot.com/2010/12/im-huge-metal-fan-me-too.html

• http://specificationbyexample.com/

• http://johnmartel.blogspot.com/2010/07/how-web-design-team-disconnect-during.html

• http://en.wikipedia.org/wiki/File:F-16_June_2008.jpg

• http://www.elisabethhubert.com/wp-content/uploads/2012/02/Experiment.gif

• http://corkboardconnections.blogspot.com/2012/02/that-was-easy.html

• http://www.busytrade.com/buying-leads/1843437/Buying-Loose-Raw-And-Uncut-Diamonds.html

• http://www.ecrater.com/p/7389126/50-carats-natural-uncut-rough-raw

• http://www.onedesk.com/2013/01/integrating-customer-feedback-into-product-development/feedback-2/

• http://www.digitallinguistics.com/

• http://uxmag.com/articles/the-dirtiest-word-in-ux-complexity

• All images were found using google image searches – these are links to where each image was linked from by google.