TDD, I'm practicing development using unit test from 1 year now and frankly speaking I'm loving it. I listed some points/notes/importance I learned from TDD. You might like to add some points or want to correct me, so please comment.
Here the list goes:
Updates: Some TDD Quote.
Here the list goes:
- Caught 80% of bugs at first place before your code goes to production.
- Explore and forces to think the development and design in proper Object Oriented way, means less class dependencies, loose coupling's, SRP etc.
- You can fearlessly do refactoring and enhance the quality of existing code if you have enough unit test code surrounding.
- If you have been reported any bug/issue in production code, write the unit test that produce that bug and fail(red), then fix the code(refactor) and ultimately make the unit test to success( green).
- Gives idea about the usage of API you're developing.
Updates: Some TDD Quote.
Whenever you are tempted to type something in a print statement or a debugger expression, write it as a test. - Martin Fowler
Comments