Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Use Testing to Develop Better Software Faster

Use Testing to Develop Better Software Faster

Testing doesn’t always get the attention it deserves in software development. Many developers claim to be bad at it, or are just not that interested. (These may or may not be related.)

As developers, our job is to deliver working software. With the shift to CI/CD and the move to the cloud, the need to have the right feedback at the right time only increases. There are many ways that testing can help us with that. Not only can testing help us verify our solution and prevent us from breaking things, it can also help us design our software, find flaws in our architecture and come up with better solutions. In this talk I will highlight some of the many ways that testing can help you to develop better software faster.

Marit van Dijk

February 08, 2023
Tweet

More Decks by Marit van Dijk

Other Decks in Programming

Transcript

  1. https://maritvandijk.com/


    @MaritvanDijk77


    github.com/mlvandijk


    @[email protected]
    Use Testing to
    Develop Better
    Software Faster
    OOP 2023 DIGITAL - Feb 9th, 2023

    View full-size slide

  2. Some tests…
    @MaritvanDijk77

    View full-size slide

  3. @MaritvanDijk77

    View full-size slide

  4. @MaritvanDijk77

    View full-size slide

  5. Build quality in
    @MaritvanDijk77

    View full-size slide

  6. https://danashby.co.uk/2016/10/19/continuous-testing-in-devops/ @MaritvanDijk77

    View full-size slide

  7. https://janetgregory.ca/testing-from-a-holistic-point-of-view/


    @MaritvanDijk77

    View full-size slide

  8. @MaritvanDijk77

    View full-size slide

  9. The right
    feedback
    at the
    right time
    @MaritvanDijk77

    View full-size slide

  10. Ask questions
    @MaritvanDijk77

    View full-size slide

  11. @MaritvanDijk77

    View full-size slide

  12. @MaritvanDijk77

    View full-size slide

  13. https://elizabethzagroba.com/posts/2019/2019-01-25_have-i-tried-enough-weird-stuff/
    @ezagroba
    @MaritvanDijk77

    View full-size slide

  14. @MaritvanDijk77

    View full-size slide

  15. https://github.com/minimaxir/big-list-of-naughty-strings
    @MaritvanDijk77

    View full-size slide

  16. https://twitter.com/sempf/status/514473420277694465?s=20&t=ZDqpc0arpJZeUBL6M1J3jg


    https://www.sempf.net/post/On-Testing1
    @MaritvanDijk77

    View full-size slide

  17. How are we going to test this?
    @MaritvanDijk77

    View full-size slide

  18. Test pyramid
    @MaritvanDijk77
    https://martinfowler.com/bliki/TestPyramid.html

    View full-size slide

  19. @MaritvanDijk77

    View full-size slide

  20. Build testability in
    @MaritvanDijk77

    View full-size slide

  21. @MaritvanDijk77

    View full-size slide

  22. “When developers are involved in creating and maintaining
    acceptance tests:


    1. code becomes more testable (this is why TDD is
    important)


    2. they will care more and invest more effort into
    maintaining & fixing them.”


    - Accelerate by Nicole Forsgren, PhD


    Jez Humble, and Gene Kim

    View full-size slide

  23. Use the right tools
    @MaritvanDijk77

    View full-size slide

  24. @MaritvanDijk77

    View full-size slide

  25. Use tools as intended
    @MaritvanDijk77

    View full-size slide

  26. Tests should increase confidence
    @MaritvanDijk77

    View full-size slide

  27. @MaritvanDijk77

    View full-size slide

  28. Tests should be reliable
    @MaritvanDijk77

    View full-size slide

  29. @MaritvanDijk77

    View full-size slide

  30. @MaritvanDijk77

    View full-size slide

  31. @MaritvanDijk77
    https://www.youtube.com/watch?v=1cZRBtrvys0

    View full-size slide

  32. Run your tests
    @MaritvanDijk77

    View full-size slide

  33. Run your tests
    @MaritvanDijk77

    View full-size slide

  34. Never


    trust a test


    you haven’t
    seen fail
    @MaritvanDijk77

    View full-size slide

  35. @MaritvanDijk77

    View full-size slide

  36. A failing test should tell you
    exactly what’s wrong quickly
    @MaritvanDijk77

    View full-size slide

  37. @MaritvanDijk77
    @MaritvanDijk77
    Kevlin Henney


    GOTO 2022 Amsterdam

    View full-size slide

  38. Use
    meaningful,
    descriptive
    names
    @MaritvanDijk77

    View full-size slide

  39. Each test should test one thing
    @MaritvanDijk77

    View full-size slide

  40. @MaritvanDijk77
    Readability of your tests

    View full-size slide

  41. @MaritvanDijk77

    View full-size slide

  42. @MaritvanDijk77

    View full-size slide

  43. TL; DR: Test your code!
    @MaritvanDijk77
    https://www.redbubble.com/people/hogfish (Trish Khoo @hogfish)

    View full-size slide

  44. https://maritvandijk.com/


    @MaritvanDijk77


    github.com/mlvandijk


    @[email protected]
    Slides & More
    https://maritvandijk.com/presentations/better-software-faster/

    View full-size slide