Running all the tests and confirming that the last one is failing

Confirming that the last test is failing, confirms that the test would not, mistakenly, pass without the introduction of a new code. If the test is passing, then the feature already exists or the test is producing a false positive. If that's the case and the test actually always passes independently of the implementation, it is, in itself, worthless and should be removed.

A test must not only fail, but must fail for the expected reason. In this phase, we are still in the red stage. Tests were run and the last one failed.

Get Test-Driven Java Development - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.