4. Unit testing deep dive and benefits - lilbond/testable-code GitHub Wiki
-
Working with smallest testable part of software
-
Isolate each unit of the system to identify, analyze and fix the defects.
-
Benefits of Unit Testing
- Increases confidence in changing/maintaining code
- Codes are more reusable as Unit testing requires code to be modular.
- Development is faster and bugs are found early on in the development cycle.
- Cost of fixing a bug at the time of writing a unit test is much less as compared to fixing it if the code is in production
- Debugging is easy as when a test fails, only the latest changes need to be debugged.
- Code is more reliable.