Skip to main content

What is Test-Driven Development? (Video)

05-29-20 Colby Allen

Test-driven development allows us to have confidence in our code. Learn how a frequent testing cycle during development can improve your coding process.

There is great power in failure because failure is not final: failure is formative. It can be your greatest tool and the greatest source of feedback. Let’s take a look at how failure in the scope of test-driven development (TDD) drives us forward with clear direction. In this article, I’ll be covering the TDD cycle and why TDD can be so impactful in the development process.

YouTube embeds track user data for advertising purposes. You can watch the video on YouTube if you prefer not to grant consent for YouTube embeds.

We can all agree that our code isn’t perfect—it has faults, and there’s always something to improve.

Test-Driven Development Allows Us to…

Have Confidence in Our Code

Test-driven development allows us to have foresight. It allows us to drive our application with confidence that everything works and everything fails for the right reasons as well. We have the freedom to add to our existing code without fear of breaking changes and not being able to understand why things are broken. Think of testing as a sort of protection. We can have protection over one piece of code or an entire system of code. We can test the states and behavior of very small and unique objects or functions just as we can test whether a system of objects or functions communicates properly.

Focus on the First Step, Not the Entire Staircase

Test-driven development forces us to break the problem down into more manageable pieces before trying to solve it. This is useful because we are always certain that our code will change, but we can never be certain about how it will change. So we can’t be quick to solve everything at once.

“Always implement things when you actually need them, never when you just foresee that you need them.” —Ron Jefries

Why Test-Driven Development?

Test-driven development is an effective and valuable tool. It requires us to form a deeper understanding of all of the functionality required before writing code. The questions we are compelled to ask, like “what can I test for?”; “how should I test that?”; “what will happen when/if…”, give us a much deeper understanding of our code. TDD lends to building a robust product that can easily be maintained and changed over time with confidence. This is a powerful skill that, if exercised enough, can be very useful in any developer’s tool belt.

Related Content

User-Centered Thinking: 7 Things to Consider and a Free Guide

Want the benefits of UX but not sure where to start? Grab our guide to evaluate your needs, earn buy-in, and get hiring tips.

More Details

See Everything In

Want to talk about how we can work together?

Katie can help

A portrait of Vice President of Business Development, Katie Jennings.

Katie Jennings

Vice President of Business Development