Slide 1

Slide 1 text

Test Driven Development

Slide 2

Slide 2 text

What is TDD ?

Slide 3

Slide 3 text

The Red/Green/Refactor Cycle Refactor and clean the code Write test and watch it fails Write minimal code that makes that test pass

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

Write test.

Slide 6

Slide 6 text

No content

Slide 7

Slide 7 text

No content

Slide 8

Slide 8 text

No content

Slide 9

Slide 9 text

No content

Slide 10

Slide 10 text

Run test, watch it fails.

Slide 11

Slide 11 text

No content

Slide 12

Slide 12 text

Write minimal code, pass the test.

Slide 13

Slide 13 text

No content

Slide 14

Slide 14 text

Run test, watch it fails.

Slide 15

Slide 15 text

No content

Slide 16

Slide 16 text

Write minimal code, pass the test.

Slide 17

Slide 17 text

No content

Slide 18

Slide 18 text

Run test, watch it fails.

Slide 19

Slide 19 text

No content

Slide 20

Slide 20 text

Refactor is the key

Slide 21

Slide 21 text

No content

Slide 22

Slide 22 text

No content

Slide 23

Slide 23 text

No content

Slide 24

Slide 24 text

Run test, watch it fails.

Slide 25

Slide 25 text

No content

Slide 26

Slide 26 text

Write minimal code, pass the test.

Slide 27

Slide 27 text

No content

Slide 28

Slide 28 text

Run test, watch it fails.

Slide 29

Slide 29 text

No content

Slide 30

Slide 30 text

Write minimal code, pass the test.

Slide 31

Slide 31 text

No content

Slide 32

Slide 32 text

Run test, watch it fails.

Slide 33

Slide 33 text

No content

Slide 34

Slide 34 text

Even more refactor.

Slide 35

Slide 35 text

No content

Slide 36

Slide 36 text

Run test, watch it fails.

Slide 37

Slide 37 text

No content

Slide 38

Slide 38 text

Write minimal code, pass the test.

Slide 39

Slide 39 text

No content

Slide 40

Slide 40 text

Run test, watch it fails.

Slide 41

Slide 41 text

No content

Slide 42

Slide 42 text

Ship code to production.

Slide 43

Slide 43 text

No content

Slide 44

Slide 44 text

Refactor is the key, remember?

Slide 45

Slide 45 text

Refactoring is a disciplined technique for restructuring an existing body of code, altering its internal structure without changing its external behavior. - Martin Fowler

Slide 46

Slide 46 text

No content

Slide 47

Slide 47 text

Run test, watch it fails.

Slide 48

Slide 48 text

No content

Slide 49

Slide 49 text

Why should we use TDD ?

Slide 50

Slide 50 text

TDD start with the end of mind, and walks you through what is the next step you have to do to get the code working

Slide 51

Slide 51 text

No content

Slide 52

Slide 52 text

No content

Slide 53

Slide 53 text

No content

Slide 54

Slide 54 text

No content

Slide 55

Slide 55 text

75% of a developer’s time is spent on debugging

Slide 56

Slide 56 text

TDD eradicates fear of change - Eric Elliott

Slide 57

Slide 57 text

40%-80% fewer bugs in production* *https:/ /www.researchgate.net/publication/3249271_Guest_Editors'_Introduction_TDD--The_Art_ of_Fearless_Programming

Slide 58

Slide 58 text

Source https://www.codecademy.com/articles/tdd-red- green-refactor https://blog.cleancoder.com/uncle-bob/2014/1 2/17/TheCyclesOfTDD.html https://medium.com/javascript-scene/tdd-chan ged-my-life-5af0ce099f80 https://coralogix.com/log-analytics-blog/this-is- what-your-developers-are-doing-75-of-the-time -and-this-is-the-cost-you-pay/ https://pixabay.com/vectors/wow-bang-explosi on-pow-blast-155268/ https://heeris.id.au/2013/this-is-why-you-shoul dnt-interrupt-a-programmer/