thinQmaster Virtual testing partner Adaptive practice exams that find your weak spots and drill them. Every answer explained. From $69
Enroll

thinQmaster

Find your exam

Five questions free, before you decide.

Step 1 · choose a vendor

In one of our camps? Your practice exams come with the tuition — they are on your study page already.

DevOps & Automation · Intermediate

Test-Driven Development (TDD)

A development practice of writing a failing test first, writing just enough code to pass it, then refactoring (red-green-refactor).

Definition

TDD produces testable designs and high coverage by construction. It is a core XP and Scrum developer practice.

Example

Write test_add_vlan() that fails, implement add_vlan(), run tests green, then clean up the code.

Exam tip

Remember the cycle order: red (fail), green (pass), refactor.

Related terms