who will guard the guards themselves? how to trust your automation and avoid deceit

26
Who will guard the guards themselves? How to trust your automation and avoid deceit Bas Dijkstra www.ontestautomation.com [email protected] @_basdijkstra

Upload: bas-dijkstra

Post on 21-Jan-2018

1.641 views

Category:

Software


0 download

TRANSCRIPT

Page 1: Who will guard the guards themselves? How to trust your automation and avoid deceit

Who will guard the

guards themselves?

How to trust your automation and avoid deceit

Bas Dijkstra

www.ontestautomation.com

[email protected]

@_basdijkstra

Page 2: Who will guard the guards themselves? How to trust your automation and avoid deceit

_I build test automation solutions

_I teach test automation, service virtualization

_I write www.ontestautomation.com

TechBeacon, StickyMinds, …

Page 3: Who will guard the guards themselves? How to trust your automation and avoid deceit

Continuous Testing

DEV ??? PROD

testing testing testing

testing

Page 4: Who will guard the guards themselves? How to trust your automation and avoid deceit
Page 5: Who will guard the guards themselves? How to trust your automation and avoid deceit

“Sed quis

custodiet ipsos

custodes?”

But who will guard the guards themselves?

--- Juvenal, Satire VI, lines 347–348 ---

Page 6: Who will guard the guards themselves? How to trust your automation and avoid deceit

Confidence“Our product is

able to perform

function X”

Control Trust

“I control the

execution of X”

“I trust our

product to be able

to perform X”

Page 7: Who will guard the guards themselves? How to trust your automation and avoid deceit

I want to be confident about the ability of our

product to perform function X

Automated tests are used to build trust in our

product performing function X correctly

I need to be able to trust my automated tests

around function X

Page 8: Who will guard the guards themselves? How to trust your automation and avoid deceit

“I’m not upset that

you lied to me,

I’m upset that from

now on I can’t

believe you”

--- Friedrich Nietzsche ---

Page 9: Who will guard the guards themselves? How to trust your automation and avoid deceit

False positives

Persistent > fix it or fire it

Intermittent > ‘flaky tests’

https://youtu.be/XnkWkrbzMh0

Richard Bradshaw – Selenium Conf Berlin

Page 10: Who will guard the guards themselves? How to trust your automation and avoid deceit
Page 11: Who will guard the guards themselves? How to trust your automation and avoid deceit
Page 12: Who will guard the guards themselves? How to trust your automation and avoid deceit
Page 13: Who will guard the guards themselves? How to trust your automation and avoid deceit
Page 14: Who will guard the guards themselves? How to trust your automation and avoid deceit
Page 15: Who will guard the guards themselves? How to trust your automation and avoid deceit
Page 16: Who will guard the guards themselves? How to trust your automation and avoid deceit

False negatives

Page 17: Who will guard the guards themselves? How to trust your automation and avoid deceit

False negative: exhibit A

Page 18: Who will guard the guards themselves? How to trust your automation and avoid deceit

100%

code coverage!

False negative: exhibit B

still

Page 19: Who will guard the guards themselves? How to trust your automation and avoid deceit

If you want to trust your tests,

start building tests you can trust on

Page 20: Who will guard the guards themselves? How to trust your automation and avoid deceit
Page 21: Who will guard the guards themselves? How to trust your automation and avoid deceit

Keep your tests fresh

Do code review on your test code

Test your tests periodically

Review your suite from time to time

Don’t be afraid to throw away tests

Page 22: Who will guard the guards themselves? How to trust your automation and avoid deceit

Tools to help you

keep your tests fresh

Page 23: Who will guard the guards themselves? How to trust your automation and avoid deceit

Mutation testing

http://pitest.org/

(Java)

Page 24: Who will guard the guards themselves? How to trust your automation and avoid deceit

Property-based testing

https://github.com/pholser/junit-quickcheck

(Java)

http://blog.jessitron.com/2013/04/property-based-testing-what-is-it.html

Page 25: Who will guard the guards themselves? How to trust your automation and avoid deceit
Page 26: Who will guard the guards themselves? How to trust your automation and avoid deceit

_Email: [email protected]

_Blog: www.ontestautomation.com

_LinkedIn: www.linkedin.com/in/basdijkstra

_Twitter: @_basdijkstra