Think smaller with TDD

I've recently added several custom search blocks and pages to a client project.

Each requires a results page, a list of autocomplete suggestions for users to select from, a custom form, and a block to place it on the required pages.

For each search, I'm first testing the results page, ensuring it exists and contains the correct results before testing the autocomplete results, creating the block and form, and linking everything together.

Thinking small

This could seem like a large and daunting task, but with test-driven development, I can break everything into smaller, more manageable tasks.

My objective is either to write the next failing test and then get it to pass or to refactor what I've written.

I can focus on these small steps and make progress towards the end goal, guided by the tests I'm writing, instead of needing to focus always on one large and complex task.