Post on 07-Jun-2020
transcript
Test automation is dead. Long live test automation!
Seb Rose
Agenda
• Introduction • Traditional test automation • A new hope • Long live test automation!
@sebrose seb@cucumber.io
Le roi est mort, vive le roi!The phrase arose from the law of
le mort saisit le vif—that the transfer of sovereignty occurs
instantaneously upon the moment of death of the previous monarch.
h>ps://en.wikipedia.org/wiki/The_king_is_dead,_long_live_the_king!
@sebrose seb@cucumber.io
“a process of gathering informa3on about [so7ware] with the intent that the
informa3on could be used for some purpose”
What is testing?
Gerry Weinberg Perfect So7ware and Other Illusions About Tes3ng
@sebrose seb@cucumber.io
What is automation?
• the technique of making an apparatus, a process, or a system operate automatically
• the state of being operated automatically
• automatically controlled operation of an apparatus, process, or system by mechanical or electronic devices that take the place of human labor
h>p://www.merriam-webster.com/dicHonary/automaHon
Agenda
• Introduction • Traditional test automation • A new hope • Long live test automation!
@sebrose seb@cucumber.io
Test automaHon
• Take one manual test script • Automate it • Repeat
@sebrose seb@cucumber.io
Traditional rationale• Independent of developer efforts • Equivalence partitioning etc.
• We’re testing quality “in” • Checking that there are no defects • Automated tests accelerate regression testing
• Various techniques to reduce quantity
@sebrose seb@cucumber.io
Given I am an authenticated user with an admin roleAnd a client "test client" exists with name: "test client", initials: "TTC"And a project "test project" exists with name: "test project", client: client "test client"And a ticket "test ticket" exists with project: project "test project", name: "test ticket"And a work_unit "test work unit" exists with ticket: ticket "test ticket", scheduled_at: "2010-01-01", hours: "1"And I am on the admin invoices pageThen I should see "test client"And I follow "test client"And I fill in "global_invoiced" with "123"And I press "Submit"Given I am on the admin invoices pageThen I should not see "test client"
Agenda
• Introduction • Traditional test automation • A new hope • Long live test automation!
@sebrose seb@cucumber.io
That is not the test automation you
are looking for.
@sebrose seb@cucumber.io
h>p:
//lis
acris
pin.
com
/201
1/11
/08/
usin
g-th
e-ag
ile-t
esHn
g-qu
adra
nts/Agile testing quadrants
@sebrose seb@cucumber.io
OOPSI
h>ps
://je
nnyj
mar
.com
/201
6/04
/16/
bdd-
disc
over
y-an
d-oo
psi/
@sebrose seb@cucumber.io
Example mapping
h>ps
://cu
cum
ber.i
o/bl
og/2
015/
12/0
8/ex
ampl
e-m
appi
ng-in
trod
ucHo
n
@sebrose seb@cucumber.io
There are known knowns; there are things we know that we know.
There are known unknowns; that is to say there are things that, we now know we don't know.
But there are also unknown unknowns – there are things we do not know we don't know.
@sebrose seb@cucumber.io
h>p:
//agi
lefo
rall.
com
/res
ourc
es/h
ow-t
o-sp
lit-a
-use
r-st
ory/
@sebrose seb@cucumber.io
Living documentation
h>ps
://re
lisha
pp.c
om/G
DS/
whi
teha
ll/do
cs/h
istor
ical
-acc
ount
s
@sebrose seb@cucumber.io
Feature: Feature name Descrip3on of feature goes here
Scenario: Scenario name Descrip3on of scenario goes here
Given a certain context When something happens Then an outcome And something else But not this though
Scenario: Another scenario name Descrip3on of another scenario goes here ...
Gherkin
@sebrose seb@cucumber.io
Bene
fit (R
isk)
Cost
Invest in infrastructure
Pointless
Highvalue
Bread & bu>er
Costs and benefits
@sebrose seb@cucumber.io
h>p://claysnow.co.uk/architectural-alignment-and-test-induced-design-damage-fallacy/
Test automation pyramid
Manual / Exploratory
@sebrose seb@cucumber.io
[We] write code that reflects the language the stakeholder used to describe the his needs. Simply put, we would try to make our code as close as technically possible to the conversa3on we had.
KonstanHn Kudryashov
Modelling by example
h>p://stakeholderwhisperer.com/posts/2014/10/introducing-modelling-by-example
@sebrose seb@cucumber.io
Be>er communicaHon
(Ubiquitous language)Reduced risk (Faster feedback)
Increased trust
(CollaboraHon)Living documentaHon
Long live test
automa;on!
Seb Rose Twi>er: @sebrose Blog: h>p://cucumber.io E-mail: seb@cucumber.io
QuesHons?