Writing tests is an investment

It can take time to write automated tests and do test-driven development, but it is an investment in a project's future stability.

Spending time to write tests upfront will save time as the project progresses, make the code easier to change, and result in better software, fewer bugs, and quicker changes.

Even though it takes time, it's time well spent.