David Rodenas PhD
1 min readMay 5, 2022

--

This is the Waterfall Unit Test definition. The Agile Unit Test definition says «The outcome of a unit test is binary: either “pass” if the program’s behavior is consistent with the recorded expectations, or “fail” otherwise.». In Agile, the unit is the behavior (one unit of behavior), and not the code (one unit of code). It is more important in techniques like TDD, in which the code cannot exist before testing: there is no code unit to test, only the behavior unit.

Ward Cunningham to avoid confusion asked to rename Agile Unit Tests to DevelperTests (more than 15 years ago), with no luck. People like Uncle Bob keep calling them Unit Tests, but they were Agile Unit Test (read the Bowling Game Kata to see that he uses behaviors). In the other hand, Dan North invented BDD to improve testing, but people started to say that BDD was not TDD, and once again returning to the Waterfall Unit Test.

The main problem of Waterfall Unit Tests is that they are too tied to the code; thus its coupling is high and code is difficult to maintain and refactor.

--

--

David Rodenas PhD
David Rodenas PhD

Written by David Rodenas PhD

Passionate software engineer & storyteller. Sharing knowledge to advance our skills. Join me on a journey of discovery in the world of software engineering.

No responses yet