Test-Driven Development

Briefly learn what test-driven design is and what its workflow is.

What is test-driven design

There's an alternative to writing tests after the code, which is writing the test prior to the code. That might be because we're starting a new project or feature, and we want to see what it will look like before writing the actual production code. Or it might be because there's a defect on the code base, and we want to write a test first to reproduce it before jumping into the fix. This is called Test-Driven Design (TDD).

There are entire books dedicated just to TDD, so it is not realistic to try and cover the topic comprehensively in this course. However, it's so important that it has to be mentioned.

The purpose of test-driven design

The idea behind TDD is that tests should be written before production code in a way that the production code is only written to respond to tests that are failing due to that missing implementation of the functionality.

Get hands-on with 1200+ tech skills courses.