Enrol to start learning
Reading is open to everyone. Enrolling is free, and it is what unlocks the audio lessons, practice tests and progress tracking.
25.10.1. Definition
This section
Practice test
11 questions on this section. Wrong answers show you what to read again.
Sign up to take itWhole chapter
Revision test
Mixed questions from across the chapter. Your answers get marked.
Sign up to take itQuick
Flashcard drill
3 cards from this lesson. Good the night before a test.
Try these first
- 1.
What is the first step in TDD?
Hint
Think about the cycle of TDD.
- 2.
What happens during the 'Green' phase?
Hint
Consider what needs to happen after a test is written.
- 3.
What is the first phase of TDD?
- Write code
- Red
- Green
Hint
Remember the mnemonic for the TDD cycle.
- 4.
True or False: TDD always guarantees that there will be no bugs in the code.
- True
- False
Hint
Consider the limitations of testing.
- 5.
Create a TDD plan for a simple login feature. What tests would you write first?
Hint
Think about what behavior you want to check first.
- 6.
What refactoring techniques might you use after achieving a passing test in a TDD cycle?
Hint
Focus on improving code quality while keeping tests passing.
Exercises
Total Questions
2
Estimated Time
4 min
Passing Score
70%
Instructions
- Read each question carefully
- You can use hints if you need help
- Complete all questions before submitting
4 more questions available
Enrol freeQuiz
Total Questions
2
Estimated Time
4 min
Passing Score
70%
Instructions
- Read each question carefully
- You can use hints if you need help
- Complete all questions before submitting
1 more question available
Enrol freeChallenge Problems
Total Questions
2
Estimated Time
4 min
Passing Score
70%
Instructions
- Read each question carefully
- You can use hints if you need help
- Complete all questions before submitting