test automation is dead. long live test automation!sddconf.com › brands › sdd › library ›...

41
Test automation is dead. Long live test automation! Seb Rose

Upload: others

Post on 07-Jun-2020

10 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Test automation is dead. Long live test automation!sddconf.com › brands › sdd › library › Test_automation_is_dead_-_SD… · • Introduction • Traditional test automation

Test automation is dead. Long live test automation!

Seb Rose

Page 2: Test automation is dead. Long live test automation!sddconf.com › brands › sdd › library › Test_automation_is_dead_-_SD… · • Introduction • Traditional test automation

Agenda

• Introduction • Traditional test automation • A new hope • Long live test automation!

Page 3: Test automation is dead. Long live test automation!sddconf.com › brands › sdd › library › Test_automation_is_dead_-_SD… · • Introduction • Traditional test automation

@sebrose [email protected]

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!

Page 4: Test automation is dead. Long live test automation!sddconf.com › brands › sdd › library › Test_automation_is_dead_-_SD… · • Introduction • Traditional test automation

@sebrose [email protected]

“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

Page 5: Test automation is dead. Long live test automation!sddconf.com › brands › sdd › library › Test_automation_is_dead_-_SD… · • Introduction • Traditional test automation

@sebrose [email protected]

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

Page 6: Test automation is dead. Long live test automation!sddconf.com › brands › sdd › library › Test_automation_is_dead_-_SD… · • Introduction • Traditional test automation

Agenda

• Introduction • Traditional test automation • A new hope • Long live test automation!

Page 7: Test automation is dead. Long live test automation!sddconf.com › brands › sdd › library › Test_automation_is_dead_-_SD… · • Introduction • Traditional test automation

@sebrose [email protected]

Test automaHon

• Take one manual test script • Automate it • Repeat

Page 8: Test automation is dead. Long live test automation!sddconf.com › brands › sdd › library › Test_automation_is_dead_-_SD… · • Introduction • Traditional test automation

@sebrose [email protected]

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

Page 9: Test automation is dead. Long live test automation!sddconf.com › brands › sdd › library › Test_automation_is_dead_-_SD… · • Introduction • Traditional test automation

@sebrose [email protected]

h>p://www.pacgenesis.com/blog/over-the-wall

Page 10: Test automation is dead. Long live test automation!sddconf.com › brands › sdd › library › Test_automation_is_dead_-_SD… · • Introduction • Traditional test automation

@sebrose [email protected]

Record and playback

Page 12: Test automation is dead. Long live test automation!sddconf.com › brands › sdd › library › Test_automation_is_dead_-_SD… · • Introduction • Traditional test automation

@sebrose [email protected]

Automa;on requires

development skills

Page 13: Test automation is dead. Long live test automation!sddconf.com › brands › sdd › library › Test_automation_is_dead_-_SD… · • Introduction • Traditional test automation

@sebrose [email protected]

SystemTests

System tests

Page 14: Test automation is dead. Long live test automation!sddconf.com › brands › sdd › library › Test_automation_is_dead_-_SD… · • Introduction • Traditional test automation

@sebrose [email protected]

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"

Page 15: Test automation is dead. Long live test automation!sddconf.com › brands › sdd › library › Test_automation_is_dead_-_SD… · • Introduction • Traditional test automation

@sebrose [email protected]

SystemTests

Brittle data

Page 16: Test automation is dead. Long live test automation!sddconf.com › brands › sdd › library › Test_automation_is_dead_-_SD… · • Introduction • Traditional test automation

@sebrose [email protected]

Test automation

Page 17: Test automation is dead. Long live test automation!sddconf.com › brands › sdd › library › Test_automation_is_dead_-_SD… · • Introduction • Traditional test automation

Agenda

• Introduction • Traditional test automation • A new hope • Long live test automation!

Page 18: Test automation is dead. Long live test automation!sddconf.com › brands › sdd › library › Test_automation_is_dead_-_SD… · • Introduction • Traditional test automation

@sebrose [email protected]

That is not the test automation you

are looking for.

Page 19: Test automation is dead. Long live test automation!sddconf.com › brands › sdd › library › Test_automation_is_dead_-_SD… · • Introduction • Traditional test automation

@sebrose [email protected]

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

Page 20: Test automation is dead. Long live test automation!sddconf.com › brands › sdd › library › Test_automation_is_dead_-_SD… · • Introduction • Traditional test automation

@sebrose [email protected]

Don’t test - specify collaboratively

Page 21: Test automation is dead. Long live test automation!sddconf.com › brands › sdd › library › Test_automation_is_dead_-_SD… · • Introduction • Traditional test automation

@sebrose [email protected]

OOPSI

h>ps

://je

nnyj

mar

.com

/201

6/04

/16/

bdd-

disc

over

y-an

d-oo

psi/

Page 22: Test automation is dead. Long live test automation!sddconf.com › brands › sdd › library › Test_automation_is_dead_-_SD… · • Introduction • Traditional test automation

@sebrose [email protected]

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

Page 23: Test automation is dead. Long live test automation!sddconf.com › brands › sdd › library › Test_automation_is_dead_-_SD… · • Introduction • Traditional test automation

@sebrose [email protected]

Ideas

User Stories

Examples

Automated TestsCode

Page 24: Test automation is dead. Long live test automation!sddconf.com › brands › sdd › library › Test_automation_is_dead_-_SD… · • Introduction • Traditional test automation

@sebrose [email protected]

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.

Page 25: Test automation is dead. Long live test automation!sddconf.com › brands › sdd › library › Test_automation_is_dead_-_SD… · • Introduction • Traditional test automation

@sebrose [email protected]

h>p:

//agi

lefo

rall.

com

/res

ourc

es/h

ow-t

o-sp

lit-a

-use

r-st

ory/

Page 26: Test automation is dead. Long live test automation!sddconf.com › brands › sdd › library › Test_automation_is_dead_-_SD… · • Introduction • Traditional test automation

@sebrose [email protected]

Living documentation

h>ps

://re

lisha

pp.c

om/G

DS/

whi

teha

ll/do

cs/h

istor

ical

-acc

ount

s

Page 27: Test automation is dead. Long live test automation!sddconf.com › brands › sdd › library › Test_automation_is_dead_-_SD… · • Introduction • Traditional test automation

@sebrose [email protected]

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

Page 28: Test automation is dead. Long live test automation!sddconf.com › brands › sdd › library › Test_automation_is_dead_-_SD… · • Introduction • Traditional test automation

@sebrose [email protected]

Bene

fit (R

isk)

Cost

Invest in infrastructure

Pointless

Highvalue

Bread & bu>er

Costs and benefits

Page 29: Test automation is dead. Long live test automation!sddconf.com › brands › sdd › library › Test_automation_is_dead_-_SD… · • Introduction • Traditional test automation

@sebrose [email protected]

h>p://claysnow.co.uk/architectural-alignment-and-test-induced-design-damage-fallacy/

Test automation pyramid

Manual / Exploratory

Page 39: Test automation is dead. Long live test automation!sddconf.com › brands › sdd › library › Test_automation_is_dead_-_SD… · • Introduction • Traditional test automation

@sebrose [email protected]

[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

Page 40: Test automation is dead. Long live test automation!sddconf.com › brands › sdd › library › Test_automation_is_dead_-_SD… · • Introduction • Traditional test automation

@sebrose [email protected]

Be>er communicaHon

(Ubiquitous language)Reduced risk (Faster feedback)

Increased trust

(CollaboraHon)Living documentaHon

Long live test

automa;on!

Page 41: Test automation is dead. Long live test automation!sddconf.com › brands › sdd › library › Test_automation_is_dead_-_SD… · • Introduction • Traditional test automation

Seb Rose Twi>er: @sebrose Blog: h>p://cucumber.io E-mail: [email protected]

QuesHons?