A software program is one of the great examples of the whole being greater than the sum of its parts. As a whole, the application potentially delivers a huge amount of value. Its component parts perform specific functions, which can be useful on their own but deliver more when combined. That said, it is clear that if any of the smaller parts of the application do not function as expected, the application as a whole is flawed or fails completely. This is where unit testing comes in
It helps you to detect bugs early in the development cycle
It helps you to write better programs
It syncs easily with other testing methods and tools
It will have many fewer bugs
It is easier to modify in future with very less consequence