Test Driven Development
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.
Subscribe To Newsletter
Get weekly updates to your email