1. Sheffield - Oct 2008
From Specification
to Success
Turning real user stories into
runnable, reliable code
Creative Commons Attribution-Noncommercial-Share Alike
Ashley Moran
2.0 UK: England & Wales License PatchSpace Ltd
10. A User Story
Story: Organiser confirms Proposed Talk
So that Delegates and Speakers know what
Talks are happening
As an Organiser
I want to confirm Proposed Talks
Acceptance criteria:
Talk clearly viewable as confirmed by everyone
Can choose which Room and Timeslot to book Talk
against
Can’t double-book a Room
13. Valuable Stories
So that ...
As a ...
I want to ...
The So that line is the most important
14. Valuable Stories
So that ...
As a ...
I want to ...
The So that line is the most important
You don’t do anything with a story
until you’ve identified what makes it valuable
15. Valuable Stories
So that ...
As a ...
I want to ...
The So that line is the most important
You don’t do anything with a story
until you’ve identified what makes it valuable
You don’t do anything at all
until you have a valuable story
17. (Acceptance Criteria)2
Do write criteria that can be easily verified by humans
18. (Acceptance Criteria)2
Do write criteria that can be easily verified by humans
Do make them discrete (machines need to verify them)
19. (Acceptance Criteria)2
Do write criteria that can be easily verified by humans
Do make them discrete (machines need to verify them)
Don’t be too prescriptive (eg define the user interface)
20. (Acceptance Criteria)2
Do write criteria that can be easily verified by humans
Do make them discrete (machines need to verify them)
Don’t be too prescriptive (eg define the user interface)
Button ‘Confirm this talk’ next to each Talk on Talks admin page
21. (Acceptance Criteria)2
Do write criteria that can be easily verified by humans
Do make them discrete (machines need to verify them)
Don’t be too prescriptive (eg define the user interface)
Button ‘Confirm this talk’ next to each Talk on Talks admin page
Don’t hide new stories in acceptance criteria
22. (Acceptance Criteria)2
Do write criteria that can be easily verified by humans
Do make them discrete (machines need to verify them)
Don’t be too prescriptive (eg define the user interface)
Button ‘Confirm this talk’ next to each Talk on Talks admin page
Don’t hide new stories in acceptance criteria
Organisers can search for unconfirmed talks
23. (Acceptance Criteria)2
Do write criteria that can be easily verified by humans
Do make them discrete (machines need to verify them)
Don’t be too prescriptive (eg define the user interface)
Button ‘Confirm this talk’ next to each Talk on Talks admin page
Don’t hide new stories in acceptance criteria
Organisers can search for unconfirmed talks
Email notification of confirmation sent to Speaker
26. Your Task
Put yourselves in the role on the role card
Think what value you want from the software
27. Your Task
Put yourselves in the role on the role card
Think what value you want from the software
Working as a team, brainstorm stories (follow the
structure on the cards)
28. Your Task
Put yourselves in the role on the role card
Think what value you want from the software
Working as a team, brainstorm stories (follow the
structure on the cards)
Think about the relative value of each story as you write
them
29. Your Task
Put yourselves in the role on the role card
Think what value you want from the software
Working as a team, brainstorm stories (follow the
structure on the cards)
Think about the relative value of each story as you write
them
You’ve got 10 minutes!
33. Prioritising
In groups
choose the single most valuable story from your
stack
nominate someone to represent your table
34. Prioritising
In groups
choose the single most valuable story from your
stack
nominate someone to represent your table
Role representatives
35. Prioritising
In groups
choose the single most valuable story from your
stack
nominate someone to represent your table
Role representatives
stand up!
36. Prioritising
In groups
choose the single most valuable story from your
stack
nominate someone to represent your table
Role representatives
stand up!
in turn, read the title and body of your story, skipping
any acceptance criteria for now
40. Prioritising
Remember
We need a website to organise and promote our
events
Role representatives only:
41. Prioritising
Remember
We need a website to organise and promote our
events
Role representatives only:
Identify between yourselves the most valuable story
to our organisation
43. The Most Valuable Story
This was one of the stories written out on the night by a member
of the audience, and decided among them the most important
44. The Most Valuable Story
This was one of the stories written out on the night by a member
of the audience, and decided among them the most important
45. The Most Valuable Story
This was one of the stories written out on the night by a member
of the audience, and decided among them the most important
No prizes for noticing the spelling mistake :)
51. Success
Discussion encouraged
In reality, developers work with users to write stories
Value delivered from the beginning
52. Success
Discussion encouraged
In reality, developers work with users to write stories
Value delivered from the beginning
Or at least after any bootstrapping work
53. Success
Discussion encouraged
In reality, developers work with users to write stories
Value delivered from the beginning
Or at least after any bootstrapping work
Functionality automatically verified against the users’
own acceptance criteria
54. Success
Discussion encouraged
In reality, developers work with users to write stories
Value delivered from the beginning
Or at least after any bootstrapping work
Functionality automatically verified against the users’
own acceptance criteria
Actual needs satisfied vs on time, on spec, on
budget... but off target
55. Success
Discussion encouraged
In reality, developers work with users to write stories
Value delivered from the beginning
Or at least after any bootstrapping work
Functionality automatically verified against the users’
own acceptance criteria
Actual needs satisfied vs on time, on spec, on
budget... but off target
Less waste means more value, more profit
57. Thanks for joining in
For slides, follow the blog link on
www.patchspace.co.uk (tomorrow afternoon)
58. Thanks for joining in
For slides, follow the blog link on
www.patchspace.co.uk (tomorrow afternoon)
Download slides contain a reference section
59. Thanks for joining in
For slides, follow the blog link on
www.patchspace.co.uk (tomorrow afternoon)
Download slides contain a reference section
Speak to me later if you’d like to know more
60. Thanks for joining in
For slides, follow the blog link on
www.patchspace.co.uk (tomorrow afternoon)
Download slides contain a reference section
Speak to me later if you’d like to know more
Questions?
64. Tools: RSpec
Behaviour-Driven Development equivalent to the xUnit
family of tools, written in Ruby
Lets you write low-level specs for Ruby or Java code
(with JtestR)
65. Tools: RSpec
Behaviour-Driven Development equivalent to the xUnit
family of tools, written in Ruby
Lets you write low-level specs for Ruby or Java code
(with JtestR)
Not the focus of this presentation
68. Tools: Celerity
Celerity is a JRuby project that wraps the Java library
HtmlUnit and Rhino
HtmlUnit is a virtual browser, with HTTPS, cookie etc
support, but no GUI dependencies
69. Tools: Celerity
Celerity is a JRuby project that wraps the Java library
HtmlUnit and Rhino
HtmlUnit is a virtual browser, with HTTPS, cookie etc
support, but no GUI dependencies
Rhino is a Java implementation of JavaScript that
HtmlUnit uses to drive dynamic web sites
70. Tools: Celerity
Celerity is a JRuby project that wraps the Java library
HtmlUnit and Rhino
HtmlUnit is a virtual browser, with HTTPS, cookie etc
support, but no GUI dependencies
Rhino is a Java implementation of JavaScript that
HtmlUnit uses to drive dynamic web sites
Celerity exposes a Watir interface to HtmlUnit, and can
be used in place of Watir or Selenium
73. Tools: RSpec Stories
Run plain-text story scenarios with no translation
Currently being re-implemented by Aslak Hellesøy
under the name Cucumber - this will be the default
implementation after RSpec 1.1.5
74. Tools: RSpec Stories
Run plain-text story scenarios with no translation
Currently being re-implemented by Aslak Hellesøy
under the name Cucumber - this will be the default
implementation after RSpec 1.1.5
Cucumber can run in JRuby with JTestR too
75. Tools: RSpec Stories
Run plain-text story scenarios with no translation
Currently being re-implemented by Aslak Hellesøy
under the name Cucumber - this will be the default
implementation after RSpec 1.1.5
Cucumber can run in JRuby with JTestR too
Cucumber + Celerity
=
verify your real app directly against real user stories
79. Installation
If you’re on a Mac with MacPorts:
root# port install jruby
root# jgem install celerity jruby-openssl hoe rspec
80. Installation
If you’re on a Mac with MacPorts:
root# port install jruby
root# jgem install celerity jruby-openssl hoe rspec
Currently (27-Sep-2008) the Cucumber gem on
GitHub is broken, install from source:
81. Installation
If you’re on a Mac with MacPorts:
root# port install jruby
root# jgem install celerity jruby-openssl hoe rspec
Currently (27-Sep-2008) the Cucumber gem on
GitHub is broken, install from source:
you% git clone git://github.com/aslakhellesoy/cucumber.git
82. Installation
If you’re on a Mac with MacPorts:
root# port install jruby
root# jgem install celerity jruby-openssl hoe rspec
Currently (27-Sep-2008) the Cucumber gem on
GitHub is broken, install from source:
you% git clone git://github.com/aslakhellesoy/cucumber.git
you% cd cucumber && rake gem
83. Installation
If you’re on a Mac with MacPorts:
root# port install jruby
root# jgem install celerity jruby-openssl hoe rspec
Currently (27-Sep-2008) the Cucumber gem on
GitHub is broken, install from source:
you% git clone git://github.com/aslakhellesoy/cucumber.git
you% cd cucumber && rake gem
root# jgem install pkg/cucumber-X.Y.Z.gem