Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to describe the first step of TDD.
Software Engineering
In TDD, the first step is to write a [1] before writing any actual code. Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Writing the function before the test
Writing documentation first instead of a test
✗ Incorrect
The first step in Test-driven development is to write a test that defines a desired improvement or new function.
2fill in blank
mediumComplete the sentence to explain the TDD cycle.
Software Engineering
The TDD cycle is often described as Red, [1], Refactor.
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing 'Green' with 'Run' or 'Review'
Thinking the cycle is Red, Run, Refactor
✗ Incorrect
In TDD, 'Red' means the test fails, 'Green' means the test passes, and then you Refactor the code.
3fill in blank
hardFix the error in the TDD description.
Software Engineering
In TDD, you write the code first, then write tests to check it. This is called [1]. Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing TDD with writing tests after code
Mixing up different development approaches
✗ Incorrect
Writing code first and tests later is called Test-last development, which is the opposite of TDD.
4fill in blank
hardFill both blanks to complete the TDD workflow.
Software Engineering
First, write a failing [1]. Then, write just enough [2] to pass it.
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Writing code before the test
Confusing documentation with tests
✗ Incorrect
The TDD workflow starts by writing a failing test, then writing just enough code to pass that test.
5fill in blank
hardFill all three blanks to describe the benefits of TDD.
Software Engineering
TDD helps improve [1], reduces [2], and encourages [3] design.
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing 'faster' instead of 'better' for design
Mixing up benefits with unrelated terms
✗ Incorrect
TDD improves code quality, reduces bugs, and encourages better design practices.