It's a very powerful approach to build robust software. In this repository, I write some example how to build it
- Write requirements of your functionality
- Write a test for the first requirement, this test will fail (red situation)
- Resolve the test is fail, now if the test work you are in green situation
- Run all tests you have written because it could be that your fix would have created a bug 4A. If you have red tests, you must resolve their and rerun all tests
- Repeat this sequence from step 2
-
Modular Design
Developers understand and learn the principles of modular design. The problems of a possible wrong architecture can be detected immediately in the first stages of development.
-
Easy Refactor/ Maintenance
By creating tests you can make fix changes without worrying about what impact it will have on other features, because once you have finished your change by launching all the tests you will immediately see if there are errors.
-
Code Documentation
Giving meaningful names to the methods you will immediately understand the purpose of the test, moreover in the tests there will usually be code used also in the production phase.
-
Collaboration
You can work on parts of the code not written by you because from the tests you begin to understand what a certain method is doing.