DEV Community

Oliver Davies
Oliver Davies

Posted on • Originally published at oliverdavies.uk on

Automated tests mean you can make changes quicker

Before fixing yesterday's bug, because I'd written automated tests, I ran them to ensure they were all passing.

Then, I was able to focus solely on adding the new use case - starting with a failing test to replicate the issue and then getting it to pass.

Because it was already tested, I didn't need to worry about breaking any other functionality and introducing regressions.

When the new test was passing, I could run the whole test suite and ensure they still passed and things continued to work.

Without the tests, I'd either need to check everything else manually (which takes time) or worry that something could potentially be broken.

Having tests meant I could be confident that the new and existing functionality worked.

P.S. If you're creating a new Drupal module, try my free Drupal module template.

Hostinger image

Get n8n VPS hosting 3x cheaper than a cloud solution

Get fast, easy, secure n8n VPS hosting from $4.99/mo at Hostinger. Automate any workflow using a pre-installed n8n application and no-code customization.

Start now

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay