Beruflich Dokumente
Kultur Dokumente
Eemeli Kantola
About me
Futurice
in
brief
TAMPERE
HELSINKI
LONDON
BERLIN
DSSELDORF
Founded in 2000
150
Ask why!
It's
not
enough
to
know
how
to
do
things
you
must
know
why
you
do
them.
Harvey
Mackay
Why am I here
Awesome: getting people where they need to be faster than they would get there without
Its kewl
Web, why?
Building on web is in many cases more awesome than alternatives when building sw for human end users
Web apps?
Using Hypermedia APIs (a.k.a. RESTful etc. backend) Suck usually less than other approaches when done right
Involving humans less trivial, i.e. more interesting Interdisciplinary approaches necessary
ATDD
Test
Driven
Requirements
(TDR)
Functional
Test
Driven
Development
(FTDD)
Behavior
Driven
Development
(BDD)
Story
Test
Driven
Development
Executable
Requirements
End-to-End
Test
Driven
Development
Customer
Test
Driven
Development
Business-Facing
Test
Driven
Development
Specication
by
Example
...
21
15.6.2012
Futurice
Acceptance test?
wat
ATDD:
The
practice
of
expressing
functional
story
requirements
as
concrete
examples
or
expectations
prior
to
story
development
Jennitta
Andrea,
http://www.stickyminds.com/sitewide.asp?Function=edetail&ObjectId=16315
ATDD Disclaimers
One method in toolbox among others Lots of skills and other practices needed, too
Goals
Crystallize acceptance criteria: get a shared understanding of reqs and def. of done [1] Win the bug battle with complicated systems [2]: early regression detection
Solid regression tests enable incremental development Feels great every time when a bug that wouldve gone to prod was caught by tests [2] Enables cont. deployment
Acceptance tests = executable, up-to-date docs Enriched tester role: get rid of most mechanical work Highly testable system Trustworthy specications
Why not?
Not feasible to automate everything (in practice) Doing small, prototype, unimportant, simple stu Discovery, spikes [4] Initial setup overhead I dont know why
Steps
Design
how
to
fulll
the
requirement
Implement: hammer the keyboard until all tests pass (incl. other tests)
Story
Design
Write tests
Code
15.6.2012
Futurice
33
Hands on
have a timer display with zeroed time and a start btn start on button click if started, stop when button is clicked again update the timer seconds and fractions when running
Getting started
15.6.2012
Futurice
41
https://github.com/ekantola/atdd-for-web-apps
Sources:
continue running from where it was stopped last remember the last stopped time across app reloads etc
Business-facing
Manual
Automated
Tech-facing
Tools
46
Business-facing
Manual
Automated
Tech-facing
Tools
47
Selenium Robot Framework FitNesse Poltergeist Watir/Watij Canoo WebTest StoryTeller Screw.Unit
15.6.2012
Futurice
Selenium
Automation
of
browsers
E.g.
for
testing
purposes,
or
for
repetitive
admin
tasks
Selenium IDE for recording scripts Scaling and distributing test running Java-based, with wide support for other langs & testing frameworks
16.6.2012
Futurice
49
Cucumber
BDD
Automation
of
browsers
Describing
behavior
in
plain,
human
readable
text
(Given-When-Then)
Higher
level
abstraction
for
tests
16.6.2012
Futurice
50
Given-When-Then
(GWT)
Example
of
a
popular
approach:
Given
the
shopping
cart
is
visible
and
has
three
items
in
it,
When
the
user
clicks
an
items
trashcan
icon,
Then
the
item
should
disappear
from
the
list
and
a
notication
should
be
shown
with
the
items
name
and
an
Undo
link.
15.6.2012
Futurice
51
Robot
Framework
Generic
test
automation
framework
for
various
domains
Web
part
backed
by
e.g.
Selenium,
but
also
Java
GUI,
SSH,
running
processes...
16.6.2012
Futurice
53
Conclusions
Easy to start with in web, powerful tools exist Longer projects: no time not to automate and maintain tests
Thanks!
Contact:
@ekantola
github.com/ekantola