SlideShare a Scribd company logo
Morten Berg and Jakub Holy present:




          From user stories to
           acceptance tests
     What we learned about Specification by
                   example




                                      Iterate :: 1/2012
Quick fly-through
The Key Concerns of SbE

"Doing the right thing vs. doing the thing right."

                   Deliver true business value

                   Build shared understanding

                   (Evolve living documentation)
Shared understanding
in business terms
 Shared understanding + business terms and
                 relations
                                       (also less rework)


     Aligned business, SW, test models

Small change in business => small in SW, test

Much, much better maintainability, evolvability

               Build the right thing
Specify
The Key Patterns of SbE                                                      collaboratively

         Business                                              Scope
                                     derive
           goal                                               (UC, US)

                                                                  ilustrate
 1.   Derive scope from business goal
 2.   Specify collaboratively
 3.   Ilustrate using examples
 4.   Refine the specification                                    Key
 5.   Automate validation w/o changing specification
 6.   Validate frequently                                       examples
 7.   Evolve into a documentation system

                                                   automate w/o changing

                                          Often,
            Living                                             Executable
        documentation                                         specification
                                          evolve
                                                       http://specificationbyexample.com/key_ideas.html
Goal: Shared understanding
0. Clarify the goal
1. Build the shared understanding
   ○ Collaborative specification...
   ○ ... with examples
2. Keep it
   ○ Automate validation
3. Profit from it
   ○ Evolve into living documentation



                                      "The devil is in the details"
Example specification with examples
Title: Free book delivery
Objective: VIP users who order more books get
free shipping in Norway.

Examples:
Customer    Books    Country   Free shipping?

VIP         5        Norway    Y

VIP         4        Norway    N

VIP         10       Danmark   N

Regular     10       Norway    N
Sidenote: Automization
Customer   Books   Country   Free shipping?




class FreeBookDeliveryTest {
   void setCustomer(..) {..}
   void setBooks(..) {..}
   void setCountry(..) {..}
   boolean isFreeShipping() {..}
}
Showtime: Some real-world
specifications with example
What makes a good specification
with examples?
Good
● Good google-able title
● Clear objective - how to read the examples?
● Uses business language, unified terms
● Couple of key, focused examples, complete
Bad
● Script ("click here, find css class X, ...)
● Too detailed, too verbose, duplication
● Many examples (bad understanding, bad
  representation, more concepts mixed)
Show the poster!
Introducing SbE & Its Applicability
                                              9-15
                                              mo
Strategy: What's the team's top pain? Can
something from SbE fix it?               buzz-
                                         words

                                             Big
Examples:                                    Bang
● Lot of rework devs - testers => better shared
    understanding via Specification workshop
● Late feedback from testers => automate
Key: Introduce what you need, when you need
it, step by step. Shift culture first. It's easy!
Why to specify collaboratively?
can become
Examples                    Tests
  ela




                           rify
   bo




                           ve
    rat
        e




            Requirements
Single source of truth
Devs: Truth in code
Testers: Truth in test cases
Business analyst: Truth in documents

Use a single source of truth, avoid translation!

=> Start with business analyst
  Extend with examples from devs
  Extend with examples from testers
Specification by example - course summary
Random highlights
How to Make Acceptance Tests
Maintainable

1. Aligned business, software, and test models
   ○ => small change in one is small in the other too

2. Test under the surface level, if possible
   ○ Service > Servlet > UI - decide by risk vs. cost

3. Isolate tests from implementation by layers of
   test abstraction (What>Instrumentation>DSL)

See The Holy Java: How to Create Maintainable
Acceptance Tests (http://wp.me/pTHiC-tl)
Why Are We Doing This?
The Effect Maps Technique
Simple mind-mapping technique that incredibly
facilitates agile product design, planning,
prioritisation, and scoping.
                                          demo



Levels:
1. Why - the measurable business goal
2. Who can help/hinder achievel of the goal?
3. How can they do it?
4. What are the SW features or business
   activities that support it?
Techniques: Spec Workshop and
Diverge & Merge
Specification Workshop (½ day → 2w sprint)
  ● All: business + devs + testers
    ○ Business: What, why
    ○ Devs: What's technically possible/troublesome
    ○ Testers: How to test (break) this? Corner cases
  ● Surface hidden complexities, discover assumptions
  ● Build shared understanding (=> feedback exercise)
Diverge & Merge
  ● Groups of 3-5 work in parallel 10-20 min, then merge
    results
  ● More divergent => richer & better ideas
  ● Prevent paralysation by confining troublesome people
Acceptance Test Automation Tools
● FitNesse - wiki-based
  ○ Cons: Long learning, encourages copy&paste
  ○ Pros: Wiki, mature
● Concordion - new, HTML+JUnit
  ○ Pros: Contrary to FitNesse disables copying, quick to
    learn, integrated anywhere via JUnit, free-form
  ○ Cons: No live editing, no copying => not for 104 tests
● Cucumber - new, websites, Ruby, ecosystem
  ○ Pros: Simple text format (RegExp), easy2learn, web
  ○ Cons: Only test execution - other tools for the rest
● Robot Framework - tabular, keyword-driven
  ○ Pros: Great for testers w/o devs, libraries (SQL,..)
● Commercial - GreenPepper (Confluence), ...
The end is coming, run for your life!
Other Key Lessons
● When the time is short ... do communicate!
● The key benefit of SbE aside of improved
  communication is living documentation;
  regression tests are only a minor by-product
● (and many others :-))
Quiz
What have we learned today?
Resources
      Gojko Adzic: Specification by
      example, 2011
      - condensed experience of 50 highly
      successful teams

       Eric Evans: Domain Driven Design,
       2003

      Gojko Adzic: Agile product
      management using Effect Maps
      (paper)

More Related Content

KEY
Specification by Example
PPTX
Introducción a Agile
PPTX
Ux presentation - To get stakeholder buy in
PDF
Paul ist Product Owner (DWX 2017)
PPTX
Overview of Agile Methodology
PDF
Agile+Slides.pdf
PDF
UX Design Process 101: Where to start with UX
PDF
Lightening Talk: definition of ready
Specification by Example
Introducción a Agile
Ux presentation - To get stakeholder buy in
Paul ist Product Owner (DWX 2017)
Overview of Agile Methodology
Agile+Slides.pdf
UX Design Process 101: Where to start with UX
Lightening Talk: definition of ready

What's hot (20)

PDF
Kanban boards step by step
PPTX
Agile Center of Excellence : Presented by Rahul Sudame
PPT
Agile methodology
PDF
SAFe® - scaled agile framework in practice
PPTX
Introduction to Agile Software Development
PDF
5 Practices for an Agile Mindset
PPTX
Agile Methodology and Tools
DOCX
Agile Methology Seminar Report
PPTX
Introduction to Chaos Engineering
PDF
12 principles for Agile Development
PPTX
"Lean" Product Management
PPTX
Agile Metrics: Value, Flow, Quality, Culture
PDF
Agile Operations For Optimizing Tasks And Enhancing Team Performance PowerPoi...
PDF
Apt agile methodology
PDF
SOA, Microservices and Event Driven Architecture
PPTX
Agile estimation
PDF
What is agile model?Working of agile model
DOC
Abhishek Resume QA
PDF
Agile transformation 1.3
PPTX
KANBAN en una PMO (a nivel de Portfolio Management)
Kanban boards step by step
Agile Center of Excellence : Presented by Rahul Sudame
Agile methodology
SAFe® - scaled agile framework in practice
Introduction to Agile Software Development
5 Practices for an Agile Mindset
Agile Methodology and Tools
Agile Methology Seminar Report
Introduction to Chaos Engineering
12 principles for Agile Development
"Lean" Product Management
Agile Metrics: Value, Flow, Quality, Culture
Agile Operations For Optimizing Tasks And Enhancing Team Performance PowerPoi...
Apt agile methodology
SOA, Microservices and Event Driven Architecture
Agile estimation
What is agile model?Working of agile model
Abhishek Resume QA
Agile transformation 1.3
KANBAN en una PMO (a nivel de Portfolio Management)
Ad

Viewers also liked (20)

PDF
Tutorial: Implementing Specification-By-Example with Gherkin
PPT
Specification by example and agile acceptance testing
PDF
Specification-By-Example with Gherkin
PDF
Specification by Example - Agile India 2015
PDF
Practical way to experience of Specification by Example
PPTX
Acceptance Test Driven Development and Robot Framework
PPTX
An Overview of User Acceptance Testing (UAT)
PPT
watir-webdriver
PPTX
BDD with F# at DDD9
PPT
Test Automation using Ruby, Watir, Rspec and AutoIT for GAMESCALE products te...
PPTX
BDD - beyond: Given, When and Then
PPTX
Specification by Example
PDF
Specification-By-Example with Gherkin
PPT
Experience from specification_by_examples
PPT
'An Evolution Into Specification By Example' by Adam Knight
PDF
Bdd training - v3
PDF
Serverless Code Camp Barcelona
PPTX
Specflow: Specification by Example
PPTX
How to become a 'specification by example' rocket scientist
PPTX
Regression topics
Tutorial: Implementing Specification-By-Example with Gherkin
Specification by example and agile acceptance testing
Specification-By-Example with Gherkin
Specification by Example - Agile India 2015
Practical way to experience of Specification by Example
Acceptance Test Driven Development and Robot Framework
An Overview of User Acceptance Testing (UAT)
watir-webdriver
BDD with F# at DDD9
Test Automation using Ruby, Watir, Rspec and AutoIT for GAMESCALE products te...
BDD - beyond: Given, When and Then
Specification by Example
Specification-By-Example with Gherkin
Experience from specification_by_examples
'An Evolution Into Specification By Example' by Adam Knight
Bdd training - v3
Serverless Code Camp Barcelona
Specflow: Specification by Example
How to become a 'specification by example' rocket scientist
Regression topics
Ad

Similar to Specification by example - course summary (20)

PPT
Introduction to Test Driven Development
PPT
Bridging the communication gap
KEY
Essential practices and thinking tools for Agile Adoption
PDF
Agile Testing 20021015
PDF
Test-Driven Developments are Inefficient; Behavior-Driven Developments are a ...
PDF
PDF
Enabling Innovation using Lean Startup
PPT
Agile Methodologies And Extreme Programming - Svetlin Nakov
PPTX
CucumberSeleniumWD
PPTX
Testing Sap: Modern Methodology
PDF
The View - Lotusscript coding best practices
PDF
Agile testing
PDF
Semiconductor Design Community
PDF
Lean DevOps - Lessons Learned from Innovation-driven Companies
PDF
Markus Clermont - Surviving in an Agile Environment - Google - SoftTest Ireland
PPTX
BEHAVIOR-DRIVEN-DEVELOPMENT.pptx
PDF
U Xmagic Agile Presentation
PDF
Specification-by-Example: A Cucumber Implementation
KEY
ATDD in Practice
PPT
Agile Methodologies And Extreme Programming
Introduction to Test Driven Development
Bridging the communication gap
Essential practices and thinking tools for Agile Adoption
Agile Testing 20021015
Test-Driven Developments are Inefficient; Behavior-Driven Developments are a ...
Enabling Innovation using Lean Startup
Agile Methodologies And Extreme Programming - Svetlin Nakov
CucumberSeleniumWD
Testing Sap: Modern Methodology
The View - Lotusscript coding best practices
Agile testing
Semiconductor Design Community
Lean DevOps - Lessons Learned from Innovation-driven Companies
Markus Clermont - Surviving in an Agile Environment - Google - SoftTest Ireland
BEHAVIOR-DRIVEN-DEVELOPMENT.pptx
U Xmagic Agile Presentation
Specification-by-Example: A Cucumber Implementation
ATDD in Practice
Agile Methodologies And Extreme Programming

More from Jakub Holy (6)

PDF
Dissolving Technical Debt on Agile Projects - Smidig 2012
ODP
Dealing With Legacy: The Real-World Experience
PDF
Commit on day one thanks to vagrant & puppet!
PDF
Why Functional Programming and Clojure - LightningTalk
ODP
Brief introduction into DbUnit Express, Q3/2011
PDF
Seminar Nastroje Jednotk Testovani
Dissolving Technical Debt on Agile Projects - Smidig 2012
Dealing With Legacy: The Real-World Experience
Commit on day one thanks to vagrant & puppet!
Why Functional Programming and Clojure - LightningTalk
Brief introduction into DbUnit Express, Q3/2011
Seminar Nastroje Jednotk Testovani

Recently uploaded (20)

PPTX
Big Data Technologies - Introduction.pptx
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Machine learning based COVID-19 study performance prediction
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
Programs and apps: productivity, graphics, security and other tools
PPTX
Spectroscopy.pptx food analysis technology
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
Cloud computing and distributed systems.
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Encapsulation theory and applications.pdf
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Big Data Technologies - Introduction.pptx
Mobile App Security Testing_ A Comprehensive Guide.pdf
Machine learning based COVID-19 study performance prediction
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Agricultural_Statistics_at_a_Glance_2022_0.pdf
“AI and Expert System Decision Support & Business Intelligence Systems”
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Network Security Unit 5.pdf for BCA BBA.
Programs and apps: productivity, graphics, security and other tools
Spectroscopy.pptx food analysis technology
Spectral efficient network and resource selection model in 5G networks
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
MIND Revenue Release Quarter 2 2025 Press Release
Dropbox Q2 2025 Financial Results & Investor Presentation
Cloud computing and distributed systems.
The Rise and Fall of 3GPP – Time for a Sabbatical?
Encapsulation theory and applications.pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Profit Center Accounting in SAP S/4HANA, S4F28 Col11

Specification by example - course summary

  • 1. Morten Berg and Jakub Holy present: From user stories to acceptance tests What we learned about Specification by example Iterate :: 1/2012
  • 3. The Key Concerns of SbE "Doing the right thing vs. doing the thing right." Deliver true business value Build shared understanding (Evolve living documentation)
  • 4. Shared understanding in business terms Shared understanding + business terms and relations (also less rework) Aligned business, SW, test models Small change in business => small in SW, test Much, much better maintainability, evolvability Build the right thing
  • 5. Specify The Key Patterns of SbE collaboratively Business Scope derive goal (UC, US) ilustrate 1. Derive scope from business goal 2. Specify collaboratively 3. Ilustrate using examples 4. Refine the specification Key 5. Automate validation w/o changing specification 6. Validate frequently examples 7. Evolve into a documentation system automate w/o changing Often, Living Executable documentation specification evolve http://specificationbyexample.com/key_ideas.html
  • 6. Goal: Shared understanding 0. Clarify the goal 1. Build the shared understanding ○ Collaborative specification... ○ ... with examples 2. Keep it ○ Automate validation 3. Profit from it ○ Evolve into living documentation "The devil is in the details"
  • 7. Example specification with examples Title: Free book delivery Objective: VIP users who order more books get free shipping in Norway. Examples: Customer Books Country Free shipping? VIP 5 Norway Y VIP 4 Norway N VIP 10 Danmark N Regular 10 Norway N
  • 8. Sidenote: Automization Customer Books Country Free shipping? class FreeBookDeliveryTest { void setCustomer(..) {..} void setBooks(..) {..} void setCountry(..) {..} boolean isFreeShipping() {..} }
  • 10. What makes a good specification with examples? Good ● Good google-able title ● Clear objective - how to read the examples? ● Uses business language, unified terms ● Couple of key, focused examples, complete Bad ● Script ("click here, find css class X, ...) ● Too detailed, too verbose, duplication ● Many examples (bad understanding, bad representation, more concepts mixed)
  • 12. Introducing SbE & Its Applicability 9-15 mo Strategy: What's the team's top pain? Can something from SbE fix it? buzz- words Big Examples: Bang ● Lot of rework devs - testers => better shared understanding via Specification workshop ● Late feedback from testers => automate Key: Introduce what you need, when you need it, step by step. Shift culture first. It's easy!
  • 13. Why to specify collaboratively?
  • 14. can become Examples Tests ela rify bo ve rat e Requirements
  • 15. Single source of truth Devs: Truth in code Testers: Truth in test cases Business analyst: Truth in documents Use a single source of truth, avoid translation! => Start with business analyst Extend with examples from devs Extend with examples from testers
  • 18. How to Make Acceptance Tests Maintainable 1. Aligned business, software, and test models ○ => small change in one is small in the other too 2. Test under the surface level, if possible ○ Service > Servlet > UI - decide by risk vs. cost 3. Isolate tests from implementation by layers of test abstraction (What>Instrumentation>DSL) See The Holy Java: How to Create Maintainable Acceptance Tests (http://wp.me/pTHiC-tl)
  • 19. Why Are We Doing This? The Effect Maps Technique Simple mind-mapping technique that incredibly facilitates agile product design, planning, prioritisation, and scoping. demo Levels: 1. Why - the measurable business goal 2. Who can help/hinder achievel of the goal? 3. How can they do it? 4. What are the SW features or business activities that support it?
  • 20. Techniques: Spec Workshop and Diverge & Merge Specification Workshop (½ day → 2w sprint) ● All: business + devs + testers ○ Business: What, why ○ Devs: What's technically possible/troublesome ○ Testers: How to test (break) this? Corner cases ● Surface hidden complexities, discover assumptions ● Build shared understanding (=> feedback exercise) Diverge & Merge ● Groups of 3-5 work in parallel 10-20 min, then merge results ● More divergent => richer & better ideas ● Prevent paralysation by confining troublesome people
  • 21. Acceptance Test Automation Tools ● FitNesse - wiki-based ○ Cons: Long learning, encourages copy&paste ○ Pros: Wiki, mature ● Concordion - new, HTML+JUnit ○ Pros: Contrary to FitNesse disables copying, quick to learn, integrated anywhere via JUnit, free-form ○ Cons: No live editing, no copying => not for 104 tests ● Cucumber - new, websites, Ruby, ecosystem ○ Pros: Simple text format (RegExp), easy2learn, web ○ Cons: Only test execution - other tools for the rest ● Robot Framework - tabular, keyword-driven ○ Pros: Great for testers w/o devs, libraries (SQL,..) ● Commercial - GreenPepper (Confluence), ...
  • 22. The end is coming, run for your life!
  • 23. Other Key Lessons ● When the time is short ... do communicate! ● The key benefit of SbE aside of improved communication is living documentation; regression tests are only a minor by-product ● (and many others :-))
  • 24. Quiz What have we learned today?
  • 25. Resources Gojko Adzic: Specification by example, 2011 - condensed experience of 50 highly successful teams Eric Evans: Domain Driven Design, 2003 Gojko Adzic: Agile product management using Effect Maps (paper)