@drpicox
HOMEBLOGTESTINGTEACHING

TDD Rules and Ethics

The TDD process and rules have been propossed initially by Robert C. Martin as the first way to achive professionalism. He states that these are the three rules that every professional should observe to make sure that any product does exactly what he says:

  • You are not allowed to write any production code unless it is to make a failing unit test pass.
  • You are not allowed to write any more of a unit test than is sufficient to fail; and compilation failures are failures.
  • You are not allowed to write any more production code than is sufficient to pass the one failing unit test.

With this rules, we protect others from unitentional bugs, we ensure that what we deliver is exactly what our client wants, but also, and most important, we ensure that our code can be maintained in the future.

See also:

Copyright © 2022 David Rodenas
G · T · M π