Treat yourself - A tale about dogtraining and test driven development

6fe15a7e096eb9517a201a249e57aa80?s=47 Mirjam
February 06, 2020

Treat yourself - A tale about dogtraining and test driven development

Slides to my keynote at European Testing Conference 2020 in Amsterdam.
You can find the code example on github:
https://github.com/programmiri/examples-talk-tdd-dogtraining

6fe15a7e096eb9517a201a249e57aa80?s=128

Mirjam

February 06, 2020
Tweet

Transcript

  1. 2.
  2. 17.

    TEST DRIVEN DEVELOPMENT - how Red - Green - Refactor

    Image src: https://giphy.com/gifs/peteandpete-season-3-the-adventures-of-pete-and-3o7Z4tNIWOQWTlfGN2
  3. 18.

    TDD CYCLE ❌ Write a test. ❌ That test fails

    - obviously ❌ Write code that makes the test pass ✅ Test pass! # Refactor Rinse and repeat! Image src: https://giphy.com/gifs/girl-yeah-wash-JS88XIgg7laNO
  4. 19.
  5. 22.

    DOG TRAINING SIMULATOR TASK Program to show others how to

    train a specific behavior to a dog.
  6. 23.

    DOG TRAINING SIMULATOR USER STORY I have a dog and

    I want to teach this dog the behavior "Touch", using positive reinforcement as a technique.
  7. 24.

    DOG TRAINING SIMULATOR INITIAL SITUATION - no past no conditioning

    - rewarding, neutral and punishing consequences - visible reactions to consequences
  8. 25.

    DOG TRAINING SIMULATOR My training will be successful when... -

    I say "Touch" - and hold two fingers so my dog can access them, - my dog comes immediately and - with a joyful body language to me and - presses its nose at the two fingers shortly.
  9. 27.
  10. 29.
  11. 30.
  12. 31.
  13. 32.
  14. 33.
  15. 34.
  16. 35.
  17. 36.
  18. 37.

    !"#

  19. 38.
  20. 39.
  21. 40.
  22. 41.
  23. 43.
  24. 44.
  25. 45.
  26. 46.
  27. 47.
  28. 48.
  29. 49.
  30. 50.
  31. 51.

    !

  32. 52.
  33. 53.
  34. 54.
  35. 55.

    !

  36. 56.
  37. 57.
  38. 58.
  39. 59.
  40. 60.
  41. 61.
  42. 62.
  43. 63.
  44. 64.
  45. 65.
  46. 66.
  47. 67.
  48. 68.
  49. 69.
  50. 70.
  51. 71.
  52. 72.
  53. 73.
  54. 74.
  55. 75.
  56. 76.
  57. 77.
  58. 78.
  59. 79.
  60. 80.
  61. 81.
  62. 82.
  63. 83.
  64. 84.

    WHAT - imho - TDD IS ABOUT TDD is not

    only a strategy for tests, it's a strategy for design. It helps to stay focused and keep things simple. It makes changes easier and refactoring safer. You can work in quick iterations and get in a very motivating feedback loop.
  65. 85.

    TESTER ! DEVELOPER How it brings us together - help

    developers to refine tests - build a balanced testing pyramid together Image src: https://giphy.com/gifs/dog-hug-sX755wvr2Q6gE