The Essence of Unit Testing
Learn the core principles of unit testing and how to apply them using the NUnit framework. Understand the benefits of automated unit tests, how they run independently from the main program, and how to interpret test results to maintain reliable software.
Introduction
Unit testing is a process where pieces of software are tested to verify if each piece of the code performs as expected. One or more unit tests are run as part of unit testing.
The pieces of software that are tested may be at any level of detail, including individual functions, methods, classes, or modules.
Perhaps a more formal definition of unit testing is as follows:
In computer programming, unit testing is a software testing method by which individual units of source code—sets of one or more computer program modules together with associated control data, usage procedures, and operating procedures—are tested to determine whether they are fit for use.
– Kolawa A.Automated Defect Prevention: Best Practices in Software Management, IEEE Press, ...