💡 Learn how to design great software in 7 steps: https://arjan.codes/designguide.
Test-driven development (TDD), also known as red-green-refactor is a common software development technique in which you write tests before you write the actual code. In this video, I show an example in Python of how to do TDD using the unittest package. I also share a few practical tips related to software testing in this video.
The code I worked on in this episode is available here: https://github.com/ArjanCodes/2021-tdd.
🎓 ArjanCodes Courses: https://www.arjancodes.com/courses/
🔖 Chapters:
0:00 Intro
0:20 Explaining the example
1:06 What is Test-Driven Development (TDD)?
2:59 The RED phase
6:26 The GREEN phase
7:36 The REFACTOR phase
8:58 The pros and cons of TDD
11:31 Testing tip #1: isolate tests
12:28 Testing tip #2: don't test the Python standard library
13:05 Testing tip #3: compare test output with fixed values
13:58 Testing at a startup company
#arjancodes #softwaredesign #python