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

Are Your Tests Slowing You Down?

Are Your Tests Slowing You Down?

Testing is a Good Thing, right? Especially automated testing. But "Good things come to those who wait" is not something that's going to appeal to the busy developer. You want results, and you want them now. You're in The Zone working on a problem, and the last thing you want is to break your flow wrestling with your testing framework or waiting for the tests to finish running.

More code means more tests. More coverage means more tests. More tests mean more time. Time that you want to spend being productive, creative, innovative. How can you balance the need for quality with the need for speed?

In this talk, Trisha will identify issues that slow down developers when writing, running and debugging tests, and look at tools that can help developers with each of these problems. There will be live coding, analysis of social media poll results, an overview of solutions in this space, "best practice" recommendations, and machine learning will be mentioned at some point.

Avatar for Trisha Gee

Trisha Gee

October 06, 2025
Tweet

More Decks by Trisha Gee

Other Decks in Technology

Transcript

  1. • Head of Developer Advocacy at Gradle • Java Champion

    & JetBrains Community Contributor • 20+ years development experience • Author & YouTuber Trisha Gee
  2. What slows down your testing? Writing tests Running tests locally

    Running tests in CI Troubleshooting tests Unreliable test results
  3. The productivity myth suggests that anything we spend time on

    is up for automation…. The importance and value of thinking about our work and why we do it is waved away as a distraction.” https://www.techpolicy.press/challenging-the-myths-of-generative-ai/ Eryk Salvaggio
  4. We recommend that the developers, who are good at writing

    efficient, maintainable code, work together with the testers, who are good at specifying test cases, to automate tests.” Agile Testing Condensed: A Brief Introduction Lisa Crispin, Janet Gregory
  5. What slows down your testing? Writing tests Running tests locally

    Running tests in CI Troubleshooting tests Unreliable test results
  6. Your test needs to tell you what is expected and

    why, so you understand what to do when it fails.
  7. What slows down your testing? Writing tests Running tests locally

    Running tests in CI Troubleshooting tests Unreliable test results
  8. If you add a new test and it’s flaky Or

    are working on a test and it becomes flaky
  9. If you add a new test and it’s flaky Or

    are working on a test and it becomes flaky Fix it now!! (Future you will thank you)
  10. Make Time To Fix Flaky Tests • When they impact

    you directly • Attach them to related functionality • Flaky Test Days • Add flaky tests to the backlog • 20% time, tech debt time, cleanup time…
  11. Causes of flakiness 1. Environment, Network, and Resources 2. Integration

    Points 3. Concurrency, Asynchronous Programming, and Waiting 4. Setup/Teardown and Test Data 5. System Behaviour Known good practices and tools Not always in my control Try to minimise these Can be REALLY HARD
  12. What slows down your testing? Writing tests Running tests locally

    Running tests in CI Troubleshooting tests Unreliable test results
  13. Test Distribution Results ‑ ~50% ‑ ~50% ‑ ~50% Doubling

    the number of executors cuts build time in half
  14. The test selection procedure selects fewer than a third of

    the tests that would be selected on the basis of build dependencies” Predictive Test Selection - Meta Research https://research.facebook.com/publications/predictive-test-selection/ Mateusz Machalica, Alex Samylkin, Meredith Porth, Satish Chandra
  15. “Once things like databases become a hindrance, optimise the testing

    loop, mock things out to run things fast. You can run locally and you don't have all the same infra dependencies as someone else.” On DevEx, PaaS, and Testing in Production https://bit.ly/3ZA0uQM Kelsey Hightower
  16. • Separation of concerns • Encapsulation • High cohesion and

    loose coupling • SOLID • DRY • Descriptive naming • Modularisation • Designing for performance
  17. “Yes, I regularly delete tests that no longer add unique

    value.” Angie Jones (@techgirl1908)
  18. Invest time in writing better tests. They will be easier

    to troubleshoot, less flaky, and better document your system’s expected behaviour
  19. Testing is not only for checking the system does what

    it’s supposed to, it’s for documenting the expected behaviour.” Israel Boza Rodriguez (@IsraKaos)