From the course: Unit Testing and Test Driven Development in Python

Unlock this course with a free trial

Join today to access over 22,600 courses taught by industry experts.

What is test-driven development (TDD)?

What is test-driven development (TDD)? - Python Tutorial

From the course: Unit Testing and Test Driven Development in Python

What is test-driven development (TDD)?

- [Narrator] In this lecture, we're going to talk about what test-driven development is and how it helps to ensure you're writing high quality and bug-free code. So what is test-driven development or TDD? TDD is a process for writing code that helps you take personal responsibility for the quality of your code. The process drives this by having you write the unit tests before the production code. This can seem pretty strange at first, but after you've used the process for a while, it becomes the norm and you'll find it hard to write code any other way. Even though the tests are written before the production code, that doesn't mean that all the tests are written first. You write one unit test for one test case and then you write the production code to make it pass. The tests and the production code are written together with small tests being written and then small bits of production code that make those tests pass. This short cycle of writing a unit test and then writing the production…

Contents