Motivation for unit tests
by, 05-21-2011 at 11:53 PM (2255 Views)
Unit tests are essential part of software development especially. In complex and large softwares, introducing new changes in very tricky as it can break some other part. If you have clearly defined test cases, then you can check the working of newly introduced change and make sure it works as expected.
Unit tests are small snippets of code that are written to check a particular method or class. With unit tests in place, when a change is made to the code we can simply run all the tests to ensure that nothing has been broken.
Unit testing is used for test-driven development which involves writing unit tests first, with the actual code coming after. This is the standard approach which is often ignored.