reduced specification by_example2

Post on 07-Jul-2015

70 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Specification By Example• Derive scope from goals

• Specify collaboratively

• Illustrate using examples

• Refine the specification

• Automate validation

• Validate frequently

• Evolve a documentation system

Specification By Example• Derive scope from goals

• Specify collaboratively

• Illustrate using examples

• Refine the specification

• Automate validation

• Validate frequently

• Evolve a documentation system

How do we do it?Deriving Scope from goals

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

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

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

Specification By Example• Derive scope from goals

• Specify collaboratively

• Illustrate using examples

• Refine the specification

• Automate validation

• Validate frequently

• Evolve a documentation system

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

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

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

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

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

Specification By Example• Derive scope from goals

• Specify collaboratively

• Illustrate using examples

• Refine the specification

• Automate validation

• Validate frequently

• Evolve a documentation system

Illustrating Using Examples

• Avoid ambiguities

Illustrating Using Examples

• Avoid ambiguities

• Examples should cover complete scope

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 |

Illustrating Using Examples

• Avoid ambiguities

• Examples should cover complete scopeo - Experiment with data

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 |

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

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

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 |

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

Specification By Example• Derive scope from goals

• Specify collaboratively

• Illustrate using examples

• Refine the specification

• Automate validation

• Validate frequently

• Evolve a documentation system

Refining the Specification• Polish the specification for maximum clarity

Refining the Specification• Polish the specification for maximum clarity

o - lack of ambiguity

Refining the Specification• Polish the specification for maximum clarity

o - lack of ambiguity

o - maintainability

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

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

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

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 |

Specification By Example• Derive scope from goals

• Specify collaboratively

• Illustrate using examples

• Refine the specification

• Automate validation

• Validate frequently

• Evolve a documentation system

Automating Validation Without Changing

Specifications• Initial upfront investment, long term savings

Automating Validation Without Changing

Specifications• Initial upfront investment, long term savings

• Design for automation

Automating Validation Without Changing

Specifications• Initial upfront investment, long term savings

• Design for automation

• Treat automation code as first-class

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

Specification By Example• Derive scope from goals

• Specify collaboratively

• Illustrate using examples

• Refine the specification

• Automate validation

• Validate frequently

• Evolve a documentation system

Validate Frequently• Promotes reliability and stability

Validate Frequently• Promotes reliability and stability

• Provides rapid feedback

Validate Frequently• Promotes reliability and stability

• Provides rapid feedback

• Allows the generation of metrics

Validate Frequently• Promotes reliability and stability

• Provides rapid feedback

• Allows the generation of test metrics

• Isolate external systems for reliability and speed

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

Specification By Example• Derive scope from goals

• Specify collaboratively

• Illustrate using examples

• Refine the specification

• Automate validation

• Validate frequently

• Evolve a documentation system

Evolving a Documentation System

• Tests must remain easy to understand

Evolving a Documentation System

• Tests must remain easy to understand

• Avoid complexity and redundancy in your tests

Evolving a Documentation System

• Tests must remain easy to understand

• Avoid complexity and redundancy in your tests

• Use a consistent domain language

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

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 OperationsAlex.Freidah@patch.com

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

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.

top related