The three rules of TDD

Rabin Poudyal
2 min readMar 6, 2021

According to Uncle bob, there are three rules that should be followed to get the best results from TDD. They are:

  • You should write only enough tests that are sufficient to fail
  • You should only write enough code that is sufficient to pass the written failing code
  • Write production code only to pass the failing tests.

--

--

Rabin Poudyal

Software Engineer, Data Science Practitioner. Say "Hi!" via email: rabinpoudyal1995@gmail.com or visit my website https://rabinpoudyal.com.np