Test Driven Development

Testing

In this post we will be investigating what is test driven development and how we can use it to improve our development process.

What Is Test Driven Development?
Test driven development is a development process that is exactly what it sounds like, we develop our applications driven by a number of different tests. This involves writing all your tests up front before any development has taken place. At the start this will seem strange as all the tests are going to fail but then we can develop our application to make sure all these tests will pass.

Test Driven Development can lead to your code being simpler, more defensive and less feature creep. This is because you only need to write the code to make the tests pass and nothing else. You can also make sure that you aren't about to create functionality that isn't needed by writing your tests first and then running them, if some of your new tests pass then that functionality for the test already exists.

These two principles of development are known as:

  • KISS - Keep it simple, stupid.
  • YAGNI - You ain't gonna need it.

Upgrade to access all content on Paulund

Members unlock all tutorials and snippets

Access to all downloadable content

Access to code examples before others

Sign Up Now

Already a member? Login here

Subscribe To Newsletter

Get weekly updates to your email