oliverdavies.uk/source/_daily_emails/2024-01-30.md
Oliver Davies 5eba6de81a Update daily email permalinks
This is a follow-up to commit 3be9031de8
as each daily email has a `permalink` value that overrides the default
content type permalink.
2024-05-21 00:03:52 +01:00

1,006 B

title date permalink snippet tags
TDD doesn't mean you know everything upfront 2024-01-30 daily/2024/01/30/tdd-doesnt-mean-you-know-everything-upfront Test-Driven Development doesn't mean you need to know everything upfront.
software-development
automated-testing
test-driven-development

I'm in the final phase of a Drupal development project for a customer.

It has some custom modules and code I wrote with automated tests and test-driven development.

Today, the client reported a bug.

But, instead of something working incorrectly, this was a use case I hadn't considered.

The tests were passing, but there wasn't one for this.

I wrote the code for the use cases I was aware of when I started, and now I'm aware of another, I can add a test for it and ensure it's tested and working.

To do test-driven development, you don't need to know all the use cases and functionality upfront.

Write for what you know at the time, then expand and iterate in the future.