Unit testing - iToto/developmentCycle GitHub Wiki

Here we go. The thing we always talk about doing but never get around to doing. Unit testing.

Unit testing involves testing individual components of our software. Writing unit tests can be very time consuming but they can also be an excellent tool for finding bugs before they make it out into production.

Test driven development involves creating tests before beginning to develop the application. This is done while analyzing the problem. Your unit tests should describe and test all the expected behavior of your code. If you feel the problem is too complex for a small number of unit tests, divide your problem into more sub-problems and write tests for each of those.

Sometimes there are too many possibilities to write tests for every outcome. In this case, write tests for the things that could go wrong.

⚠️ **GitHub.com Fallback** ⚠️