Slide 1

Slide 1 text

Tech Excellence meetup Daniel Moka Software Craftsman šŸŒwww.danielmoka.com How to convince the management and your colleagues to apply Test-Driven Development

Slide 2

Slide 2 text

www.danielmoka.com Daniel Moka - Software Craftsman Agenda Introduction Selling TDD to the management Convincing your colleagues to apply TDD Q/A

Slide 3

Slide 3 text

www.danielmoka.com Daniel Moka - Software Craftsman Introduction Software Craftsman from 󰏘 Wide spectrum of domain TDD advocate Helping teams to produce quality software

Slide 4

Slide 4 text

www.danielmoka.com Daniel Moka - Software Craftsman Why? TDD is still not widely adopted Highly misunderstood topic Pushback

Slide 5

Slide 5 text

www.danielmoka.com Daniel Moka - Software Craftsman What is TDD?

Slide 6

Slide 6 text

www.danielmoka.com Daniel Moka - Software Craftsman What do Management want? Fast and stable releases At lower costs With more satisļ¬ed end-users Bugless and working software

Slide 7

Slide 7 text

www.danielmoka.com Daniel Moka - Software Craftsman What TDD oļ¬€ers TDD reduces the number of defects High reputation Reduced costs

Slide 8

Slide 8 text

www.danielmoka.com Daniel Moka - Software Craftsman Finding bugs early is cheap If you catch a bug while coding it will cost you 80$. If you catch a bug with your CI pipeline it will cost you 240$. If you catch a bug with your Q&A process it will cost you 960$. If you catch a bug in production it will cost you 7600$

Slide 9

Slide 9 text

www.danielmoka.com Daniel Moka - Software Craftsman Relative cost of defects

Slide 10

Slide 10 text

www.danielmoka.com Daniel Moka - Software Craftsman What TDD oļ¬€ers TDD increases agility and productivity

Slide 11

Slide 11 text

www.danielmoka.com Daniel Moka - Software Craftsman What TDD oļ¬€ers TDD reduces cost by spending much less time on debugging

Slide 12

Slide 12 text

www.danielmoka.com Daniel Moka - Software Craftsman How to approach it? Requires cultural change Requires several technical skills Forcing never works Selling TDD to the management

Slide 13

Slide 13 text

www.danielmoka.com Daniel Moka - Software Craftsman TDD as a silver bullet Convincing your colleagues to apply TDD

Slide 14

Slide 14 text

www.danielmoka.com Daniel Moka - Software Craftsman Trust in our code Results in unique and meaningful tests Preventing false negatives Losing domain knowledge with TLD Seeing our test failing

Slide 15

Slide 15 text

www.danielmoka.com Daniel Moka - Software Craftsman What is code coverage and mutation testing? What is mutation score? - Killed mutants -> failing test - Surviving mutants -> passing tests - TDD produces high mutation score High quality of tests

Slide 16

Slide 16 text

www.danielmoka.com Daniel Moka - Software Craftsman TLD + code coverage + mutation testing - time consuming - very technical - demotivating (duct taping) - mandatory practices (while with TDD theyā€™re optional) High quality of tests

Slide 17

Slide 17 text

www.danielmoka.com Daniel Moka - Software Craftsman - Great things with TDD - continuous refactoring - covering edge/corner cases - readable and meaningful tests - Keep testing and refactoring along the way - PRs wonā€™t help Quality must be built in

Slide 18

Slide 18 text

www.danielmoka.com Daniel Moka - Software Craftsman Testability by design Improved UX Enforced refactoring TDD is a design technique

Slide 19

Slide 19 text

www.danielmoka.com Daniel Moka - Software Craftsman Minimizing Geek At Keyboard (GAK) activities Additional beneļ¬ts #1

Slide 20

Slide 20 text

www.danielmoka.com Daniel Moka - Software Craftsman Reducing mental load and managing complexity Additional beneļ¬ts #2

Slide 21

Slide 21 text

www.danielmoka.com Daniel Moka - Software Craftsman TDD is a joyful process Additional beneļ¬ts #3

Slide 22

Slide 22 text

www.danielmoka.com Daniel Moka - Software Craftsman Seeing the tests fail is essential Trustworthy testsuite with high mutation score Built-in quality Powerful design technique Summing up

Slide 23

Slide 23 text

www.danielmoka.com Daniel Moka - Software Craftsman Thanks for attending! Twitter: @dmokafa Website: www.danielmoka.com Email: [email protected]

Slide 24

Slide 24 text

www.danielmoka.com Daniel Moka - Software Craftsman Questions?