What stops us from writing tests?

I mentioned yesterday that continuous deployment and automated testing are two areas I often see neglected by serverless devs. I went into some detail on CD but didn’t discuss testing.

I’m a big advocate of test-driven development and automated testing in general, yet getting buy-in for it has always been a challenge for as long as I’ve been building software (over 20 years). If you’re in a technical leadership position and wanting to introduce or improve testing practice in your team/company, it can help to understand the different objections your engineers or management have to automated testing before you try to change minds.

Here’s a list of objections I’ve heard in the past:

  • It’s a throwaway prototype so writing tests seems a waste
  • It’s just me on a personal project and I can keep the whole system in my head
  • We need to get our startup product to MVP and we’ll worry about testing then. You survive before you thrive and all that.
  • We have human QA engineers for our testing
  • Developers should not be writing tests for the features they also wrote
  • We inherited a codebase with no tests, so there’s no point starting now
  • Our architecture isn’t conducive to automated testing, e.g. we’re integrating to a legacy system which we can’t replicate in a test environment
  • E2E and integration tests are slow and flaky and so are more hassle than they’re worth
  • We simply don’t know how to write tests for our tech stack: how to structure them, what scopes to test, what tools to use

Some of these are valid (to an extent at least) and some are downright wrong (IMHO), yet they’re subjective opinions that can’t be ignored if they’re from someone in your team. Testing is something which needs buy-in from everyone and you’ll struggle to make it successful without some form of goodwill or open minds from your engineers.

I’d love to hear from you — what are the main factors holding you or your team back from writing more tests? Have you tried to make the case for better testing and received pushback? Hit reply and let me know.

— Paul

Join daily email list

I publish short emails like this on building software with serverless on a daily-ish basis. They’re casual, easy to digest, and sometimes thought-provoking. If daily is too much, you can also join my less frequent newsletter to get updates on new longer-form articles.

    View Emails Archive

    🩺
    Architecture & Process Review

    Built a serverless app on AWS, but struggling with performance, maintainability, scalability or DevOps practices?

    I can help by reviewing your codebase, architecture and delivery processes to identify risk areas and their causes. I will then recommend solutions and help you with their implementation.

    Learn more >>

    🪲 Testing Audit

    Are bugs in production slowing you down and killing confidence in your product?

    Get a tailored plan of action for overhauling your AWS serverless app’s tests and empower your team to ship faster with confidence.

    Learn more >>