SlideShare une entreprise Scribd logo
1  sur  118
Télécharger pour lire hors ligne
Specification by example
What? How? When?

Marcus Hammarberg
http://www.youtube.com/aptitudsthlm
Bandung
Theory of
Constraints
Where is our
bottleneck?
http://images.nationalgeographic.com/wpf/media-live/photos/000/212/cache/sinkholes-holes-ground-2007-guatemala-sinkhole_21282_600x450.jpg
Deliberate
Discovery
Gojko Adzic
... it’s no silver
bullet, but it seems
like a good start
Dan North
http://manning.com/adzic/

From Specification by Example	

Used with permission
http://www.wallpaperpimper.com/wallpaper/Military/F_16_Fighting_Falcon/F-16-Fighting-Falcon-20-9XTZMAN20G-1280x1024.jpg
http://www.wallpaperpimper.com/wallpaper/Military/F_16_Fighting_Falcon/F-16-Fighting-Falcon-20-9XTZMAN20G-1280x1024.jpg
Who sets scope?

http://2.bp.blogspot.com/-mJ8gPBlBRjY/TcYv9xOuWlI/AAAAAAAAKvY/0JniIDxlBjY/s1600/how-to-get-your-boss-off-your-back.jpg
How do they know
what they want?
How do they know
what they want?
Don’t let
the customer
limit
themselves

http://www.realestateradiousa.com/blog/wp-content/uploads/2008/09/straitjacket.jpg
Derive scope from
business goals
http://cojent7.files.wordpress.com/2010/04/business-goals1.jpg
Build the right thing!
§
1. Start with wide end of it on your right and
extending a foot below the narrow end	

2. Cross wide end over narrow and turn back
underneath	

3. Bring up and turn down to loop	

4. Pass wide end around frong from left to right	

5. Then, up through loop ...	

6. And down through knot in front. Tigthen carefully
and draw up to collar.
Go concrete with examples
http://www.flickr.com/photos/bensutherland/3961418687/
Scenario 1: Account is in credit!
Given the account is in credit!
And the card is valid!
And the dispenser contains cash!
When the customer requests €50!
Then !
ensure the account is debited €50!
And ensure €40 is dispensed!
And ensure the card is returned
Key examples
Key examples

http://www.bigideastobigresults.com/wp-content/uploads/2009/09/good_enough.jpg
Let’s try that, shall we?
Customers who buys three
books gets free shipping
Customers who buys three
books gets free shipping
Number of books

Free shipping?
Customers who buys three
books gets free shipping
Number of books

1

Free shipping?

-
Customers who buys three
books gets free shipping
Number of books

1
2

Free shipping?

-
Customers who buys three
books gets free shipping
Number of books

1
2
3

Free shipping?

X
Customers who buys three
books gets free shipping
Number of books

1
2
3
4

Free shipping?

X
X
To get a loan you need to
be older than 18
To get a loan you need to
be older than 18
Age of applicant

Can take loan?
To get a loan you need to
be older than 18
Age of applicant

17

Can take loan?

-
To get a loan you need to
be older than 18
Age of applicant

17
18

Can take loan?

X
To get a loan you need to
be older than 18
Age of applicant

17
18
19

Can take loan?

X
X
To get a loan you need to
be older than 18
Age of applicant

17
18
19
null?

Can take loan?

X
X
eeeeh?
Text

http://www.flickr.com/photos/toastytreat/4555895229

Who writes this
stuff anyway?
Refactor the
specification
Examples should be
precise and testable
Examples should be
precise and testable

Scripts are not specifications
Examples should be
precise and testable

Scripts are not specifications

Specifications should be about business
functionality, not software design
Examples should be
precise and testable

Scripts are not specifications

Specifications should be about business
functionality, not software design
Specifications should
be self-explanatory
Examples should be
precise and testable

Scripts are not specifications

Specifications should be about business
functionality, not software design

Specifications should
be in domain language

Specifications should
be self-explanatory
Shared
understanding
Shared
understanding
Testing
Shared
understanding
Testing
Documentation
Automation

http://jbehave.org/reference/stable/images/jbehave-logo.png

http://lh6.ggpht.com/_X3kaawac_g4/SuoT1Yd67pI/AAAAAAAAArU/
dhE-WLR0VKE/Unbenannt.png?imgmax=800

http://lh5.ggpht.com/_X3kaawac_g4/S0nxyUKaIYI/AAAAAAAAAu0/
CtKaMavsxoM/cucumber.jpg?imgmax=800
A Cucumber Scenario

Scenario 1: Account is in credit!
Given the account is in credit!
And the card is valid!
And the dispenser contains cash!
When the customer requests €50!
Then !
ensure the account is debited €50!
And ensure €50 is dispensed!
And ensure the card is returned
http://1.bp.blogspot.com/-3yjyeeTpRFI/Tea15VHttaI/AAAAAAAAC3w/YXoTDAv9tx8/s1600/hard_work.png
One document to rule them all ...
http://www.questpartnership.co.uk/blog/uploaded_images/restructuring-775119.jpg
“... features are an executable
map of the current
functionality of the system.”

Andrew Premdas (BDD Google Group)
ToC and
Specification by example
ToC and
Specification by example
• Better communication
ToC and
Specification by example
• Better communication
• Concrete examples
ToC and
Specification by example
• Better communication
• Concrete examples
• Frequent validation
ToC and
Specification by example
• Better communication
• Concrete examples
• Frequent validation
• Living documentation
Learn more
Learn more
Learn more
Learn more
Learn more
Learn more
www.marcusoft.net	

@marcusoftnet	

marcus.hammarberg@aptitud.se
www.marcusoft.net	

@marcusoftnet	

marcus.hammarberg@aptitud.se
Recording of this talk	

http://www.youtube.com/
aptitudsthlm
Specification by Example

Contenu connexe

Tendances

Henrik Kniberg: Lean from the Trenches keynote @ AgileEE
Henrik Kniberg: Lean from the Trenches keynote @ AgileEEHenrik Kniberg: Lean from the Trenches keynote @ AgileEE
Henrik Kniberg: Lean from the Trenches keynote @ AgileEE
Agileee
 

Tendances (20)

Agile Roles & responsibilities
Agile Roles & responsibilitiesAgile Roles & responsibilities
Agile Roles & responsibilities
 
Measuring What Matters in Your Agile Transformation
Measuring What Matters in Your Agile TransformationMeasuring What Matters in Your Agile Transformation
Measuring What Matters in Your Agile Transformation
 
A/B Testing for New Product Launches by Booking.com Sr PM
A/B Testing for New Product Launches by Booking.com Sr PMA/B Testing for New Product Launches by Booking.com Sr PM
A/B Testing for New Product Launches by Booking.com Sr PM
 
Finacle - Secure Coding Practices
Finacle - Secure Coding PracticesFinacle - Secure Coding Practices
Finacle - Secure Coding Practices
 
Agile Release Planning
Agile Release PlanningAgile Release Planning
Agile Release Planning
 
An introduction to agile estimation and release planning
An introduction to agile estimation and release planningAn introduction to agile estimation and release planning
An introduction to agile estimation and release planning
 
Wordpress 権限昇格の脆弱性について
Wordpress 権限昇格の脆弱性についてWordpress 権限昇格の脆弱性について
Wordpress 権限昇格の脆弱性について
 
重新想像:如何做技術選型決策 / Rethinking : Technical Decision
重新想像:如何做技術選型決策 / Rethinking : Technical Decision重新想像:如何做技術選型決策 / Rethinking : Technical Decision
重新想像:如何做技術選型決策 / Rethinking : Technical Decision
 
Scrum - Product Owner
Scrum - Product OwnerScrum - Product Owner
Scrum - Product Owner
 
Agile Coaching Workshop
Agile Coaching WorkshopAgile Coaching Workshop
Agile Coaching Workshop
 
Certified Scrum Product Owner: class desk, posters and photos
Certified Scrum Product Owner: class desk, posters and photosCertified Scrum Product Owner: class desk, posters and photos
Certified Scrum Product Owner: class desk, posters and photos
 
Lean Agile Metrics And KPIs
Lean Agile Metrics And KPIsLean Agile Metrics And KPIs
Lean Agile Metrics And KPIs
 
Building a Software Development Team - MaRS Best Practices
Building a Software Development Team - MaRS Best PracticesBuilding a Software Development Team - MaRS Best Practices
Building a Software Development Team - MaRS Best Practices
 
Clean Code - The Next Chapter
Clean Code - The Next ChapterClean Code - The Next Chapter
Clean Code - The Next Chapter
 
DSPでgolangの屍を超えた話 (オレシカナイト Vol.2)
DSPでgolangの屍を超えた話 (オレシカナイト Vol.2)DSPでgolangの屍を超えた話 (オレシカナイト Vol.2)
DSPでgolangの屍を超えた話 (オレシカナイト Vol.2)
 
Agile Scrum Estimation
Agile   Scrum EstimationAgile   Scrum Estimation
Agile Scrum Estimation
 
step by step to use LINE Notify - 20190527
step by step to use LINE Notify - 20190527step by step to use LINE Notify - 20190527
step by step to use LINE Notify - 20190527
 
Djangoフレームワークのユーザーモデルと認証
Djangoフレームワークのユーザーモデルと認証Djangoフレームワークのユーザーモデルと認証
Djangoフレームワークのユーザーモデルと認証
 
Henrik Kniberg: Lean from the Trenches keynote @ AgileEE
Henrik Kniberg: Lean from the Trenches keynote @ AgileEEHenrik Kniberg: Lean from the Trenches keynote @ AgileEE
Henrik Kniberg: Lean from the Trenches keynote @ AgileEE
 
새해 일어난 일
새해 일어난 일새해 일어난 일
새해 일어난 일
 

Similaire à Specification by Example

H h-business
H h-businessH h-business
H h-business
117700
 

Similaire à Specification by Example (20)

Milestones, SHUV, Roadmaps - Oh My!
Milestones, SHUV, Roadmaps - Oh My!Milestones, SHUV, Roadmaps - Oh My!
Milestones, SHUV, Roadmaps - Oh My!
 
Milestones, SHUV, Roadmaps - Oh My!
Milestones, SHUV, Roadmaps - Oh My!Milestones, SHUV, Roadmaps - Oh My!
Milestones, SHUV, Roadmaps - Oh My!
 
H h-business
H h-businessH h-business
H h-business
 
Management consulting interview preparation
Management consulting interview preparationManagement consulting interview preparation
Management consulting interview preparation
 
AI 101 for km washington november 2018 km world workshop
AI 101 for km washington november 2018 km world workshopAI 101 for km washington november 2018 km world workshop
AI 101 for km washington november 2018 km world workshop
 
PTC Group
PTC GroupPTC Group
PTC Group
 
Agile and Beyond :: The Technical Debt Trap
Agile and Beyond :: The Technical Debt TrapAgile and Beyond :: The Technical Debt Trap
Agile and Beyond :: The Technical Debt Trap
 
Value Proposition
Value PropositionValue Proposition
Value Proposition
 
Ptcgroup Presentation
Ptcgroup PresentationPtcgroup Presentation
Ptcgroup Presentation
 
Building vs Buying Software
Building vs Buying SoftwareBuilding vs Buying Software
Building vs Buying Software
 
QCT fantastici e dove trovarli - Crafted Software
QCT fantastici e dove trovarli - Crafted SoftwareQCT fantastici e dove trovarli - Crafted Software
QCT fantastici e dove trovarli - Crafted Software
 
IP67 Full HD GMSL2 HDR camera for Jetson AGX Xavier
IP67 Full HD GMSL2 HDR camera for Jetson AGX XavierIP67 Full HD GMSL2 HDR camera for Jetson AGX Xavier
IP67 Full HD GMSL2 HDR camera for Jetson AGX Xavier
 
High Performance Webdesign
High Performance WebdesignHigh Performance Webdesign
High Performance Webdesign
 
Sscg 008
Sscg 008Sscg 008
Sscg 008
 
SSCG Economic Forum, Nigeria
SSCG Economic Forum, NigeriaSSCG Economic Forum, Nigeria
SSCG Economic Forum, Nigeria
 
Eugene nizeyimana @ awec
Eugene nizeyimana @ awecEugene nizeyimana @ awec
Eugene nizeyimana @ awec
 
SSCG Malawi SME Financing Forum
SSCG Malawi SME Financing ForumSSCG Malawi SME Financing Forum
SSCG Malawi SME Financing Forum
 
Design ac render s
Design ac render sDesign ac render s
Design ac render s
 
Lander Academy: Brian Massey's Unexpected Formulas
Lander Academy: Brian Massey's Unexpected FormulasLander Academy: Brian Massey's Unexpected Formulas
Lander Academy: Brian Massey's Unexpected Formulas
 
JsDay - It's not you, It's me (or how to avoid being coupled with a Javascrip...
JsDay - It's not you, It's me (or how to avoid being coupled with a Javascrip...JsDay - It's not you, It's me (or how to avoid being coupled with a Javascrip...
JsDay - It's not you, It's me (or how to avoid being coupled with a Javascrip...
 

Plus de Marcus Hammarberg

Plus de Marcus Hammarberg (20)

20 Ideas On How To Improve Your Agile Board
20 Ideas On How To Improve Your Agile Board20 Ideas On How To Improve Your Agile Board
20 Ideas On How To Improve Your Agile Board
 
How kanban Saved a hospital in Indonesia
How kanban Saved a hospital in IndonesiaHow kanban Saved a hospital in Indonesia
How kanban Saved a hospital in Indonesia
 
How kanban Saved a hospital in Indoneisa OreDev 2016
How kanban Saved a hospital in Indoneisa OreDev 2016How kanban Saved a hospital in Indoneisa OreDev 2016
How kanban Saved a hospital in Indoneisa OreDev 2016
 
How kanban saved a hospital in Indoneisa LKNA2016
How kanban saved a hospital in Indoneisa LKNA2016How kanban saved a hospital in Indoneisa LKNA2016
How kanban saved a hospital in Indoneisa LKNA2016
 
ca 10 minutes on effective meetings
ca 10 minutes on effective meetingsca 10 minutes on effective meetings
ca 10 minutes on effective meetings
 
10 minutes on root cause analysis
10 minutes on root cause analysis10 minutes on root cause analysis
10 minutes on root cause analysis
 
ca 15 minutes on kanban
ca 15 minutes on kanbanca 15 minutes on kanban
ca 15 minutes on kanban
 
15 minutes on impact mapping
15 minutes on impact mapping15 minutes on impact mapping
15 minutes on impact mapping
 
20 minutes on strategic plans
20 minutes on strategic plans20 minutes on strategic plans
20 minutes on strategic plans
 
10 minutes on vision
10 minutes on vision10 minutes on vision
10 minutes on vision
 
10 minutes on mission
10 minutes on mission10 minutes on mission
10 minutes on mission
 
Impact mapping @ YOW West 2015
Impact mapping  @ YOW West 2015Impact mapping  @ YOW West 2015
Impact mapping @ YOW West 2015
 
Kanban in Action - YOW West 2015
Kanban in Action - YOW West 2015Kanban in Action - YOW West 2015
Kanban in Action - YOW West 2015
 
Kanban in Action
Kanban in ActionKanban in Action
Kanban in Action
 
Pass the pennies - Lean game simulation
Pass the pennies - Lean game simulationPass the pennies - Lean game simulation
Pass the pennies - Lean game simulation
 
Numbers simulation - less is more!
Numbers simulation - less is more!Numbers simulation - less is more!
Numbers simulation - less is more!
 
User stories - an introduction
User stories - an introductionUser stories - an introduction
User stories - an introduction
 
SpecFlow and some things I've picked up
SpecFlow and some things I've picked upSpecFlow and some things I've picked up
SpecFlow and some things I've picked up
 
Kanban In Action
Kanban In ActionKanban In Action
Kanban In Action
 
Userstories a practical intro
Userstories a practical introUserstories a practical intro
Userstories a practical intro
 

Dernier

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Dernier (20)

Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 

Specification by Example