SlideShare uma empresa Scribd logo
1 de 72
Baixar para ler offline
FROM STAKEHOLDER EXAMPLES TO LIVING DOCUMENTATION
Christian Hassa - ch@techtalk.at - @chr99ha
.NET User Group Bern, 5th of December 2012
Specification-By-Example
with Gherkin
TechTalk at a glance
• Agile consulting and delivery
• Offices in: Vienna, Budapest, Zurich
• Established in 1993
Vienna/Austria
3
How do we specify
requirements?
4
The purpose of user stories …
• Describe user needs
• Describe system features
• Unit of planning
• Reminder for a discussion
• Mechanism to defer a discussion
5
Impact Mapping
Story Mapping
Specification-By-Example
Establishing a shared understanding
Why?
How?
Code
Acceptance
Criterion
Epic
Capability
Impact, Goal
Easier to define upfront Harder to define upfront
Reminder
for a
discussion
Bug
report
Isolated,
formalized
example
User Activity
User Story
Example
6
Collecting Acceptance Criteria
“I would try to put a book into the
shopping cart …”
“I would try to remove a book
from the shopping cart…”
“I’d check whether the shopping cart
is empty, when I enter the shop …”
“I would try to add the same book
again to the shopping cart …”
Books can be placed into
shopping cart.
Books can be removed from
shopping cart.
Shopping cart should be empty
when entering the shop.
Adding same book again to
shopping cart should increase
quantity.
As a potential customer
I want to collect books in a shopping cart
So that I can order several books at once.
“Imagine this story is
already implemented:
how would you verify it?”
7
Why
do we need
examples?
8
UI wire frames,
existing UI
rules, key examples
existing artifacts,
samples
Examples for user stories
10
Specification-by-Example
Examples …
• make abstract descriptions
better understandable
However …
• examples are usually not formally
exchanged or documented
Brian Marick
Examples Tests
Requirements
consist of
describe verify
fulfillment of
11
Discussion of acceptance criteria
public void TestInitialOrderDiscount()
{
Customer newCustomer = new Customer();
Order newOrder = new Order(newCustomer);
newOrder.AddBook(
Catalog.Find(“ISBN-0955683610”)
);
Assert.Equals(33.75,
newOrder.Subtotal);
}
Register as “bart_bookworm”
Go to “/catalog/search”
Enter “ISBN-0955683610”
Click “Search”
Click “Add to Cart”
Click “View Cart”
Verify “Subtotal” is “$33.75”
We would like to encourage new users to
buy in our shop.
Therefore we offer 10% discount for their
first order.
Original idea for the illustration: George Dinwiddie
http://blog.gdinwidiee.com
12
… illustrated with formalized examples
Given the user has not ordered yet
When the user adds a book with the price of EUR 37.5
into the shopping cart
Then the shopping cart sub-total is EUR 33.75.
Original idea for the illustration: George Dinwiddie
http://blog.gdinwidiee.com
13
Discover hidden assumptions
Actually, this not quite right:
Books on sale should be excluded.
Original idea for the illustration: George Dinwiddie
http://blog.gdinwidiee.com
14
Collaboration: 3 amigos
“Happy
Path”
Technical
feasability
Exceptions,
border cases
Original idea for the illustration: George Dinwiddie
http://blog.gdinwidiee.com
15
Abstract acceptance criteria
As a shop visitor
I want to collect books in my shopping basket
so that I can purchase multiple books at once.
Books can be added to the shopping basket
Books can be removed from the shopping basket
Shopping basket is initially empty
The same book can be added multiple times to the shopping
basket
16
Examples for acceptance criteria
As a shop visitor
I want to collect books in my shopping basket
so that I can purchase multiple books at once.
Books can be added to the shopping basket
Given my shopping basket is empty
When I add the book “Harry Potter” to my shopping basket
Then my shopping basket should contain 1 copy of “Harry Potter”
17
As a shop visitor
I want to collect books in my shopping basket
so that I can purchase multiple books at once.
Books can be added to the shopping basket
Examples for acceptance criteria
When I add the book “Harry Potter” to my shopping basket
Then my shopping basket should contain 2 copies of “Harry Potter”
The same book can be added multiple times to the shopping basket
Given my shopping basket contains 1 copy of “Harry Potter”
18
The same book can be added multiple times to the shopping basket
Structure of examples
Given my shopping basket contains 1 copy of “Harry Potter”
When I add the book “Harry Potter” to my shopping basket
Then my shopping basket should contain 2 copies of “Harry Potter”
Title: Describes intention/abstract acceptance criterion
Arrange: Context, initial state of the system
Act: Execution of the feature
Assert: Assertion of observable behaviour
And I should see the warning: “Book already existed in basket”
Triple-A
constraint
“Checks”
Chaining
up steps
20
How long do we
care
about the
examples?
21
Purpose of the examples
• Shared understanding:
acceptance criteria
• Documentation:
Look-up detail aspects
of the system
• Regression-tests:
Understand what
assumptions have been violated
22
Continuous validation with automation
Given my shopping basket contains 1 copy of “Harry Potter”
When I add the book “Harry Potter” to my shopping basket
Then my shopping basket should contain 2 copies of “Harry Potter”
System
„Step Definitions“ are binding individual steps
to an automatable interface of the application.
Automatable
interface
UI
Automation
Automation does not necessarily have to bind to the UI.
Automatability of system is supported/evolving with development.
23
Demo
http://www.specflow.org
Gherkin automation for .NET
• Visual Studio plugin (VS-Gallery)
• NuGet Package
24
What does that
mean for
testing?
25
UI automation becomes expensive
when …
• trying to automate
manual tests
• making tests
unreadable when
automating them
• automating after
completing
development
structure
readability
point in time
26
Structure
Manual tests
Asserts Multiple combined
features
Structure ACT-ASSERT-
ACT-ASSERT-
ACT-ASSERT-
…
Dependent on other
features
Long test path with
high chance to break
Automated Check
Single aspect of a
single feature
ARRANGE –
ACT –
ASSERT
Independent of
other features
Short test path with
lower chance to break
27
Test automation pyramid
User
journeys
Acceptance-
criteria
Units
exploratory
testing
Source: Mike Cohn
many
few
hard
easy
Automatability
28
// Go to web page 'http://localhost:40001/' using new browser instance
BrowserWindow localhostBrowser = BrowserWindow.Launch(
new System.Uri(this.RecordedMethod1Params.Url));
// Click 'Register found item' link
Mouse.Click(uIFundstückerfassenHyperlink, new Point(56, 9));
// Click 'Save' button
Mouse.Click(uISpeichernButton, new Point(44, 14));
int fundNr1 = int.Parse(uIFundNr127Pane.InnerText.Substring(9));
// Click 'Register found item' link
Mouse.Click(uIFundstückerfassenHyperlink, new Point(63, 7));
// Click 'Save' button
Mouse.Click(uISpeichernButton, new Point(34, 11));
int fundNr2 = int.Parse(uIFundNr128Pane.InnerText.Substring(9));
Assert.IsTrue(fundNr1 + 1 == fundNr2);
// Click 'Close' button
Mouse.Click(uICloseButton, new Point(26, 11));
Readability
29
A readable test case
Scenario: New found items should receive a
consecutive number for the current year
Given the previous found item of the
current year had the number 145
When I register a new found item
Then the last found item of the
current year should have the number 146
30
When to test (point in time)
Acceptance criteria
(ATDD, BDD)
Unit Tests
(TDD)
business view
technical view
Exploratory tests
Workflow tests
Performance, Scalability,
Usability,Security, …
definingtheproduct
criticizingtheproduct
New dimension: defining the product
Synergy: Specification of requirements and tests
Agile Testing Quadrants: Brian Marick
31
Cross-functional teams
Co-creation
Fast feedback
32
Cross-functional work
Sprint 1 Sprint 2 Sprint 3
short iteration
US4
Plan
Implement &
autom. test
US5
Plan
Implement &
autom. test
US2
Plan
Implement &
autom. test
US3
Plan
Implement &
autom. test
US6
Plan
Implement &
autom. test
US1
Plan
Implement &
autom. test
US7
Plan
Implement &
autom. test
US8
Plan
Implement &
autom. test
US9
Plan
Implement &
autom. test
ExploratoryTests
Specification and test
Collaboration for defining
acceptance criteria
Collaboration for
automation
Preventing bugs
instead of finding them!
Extension of
“Test Cases”
Limit
WIP
Collaboration
in manual
testing
33
Manual Testing is always necessary!
User
journeys
Acceptance-
criteria
Units
exploratory
testing
Source: Mike Cohn
many
few
harder
easier
Automatability
Manual
Check
after
Story
Done
Main
success
pathes
Undiscovered
acceptance
criteria
No/(few)
manual
regression
checks
Few pathes
are enough
More time
for exploration
34
What does that
mean for
development?
35
Workflow - TDD
36
Extending TDD for business
37
Transparency for stakeholders
In Progress
38
Current sprint report: all sprint scenarios
39
Starting with first scenario (AC)
40
Finishing the first scenario (AC)
41
Progressing scenario after scenario
42
Progressing scenario after scenario
43
Progressing scenario after scenario
44
Implementing user stories in parallel
45
First user story ready for testing
46
Manual testing can start even earlier
47
Already done work can break again
48
Already done work can break again
49
See what is temporarily not working
51
Living
documentation
52
Story Mapping
Optimizing and refining scope
Why?
How?
Code
Acceptance
Criterion
Epic
Capability
Impact, Goal
Easier to define upfront Harder to define upfront
User Activity
User Story
Example
53
Story Maps
• Original concept by Jeff Patton
• Supports iterative product design
• Optimized for desired outcome or
deliverable the system should support
56
Building story maps
Get mainstream book
fast and conveniently
delivered
Find book
I want
Collect
books
Complete
order
Wait for
book
Receive
book
time
browse
best
sellers
put into
basket
enter
address
receive
delivery
slip
receive
delivery
notificat.
pay with
credit
card
search
book by
title
create
wish list
inquiry
order
status
desired outcome
or deliverable
user
activities
system
features
necessity
57
Walking
skeleton
Enabling build – measure - learn
Find book
I want
Collect
books
Complete
order
Wait for
book
Receive
book
time
browse
best
sellers
enter
address
receive
delivery
slip
pay with
credit
card
search
book by
title
create
wish list
inquiry
order
status
put into
basket
receive
delivery
notificat.
necessity
manual
workaround
omitted
steps
Get mainstream book
fast and conveniently
delivered
60
Story Maps in ALM with TFS
TFS work items in story maps
http://speclog.net
61
Story Map in SpecLog
62
Sprint 1
63
Sprint 2
64
Sprint 3
65
Sprint 4
66
Dropped Scope
67
Added Scope
69
User Stories vs. Features
Product/Sprint Backlog
User Story 1
AccCrit 1
AccCrit 2
User Story 2
AccCrit 3
AccCrit 4
Living Documentation
Feature 1
AccCrit 1
AccCrit 2
Feature n
AccCrit 4
AccCrit m
User Story n
AccCrit 5
AccCrit m
AccCrit 3
AccCrit 5
„Done“
• Future options of the system
• Organized/refined according to
priority, value, effort, risk, ...
• Next possible increments of
the product (units of work)
• Current state of the system
• Organized/refined for
functional overview
• Versioned and maintained
together with source code
71
Living documentation
• Link business readable automation from source code to story maps
• Feed execution results into story maps
72
Additional
thoughts
73
Level of automation
Controller
Business Layer
Data Layer
Model
View
Browser
automation
Trigger behaviour
through controller
Assert behaviour
on model, db, ..
Setup pre-conditions
through service
interfaces
Out-of-process
In-process
74
Performance
• Grouping tests
• Current WIP
• Completed work
• Database
• In-memory
• Templates for setup
• Parallel execution
• Smart execution order
75
Internal vs. external DSL
Example Source:
Liz Keogh
https://github.com/lunivore/tictactoe-java/blob/master/
scenarios/com/lunivore/tictactoe/scenarios/
Three_in_a_row_wins.java
76
Non-functional acceptance criteria
Given there are 100,000 users registered on the system
When I create a new account
Then I should be taken to my dashboard within 5ms
Given 1000 users are hitting the homepage
simultaneously
Then each user should get a response within 2ms
Matt Wynne
http://blog.mattwynne.net/2012/03/13/using-cucumber-for-load-testing
77
Tools
78
Gherkin automation tools
www.cukes.info
www.behat.org
Ruby, Java, JavaScript, C++
www.specflow.org
.NET, Mono, Silverlight, WP7
PHP
79
80
Books
Gojko Adzic
Bridiging the
Communication Gap
Gojko Adzic
Specification by
Example
Elisabeth Hendrickson
Explore It!
81
Christian Hassa: ch@techtalk.at - @chr99ha

Mais conteúdo relacionado

Destaque

Specification by example - course summary
Specification by example - course summarySpecification by example - course summary
Specification by example - course summaryJakub Holy
 
Specification by example and agile acceptance testing
Specification by example and agile acceptance testingSpecification by example and agile acceptance testing
Specification by example and agile acceptance testinggojkoadzic
 
Test automation with Cucumber-JVM
Test automation with Cucumber-JVMTest automation with Cucumber-JVM
Test automation with Cucumber-JVMAlan Parkinson
 
5 Practices for an Agile Mindset
5 Practices for an Agile Mindset5 Practices for an Agile Mindset
5 Practices for an Agile MindsetMichael Sahota
 
The Gherkin: Case Study
The Gherkin: Case StudyThe Gherkin: Case Study
The Gherkin: Case StudyVikram Bengani
 
User Acceptance Testing (Uat)
User Acceptance Testing (Uat)User Acceptance Testing (Uat)
User Acceptance Testing (Uat)Thomas Martin
 
An Overview of User Acceptance Testing (UAT)
An Overview of User Acceptance Testing (UAT)An Overview of User Acceptance Testing (UAT)
An Overview of User Acceptance Testing (UAT)Usersnap
 

Destaque (7)

Specification by example - course summary
Specification by example - course summarySpecification by example - course summary
Specification by example - course summary
 
Specification by example and agile acceptance testing
Specification by example and agile acceptance testingSpecification by example and agile acceptance testing
Specification by example and agile acceptance testing
 
Test automation with Cucumber-JVM
Test automation with Cucumber-JVMTest automation with Cucumber-JVM
Test automation with Cucumber-JVM
 
5 Practices for an Agile Mindset
5 Practices for an Agile Mindset5 Practices for an Agile Mindset
5 Practices for an Agile Mindset
 
The Gherkin: Case Study
The Gherkin: Case StudyThe Gherkin: Case Study
The Gherkin: Case Study
 
User Acceptance Testing (Uat)
User Acceptance Testing (Uat)User Acceptance Testing (Uat)
User Acceptance Testing (Uat)
 
An Overview of User Acceptance Testing (UAT)
An Overview of User Acceptance Testing (UAT)An Overview of User Acceptance Testing (UAT)
An Overview of User Acceptance Testing (UAT)
 

Semelhante a Specification-By-Example with Gherkin

Agile requirements management
Agile requirements managementAgile requirements management
Agile requirements managementChristian Hassa
 
From impact to stakeholder examples: Three techniques for end-to-end requirem...
From impact to stakeholder examples: Three techniques for end-to-end requirem...From impact to stakeholder examples: Three techniques for end-to-end requirem...
From impact to stakeholder examples: Three techniques for end-to-end requirem...Christian Hassa
 
«BDD, Gherkin, Cucumber and why we need it for successful product development»
«BDD, Gherkin, Cucumber and why we need it for successful product development»«BDD, Gherkin, Cucumber and why we need it for successful product development»
«BDD, Gherkin, Cucumber and why we need it for successful product development»Provectus
 
Presentation: Harnessing the Collective Wisdom of the Crowd
Presentation: Harnessing the Collective Wisdom of the CrowdPresentation: Harnessing the Collective Wisdom of the Crowd
Presentation: Harnessing the Collective Wisdom of the CrowdIdeaScale
 
How 'Open' Changes Product Development
How 'Open' Changes Product DevelopmentHow 'Open' Changes Product Development
How 'Open' Changes Product DevelopmentPhase2
 
Cross mobile testautomation mit Xamarin & SpecFlow
Cross mobile testautomation mit Xamarin & SpecFlowCross mobile testautomation mit Xamarin & SpecFlow
Cross mobile testautomation mit Xamarin & SpecFlowChristian Hassa
 
Ilead 1022 intro2_innovation
Ilead 1022 intro2_innovationIlead 1022 intro2_innovation
Ilead 1022 intro2_innovationChristine Kreger
 
#w-owasp-cld-sec-wkshp Owasp cloud security workshop
#w-owasp-cld-sec-wkshp Owasp cloud security workshop#w-owasp-cld-sec-wkshp Owasp cloud security workshop
#w-owasp-cld-sec-wkshp Owasp cloud security workshopOpen Security Summit
 
06 spd conceptgeneration (1)
06 spd conceptgeneration (1)06 spd conceptgeneration (1)
06 spd conceptgeneration (1)NURUL4762
 
Building software products
Building software productsBuilding software products
Building software productsChris Bohnert
 
Agile Business Analysis
Agile Business AnalysisAgile Business Analysis
Agile Business Analysisdavid_draper
 
Digital marketing from a startup founder point of view - Brussels Meetup
Digital marketing from a startup founder point of view - Brussels MeetupDigital marketing from a startup founder point of view - Brussels Meetup
Digital marketing from a startup founder point of view - Brussels MeetupMohsin El Khamlichi
 
Concept Generation in Product Design
Concept Generation in Product DesignConcept Generation in Product Design
Concept Generation in Product DesignSurendher Emrose
 
A Primer on Primary Market Research
A Primer on Primary Market ResearchA Primer on Primary Market Research
A Primer on Primary Market ResearchElaine Chen
 
Finding Blue Oceans: Lessons from Technology
Finding Blue Oceans: Lessons from TechnologyFinding Blue Oceans: Lessons from Technology
Finding Blue Oceans: Lessons from TechnologyMatt Baxter
 
Modeling Requirements Using Examples
Modeling Requirements Using ExamplesModeling Requirements Using Examples
Modeling Requirements Using ExamplesExcella
 
Field Research at the Speed of Business
Field Research at the Speed of BusinessField Research at the Speed of Business
Field Research at the Speed of BusinessPaul Sherman
 
Convergent divergent thinking & wireframeprototyping
Convergent divergent thinking & wireframeprototypingConvergent divergent thinking & wireframeprototyping
Convergent divergent thinking & wireframeprototypingPriyanka Rana
 

Semelhante a Specification-By-Example with Gherkin (20)

Agile requirements management
Agile requirements managementAgile requirements management
Agile requirements management
 
From impact to stakeholder examples: Three techniques for end-to-end requirem...
From impact to stakeholder examples: Three techniques for end-to-end requirem...From impact to stakeholder examples: Three techniques for end-to-end requirem...
From impact to stakeholder examples: Three techniques for end-to-end requirem...
 
«BDD, Gherkin, Cucumber and why we need it for successful product development»
«BDD, Gherkin, Cucumber and why we need it for successful product development»«BDD, Gherkin, Cucumber and why we need it for successful product development»
«BDD, Gherkin, Cucumber and why we need it for successful product development»
 
Presentation: Harnessing the Collective Wisdom of the Crowd
Presentation: Harnessing the Collective Wisdom of the CrowdPresentation: Harnessing the Collective Wisdom of the Crowd
Presentation: Harnessing the Collective Wisdom of the Crowd
 
How 'Open' Changes Product Development
How 'Open' Changes Product DevelopmentHow 'Open' Changes Product Development
How 'Open' Changes Product Development
 
Cross mobile testautomation mit Xamarin & SpecFlow
Cross mobile testautomation mit Xamarin & SpecFlowCross mobile testautomation mit Xamarin & SpecFlow
Cross mobile testautomation mit Xamarin & SpecFlow
 
Ilead 1022 intro2_innovation
Ilead 1022 intro2_innovationIlead 1022 intro2_innovation
Ilead 1022 intro2_innovation
 
#w-owasp-cld-sec-wkshp Owasp cloud security workshop
#w-owasp-cld-sec-wkshp Owasp cloud security workshop#w-owasp-cld-sec-wkshp Owasp cloud security workshop
#w-owasp-cld-sec-wkshp Owasp cloud security workshop
 
06 spd conceptgeneration (1)
06 spd conceptgeneration (1)06 spd conceptgeneration (1)
06 spd conceptgeneration (1)
 
Building software products
Building software productsBuilding software products
Building software products
 
Business Model Assumptions by Nick De Mey
Business Model Assumptions by Nick De MeyBusiness Model Assumptions by Nick De Mey
Business Model Assumptions by Nick De Mey
 
Agile Business Analysis
Agile Business AnalysisAgile Business Analysis
Agile Business Analysis
 
Digital marketing from a startup founder point of view - Brussels Meetup
Digital marketing from a startup founder point of view - Brussels MeetupDigital marketing from a startup founder point of view - Brussels Meetup
Digital marketing from a startup founder point of view - Brussels Meetup
 
Concept Generation in Product Design
Concept Generation in Product DesignConcept Generation in Product Design
Concept Generation in Product Design
 
A Primer on Primary Market Research
A Primer on Primary Market ResearchA Primer on Primary Market Research
A Primer on Primary Market Research
 
Finding Blue Oceans: Lessons from Technology
Finding Blue Oceans: Lessons from TechnologyFinding Blue Oceans: Lessons from Technology
Finding Blue Oceans: Lessons from Technology
 
Make Great Products
Make Great ProductsMake Great Products
Make Great Products
 
Modeling Requirements Using Examples
Modeling Requirements Using ExamplesModeling Requirements Using Examples
Modeling Requirements Using Examples
 
Field Research at the Speed of Business
Field Research at the Speed of BusinessField Research at the Speed of Business
Field Research at the Speed of Business
 
Convergent divergent thinking & wireframeprototyping
Convergent divergent thinking & wireframeprototypingConvergent divergent thinking & wireframeprototyping
Convergent divergent thinking & wireframeprototyping
 

Mais de Christian Hassa

Impact Mapping: Guiding Agile Teams with Customer Obsession (workshop)
Impact Mapping: Guiding Agile Teams with Customer Obsession (workshop)Impact Mapping: Guiding Agile Teams with Customer Obsession (workshop)
Impact Mapping: Guiding Agile Teams with Customer Obsession (workshop)Christian Hassa
 
Agile Software Development - Cargo Cult or Competitive Advantage?
Agile Software Development - Cargo Cult or Competitive Advantage?Agile Software Development - Cargo Cult or Competitive Advantage?
Agile Software Development - Cargo Cult or Competitive Advantage?Christian Hassa
 
Impact Mapping - strategische Steuerung agiler Entwicklung
Impact Mapping - strategische Steuerung agiler EntwicklungImpact Mapping - strategische Steuerung agiler Entwicklung
Impact Mapping - strategische Steuerung agiler EntwicklungChristian Hassa
 
Impact Mapping - strategische Steuerung agiler Entwicklung
Impact Mapping - strategische Steuerung agiler EntwicklungImpact Mapping - strategische Steuerung agiler Entwicklung
Impact Mapping - strategische Steuerung agiler EntwicklungChristian Hassa
 
Scrum Alliance Webinar: Impact Mapping
Scrum Alliance Webinar: Impact MappingScrum Alliance Webinar: Impact Mapping
Scrum Alliance Webinar: Impact MappingChristian Hassa
 
Impact Mapping - delivering what really matters!
Impact Mapping - delivering what really matters!Impact Mapping - delivering what really matters!
Impact Mapping - delivering what really matters!Christian Hassa
 
Impact Mapping - strategische Steuerung für agile Entwicklung
Impact Mapping - strategische Steuerung für agile EntwicklungImpact Mapping - strategische Steuerung für agile Entwicklung
Impact Mapping - strategische Steuerung für agile EntwicklungChristian Hassa
 
Impact Mapping with Innovation Games (TM)
Impact Mapping with Innovation Games (TM)Impact Mapping with Innovation Games (TM)
Impact Mapping with Innovation Games (TM)Christian Hassa
 
Impact Mapping with Innovation Games (R)
Impact Mapping with Innovation Games (R)Impact Mapping with Innovation Games (R)
Impact Mapping with Innovation Games (R)Christian Hassa
 
Impact Maps/Story Maps - liefern was wirklich zählt
Impact Maps/Story Maps - liefern was wirklich zähltImpact Maps/Story Maps - liefern was wirklich zählt
Impact Maps/Story Maps - liefern was wirklich zähltChristian Hassa
 
Impact Maps and Story Maps: delivering what really matters
Impact Maps and Story Maps: delivering what really mattersImpact Maps and Story Maps: delivering what really matters
Impact Maps and Story Maps: delivering what really mattersChristian Hassa
 
Impact Maps und Story Maps - liefern was wirklich zählt
Impact Maps und Story Maps - liefern was wirklich zähltImpact Maps und Story Maps - liefern was wirklich zählt
Impact Maps und Story Maps - liefern was wirklich zähltChristian Hassa
 
How I learned to stop worrying and love flexible scope.
How I learned to stop worrying and love flexible scope.How I learned to stop worrying and love flexible scope.
How I learned to stop worrying and love flexible scope.Christian Hassa
 
Story Maps Workshop (German) - DNUG Bern
Story Maps Workshop (German) - DNUG BernStory Maps Workshop (German) - DNUG Bern
Story Maps Workshop (German) - DNUG BernChristian Hassa
 
Live it - or leave it! Returning your investment into Agile
Live it - or leave it! Returning your investment into AgileLive it - or leave it! Returning your investment into Agile
Live it - or leave it! Returning your investment into AgileChristian Hassa
 
How I learned stop worrying and how to love flexible scope.
How I learned stop worrying and how to love flexible scope.How I learned stop worrying and how to love flexible scope.
How I learned stop worrying and how to love flexible scope.Christian Hassa
 
Story Maps - Liefern was wirklich zählt
Story Maps - Liefern was wirklich zähltStory Maps - Liefern was wirklich zählt
Story Maps - Liefern was wirklich zähltChristian Hassa
 

Mais de Christian Hassa (20)

Impact Mapping: Guiding Agile Teams with Customer Obsession (workshop)
Impact Mapping: Guiding Agile Teams with Customer Obsession (workshop)Impact Mapping: Guiding Agile Teams with Customer Obsession (workshop)
Impact Mapping: Guiding Agile Teams with Customer Obsession (workshop)
 
Agile Software Development - Cargo Cult or Competitive Advantage?
Agile Software Development - Cargo Cult or Competitive Advantage?Agile Software Development - Cargo Cult or Competitive Advantage?
Agile Software Development - Cargo Cult or Competitive Advantage?
 
Impact Mapping - strategische Steuerung agiler Entwicklung
Impact Mapping - strategische Steuerung agiler EntwicklungImpact Mapping - strategische Steuerung agiler Entwicklung
Impact Mapping - strategische Steuerung agiler Entwicklung
 
Impact Mapping - strategische Steuerung agiler Entwicklung
Impact Mapping - strategische Steuerung agiler EntwicklungImpact Mapping - strategische Steuerung agiler Entwicklung
Impact Mapping - strategische Steuerung agiler Entwicklung
 
Scrum Alliance Webinar: Impact Mapping
Scrum Alliance Webinar: Impact MappingScrum Alliance Webinar: Impact Mapping
Scrum Alliance Webinar: Impact Mapping
 
Impact Mapping - delivering what really matters!
Impact Mapping - delivering what really matters!Impact Mapping - delivering what really matters!
Impact Mapping - delivering what really matters!
 
Impact Mapping - strategische Steuerung für agile Entwicklung
Impact Mapping - strategische Steuerung für agile EntwicklungImpact Mapping - strategische Steuerung für agile Entwicklung
Impact Mapping - strategische Steuerung für agile Entwicklung
 
Upcoming events 2017
Upcoming events 2017Upcoming events 2017
Upcoming events 2017
 
Impact Mapping with Innovation Games (TM)
Impact Mapping with Innovation Games (TM)Impact Mapping with Innovation Games (TM)
Impact Mapping with Innovation Games (TM)
 
Impact Mapping with Innovation Games (R)
Impact Mapping with Innovation Games (R)Impact Mapping with Innovation Games (R)
Impact Mapping with Innovation Games (R)
 
Impact Map Your Project
Impact Map Your ProjectImpact Map Your Project
Impact Map Your Project
 
Impact Maps/Story Maps - liefern was wirklich zählt
Impact Maps/Story Maps - liefern was wirklich zähltImpact Maps/Story Maps - liefern was wirklich zählt
Impact Maps/Story Maps - liefern was wirklich zählt
 
Agile Requirements
Agile RequirementsAgile Requirements
Agile Requirements
 
Impact Maps and Story Maps: delivering what really matters
Impact Maps and Story Maps: delivering what really mattersImpact Maps and Story Maps: delivering what really matters
Impact Maps and Story Maps: delivering what really matters
 
Impact Maps und Story Maps - liefern was wirklich zählt
Impact Maps und Story Maps - liefern was wirklich zähltImpact Maps und Story Maps - liefern was wirklich zählt
Impact Maps und Story Maps - liefern was wirklich zählt
 
How I learned to stop worrying and love flexible scope.
How I learned to stop worrying and love flexible scope.How I learned to stop worrying and love flexible scope.
How I learned to stop worrying and love flexible scope.
 
Story Maps Workshop (German) - DNUG Bern
Story Maps Workshop (German) - DNUG BernStory Maps Workshop (German) - DNUG Bern
Story Maps Workshop (German) - DNUG Bern
 
Live it - or leave it! Returning your investment into Agile
Live it - or leave it! Returning your investment into AgileLive it - or leave it! Returning your investment into Agile
Live it - or leave it! Returning your investment into Agile
 
How I learned stop worrying and how to love flexible scope.
How I learned stop worrying and how to love flexible scope.How I learned stop worrying and how to love flexible scope.
How I learned stop worrying and how to love flexible scope.
 
Story Maps - Liefern was wirklich zählt
Story Maps - Liefern was wirklich zähltStory Maps - Liefern was wirklich zählt
Story Maps - Liefern was wirklich zählt
 

Último

So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 

Último (20)

So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 

Specification-By-Example with Gherkin

  • 1. FROM STAKEHOLDER EXAMPLES TO LIVING DOCUMENTATION Christian Hassa - ch@techtalk.at - @chr99ha .NET User Group Bern, 5th of December 2012 Specification-By-Example with Gherkin
  • 2. TechTalk at a glance • Agile consulting and delivery • Offices in: Vienna, Budapest, Zurich • Established in 1993 Vienna/Austria
  • 3. 3 How do we specify requirements?
  • 4. 4 The purpose of user stories … • Describe user needs • Describe system features • Unit of planning • Reminder for a discussion • Mechanism to defer a discussion
  • 5. 5 Impact Mapping Story Mapping Specification-By-Example Establishing a shared understanding Why? How? Code Acceptance Criterion Epic Capability Impact, Goal Easier to define upfront Harder to define upfront Reminder for a discussion Bug report Isolated, formalized example User Activity User Story Example
  • 6. 6 Collecting Acceptance Criteria “I would try to put a book into the shopping cart …” “I would try to remove a book from the shopping cart…” “I’d check whether the shopping cart is empty, when I enter the shop …” “I would try to add the same book again to the shopping cart …” Books can be placed into shopping cart. Books can be removed from shopping cart. Shopping cart should be empty when entering the shop. Adding same book again to shopping cart should increase quantity. As a potential customer I want to collect books in a shopping cart So that I can order several books at once. “Imagine this story is already implemented: how would you verify it?”
  • 8. 8 UI wire frames, existing UI rules, key examples existing artifacts, samples Examples for user stories
  • 9. 10 Specification-by-Example Examples … • make abstract descriptions better understandable However … • examples are usually not formally exchanged or documented Brian Marick Examples Tests Requirements consist of describe verify fulfillment of
  • 10. 11 Discussion of acceptance criteria public void TestInitialOrderDiscount() { Customer newCustomer = new Customer(); Order newOrder = new Order(newCustomer); newOrder.AddBook( Catalog.Find(“ISBN-0955683610”) ); Assert.Equals(33.75, newOrder.Subtotal); } Register as “bart_bookworm” Go to “/catalog/search” Enter “ISBN-0955683610” Click “Search” Click “Add to Cart” Click “View Cart” Verify “Subtotal” is “$33.75” We would like to encourage new users to buy in our shop. Therefore we offer 10% discount for their first order. Original idea for the illustration: George Dinwiddie http://blog.gdinwidiee.com
  • 11. 12 … illustrated with formalized examples Given the user has not ordered yet When the user adds a book with the price of EUR 37.5 into the shopping cart Then the shopping cart sub-total is EUR 33.75. Original idea for the illustration: George Dinwiddie http://blog.gdinwidiee.com
  • 12. 13 Discover hidden assumptions Actually, this not quite right: Books on sale should be excluded. Original idea for the illustration: George Dinwiddie http://blog.gdinwidiee.com
  • 13. 14 Collaboration: 3 amigos “Happy Path” Technical feasability Exceptions, border cases Original idea for the illustration: George Dinwiddie http://blog.gdinwidiee.com
  • 14. 15 Abstract acceptance criteria As a shop visitor I want to collect books in my shopping basket so that I can purchase multiple books at once. Books can be added to the shopping basket Books can be removed from the shopping basket Shopping basket is initially empty The same book can be added multiple times to the shopping basket
  • 15. 16 Examples for acceptance criteria As a shop visitor I want to collect books in my shopping basket so that I can purchase multiple books at once. Books can be added to the shopping basket Given my shopping basket is empty When I add the book “Harry Potter” to my shopping basket Then my shopping basket should contain 1 copy of “Harry Potter”
  • 16. 17 As a shop visitor I want to collect books in my shopping basket so that I can purchase multiple books at once. Books can be added to the shopping basket Examples for acceptance criteria When I add the book “Harry Potter” to my shopping basket Then my shopping basket should contain 2 copies of “Harry Potter” The same book can be added multiple times to the shopping basket Given my shopping basket contains 1 copy of “Harry Potter”
  • 17. 18 The same book can be added multiple times to the shopping basket Structure of examples Given my shopping basket contains 1 copy of “Harry Potter” When I add the book “Harry Potter” to my shopping basket Then my shopping basket should contain 2 copies of “Harry Potter” Title: Describes intention/abstract acceptance criterion Arrange: Context, initial state of the system Act: Execution of the feature Assert: Assertion of observable behaviour And I should see the warning: “Book already existed in basket” Triple-A constraint “Checks” Chaining up steps
  • 18. 20 How long do we care about the examples?
  • 19. 21 Purpose of the examples • Shared understanding: acceptance criteria • Documentation: Look-up detail aspects of the system • Regression-tests: Understand what assumptions have been violated
  • 20. 22 Continuous validation with automation Given my shopping basket contains 1 copy of “Harry Potter” When I add the book “Harry Potter” to my shopping basket Then my shopping basket should contain 2 copies of “Harry Potter” System „Step Definitions“ are binding individual steps to an automatable interface of the application. Automatable interface UI Automation Automation does not necessarily have to bind to the UI. Automatability of system is supported/evolving with development.
  • 21. 23 Demo http://www.specflow.org Gherkin automation for .NET • Visual Studio plugin (VS-Gallery) • NuGet Package
  • 22. 24 What does that mean for testing?
  • 23. 25 UI automation becomes expensive when … • trying to automate manual tests • making tests unreadable when automating them • automating after completing development structure readability point in time
  • 24. 26 Structure Manual tests Asserts Multiple combined features Structure ACT-ASSERT- ACT-ASSERT- ACT-ASSERT- … Dependent on other features Long test path with high chance to break Automated Check Single aspect of a single feature ARRANGE – ACT – ASSERT Independent of other features Short test path with lower chance to break
  • 26. 28 // Go to web page 'http://localhost:40001/' using new browser instance BrowserWindow localhostBrowser = BrowserWindow.Launch( new System.Uri(this.RecordedMethod1Params.Url)); // Click 'Register found item' link Mouse.Click(uIFundstückerfassenHyperlink, new Point(56, 9)); // Click 'Save' button Mouse.Click(uISpeichernButton, new Point(44, 14)); int fundNr1 = int.Parse(uIFundNr127Pane.InnerText.Substring(9)); // Click 'Register found item' link Mouse.Click(uIFundstückerfassenHyperlink, new Point(63, 7)); // Click 'Save' button Mouse.Click(uISpeichernButton, new Point(34, 11)); int fundNr2 = int.Parse(uIFundNr128Pane.InnerText.Substring(9)); Assert.IsTrue(fundNr1 + 1 == fundNr2); // Click 'Close' button Mouse.Click(uICloseButton, new Point(26, 11)); Readability
  • 27. 29 A readable test case Scenario: New found items should receive a consecutive number for the current year Given the previous found item of the current year had the number 145 When I register a new found item Then the last found item of the current year should have the number 146
  • 28. 30 When to test (point in time) Acceptance criteria (ATDD, BDD) Unit Tests (TDD) business view technical view Exploratory tests Workflow tests Performance, Scalability, Usability,Security, … definingtheproduct criticizingtheproduct New dimension: defining the product Synergy: Specification of requirements and tests Agile Testing Quadrants: Brian Marick
  • 30. 32 Cross-functional work Sprint 1 Sprint 2 Sprint 3 short iteration US4 Plan Implement & autom. test US5 Plan Implement & autom. test US2 Plan Implement & autom. test US3 Plan Implement & autom. test US6 Plan Implement & autom. test US1 Plan Implement & autom. test US7 Plan Implement & autom. test US8 Plan Implement & autom. test US9 Plan Implement & autom. test ExploratoryTests Specification and test Collaboration for defining acceptance criteria Collaboration for automation Preventing bugs instead of finding them! Extension of “Test Cases” Limit WIP Collaboration in manual testing
  • 31. 33 Manual Testing is always necessary! User journeys Acceptance- criteria Units exploratory testing Source: Mike Cohn many few harder easier Automatability Manual Check after Story Done Main success pathes Undiscovered acceptance criteria No/(few) manual regression checks Few pathes are enough More time for exploration
  • 32. 34 What does that mean for development?
  • 36. 38 Current sprint report: all sprint scenarios
  • 37. 39 Starting with first scenario (AC)
  • 38. 40 Finishing the first scenario (AC)
  • 43. 45 First user story ready for testing
  • 44. 46 Manual testing can start even earlier
  • 45. 47 Already done work can break again
  • 46. 48 Already done work can break again
  • 47. 49 See what is temporarily not working
  • 49. 52 Story Mapping Optimizing and refining scope Why? How? Code Acceptance Criterion Epic Capability Impact, Goal Easier to define upfront Harder to define upfront User Activity User Story Example
  • 50. 53 Story Maps • Original concept by Jeff Patton • Supports iterative product design • Optimized for desired outcome or deliverable the system should support
  • 51. 56 Building story maps Get mainstream book fast and conveniently delivered Find book I want Collect books Complete order Wait for book Receive book time browse best sellers put into basket enter address receive delivery slip receive delivery notificat. pay with credit card search book by title create wish list inquiry order status desired outcome or deliverable user activities system features necessity
  • 52. 57 Walking skeleton Enabling build – measure - learn Find book I want Collect books Complete order Wait for book Receive book time browse best sellers enter address receive delivery slip pay with credit card search book by title create wish list inquiry order status put into basket receive delivery notificat. necessity manual workaround omitted steps Get mainstream book fast and conveniently delivered
  • 53. 60 Story Maps in ALM with TFS TFS work items in story maps http://speclog.net
  • 54. 61 Story Map in SpecLog
  • 61. 69 User Stories vs. Features Product/Sprint Backlog User Story 1 AccCrit 1 AccCrit 2 User Story 2 AccCrit 3 AccCrit 4 Living Documentation Feature 1 AccCrit 1 AccCrit 2 Feature n AccCrit 4 AccCrit m User Story n AccCrit 5 AccCrit m AccCrit 3 AccCrit 5 „Done“ • Future options of the system • Organized/refined according to priority, value, effort, risk, ... • Next possible increments of the product (units of work) • Current state of the system • Organized/refined for functional overview • Versioned and maintained together with source code
  • 62. 71 Living documentation • Link business readable automation from source code to story maps • Feed execution results into story maps
  • 64. 73 Level of automation Controller Business Layer Data Layer Model View Browser automation Trigger behaviour through controller Assert behaviour on model, db, .. Setup pre-conditions through service interfaces Out-of-process In-process
  • 65. 74 Performance • Grouping tests • Current WIP • Completed work • Database • In-memory • Templates for setup • Parallel execution • Smart execution order
  • 66. 75 Internal vs. external DSL Example Source: Liz Keogh https://github.com/lunivore/tictactoe-java/blob/master/ scenarios/com/lunivore/tictactoe/scenarios/ Three_in_a_row_wins.java
  • 67. 76 Non-functional acceptance criteria Given there are 100,000 users registered on the system When I create a new account Then I should be taken to my dashboard within 5ms Given 1000 users are hitting the homepage simultaneously Then each user should get a response within 2ms Matt Wynne http://blog.mattwynne.net/2012/03/13/using-cucumber-for-load-testing
  • 69. 78 Gherkin automation tools www.cukes.info www.behat.org Ruby, Java, JavaScript, C++ www.specflow.org .NET, Mono, Silverlight, WP7 PHP
  • 70. 79
  • 71. 80 Books Gojko Adzic Bridiging the Communication Gap Gojko Adzic Specification by Example Elisabeth Hendrickson Explore It!