Slides from the London Agile Testing Meetup of November 25 2014:
John Ferguson Smart is a specialist in BDD, automated testing and software life cycle development optimization. John is a well-known speaker at many international conferences and events and an accomplished author (John's new book BDD in Action was published last month).
John presents a talk discussing how to write solid, reliable and maintainable automated web tests using the best-of-breed open source technologies like Selenium WebDriver, Serenity, JBehave and Cucumber.
3. Consultant
Tr a i n e r
Mentor
Author
Speaker
Coder
John Fer guson Smar t
4. What
is
BDD
A
typical
BDD
workflow
What
tools
should
I
use?
Effec@ve
BDD
automa@on
BDD
Gotchas
5. So what is this BDD thing?
Using examples
a shared understanding
software that matters
6. Building the right software
Hunting out value Automated Acceptance
BDD
Criteria
API and code design
Collaboration
Living Documentation
Building the software right
7. The business owner
tells the business
analyst what he wants
1
2 The business
analyst writes a
requirements
document
3 The developer
translates the
requirements
into software
4 The tester
translates the
requirements
into test cases 5 The technical
writer translates
the software
into functional
and technical
documentation
BDD in a nutshell
A traditional development process
8. The business owner
and the business
analyst have a
conversation about
what he needs.
1
2
3
The business analyst,
the developer and the
tester elaborate the
requirements together.
4 The tester uses
these scenarios
as the basis for
her tests
5
The automated tests provide
feedback on progress and help
document the application
The scenarios guide the
developer and act as
automated tests
They define
requirements as
structured, English-language
format
"scenarios"
•Specifica@ons
are
elaborated
collabora@vely
•Specifica@ons
use
a
common
language
•Executable
specifica@ons
provide
fast
feedback
17. Frequent Flyer Application
Goal: Encourage travellers to fly with Flying High airlines more often by allowing them to
cumulate Frequent Flyer points that they can spend on cheaper flights.
Goals
Earning points
from flights
Capabili9es
Earning points
from spending
with partners
Viewing points
earned
Spending points
on bookings
Viewing current points balance Features
View points needed to achieve
the next status level
Calculating points needed for
a given destination
18. Calculating points needed for a given destination
As a traveller
I want to know how many points I need to go to a given destination
So that I can plan my next trip with Flying High Airlines
Feature
Acceptance Criteria
-Need 2 points per km
-Members can calculate points needed on their account home page
Acceptance
Criteria
Automated
Acceptance
Criteria
29. Business
Goal
Business
Goal
Business
Goal
“building the software right”
FFeFeaeatatuturureresess FFeEeaxatatumurrepesless
Low level
speLcoifiwc aletvioenl s
speLcoifiwc alteivoenls
specifications
Executable
specifications
We
can
automate
these
examples
in
the
form
of
“executable
specifica@ons”
30. Business
Goal
Business
Goal
Business
Goal
“building the software right”
FFeFeaeatatuturureresess FFeEeaxatatumurrepesless
Low level
speLcoifiwc aletvioenl s
speLcoifiwc alteivoenls
specifications
Executable
specifications
spock
RSpec
Low level
specifications
Low level
specifications
Low level
specifications
Low level
specifications
Low level
specifications
We
use
low-‐level
BDD
or
TDD
tools
to
define
the
behavior
of
components,
classes
etc.
36. Collaboration before Automation
“Having
the
conversaDon
is
more
important
than
recording
the
conversaDon
is
more
important
than
automaDng
the
conversaDon”
-‐
Liz
Keogh