It can take a little while to understand the concepts and how to implement TDD, but once you do, it generally makes your software development process more robust and helps to minimise “bad” code.

In common usage, the term TDD refers to the process of writing unit tests before you start writing your actual code.

The idea being that by defining a test, you define your expectations as to what the code should do, then write just enough code to make the test pass.

Once you have a passing test, you refactor your code as necessary, check that your test still passes, fix your code if not.

This process is commonly referred to as “Red Green Refactor”.

There are many TDD tools and resources out there on the Web, a popular unit testing framework is NUnit.

As an aside, if you’re struggling with the general principles of “agile” development (which I will discuss in a later blog post), The TDD “Black Belt” Path (a useful checklist of “principles to get your head round”) can be found on TDD The Agileer (Doug’s Blog).

There’s a lot more to Agile software development than TDD and Doug’s list, but these are good starting points.

Want to learn .net Core?

  • Want to learn .NET Core but don't know where to start?
  • Don't have time to keep up with everything Microsoft is putting out?
  • Stuck on legacy apps when you want to build something new?
Enter your details below and get my weekly update; learn how to build better .NET web apps.
comments powered by Disqus