Unit Testing in a Nutshell
Summarize your knowledge of unit testing.
Introduction
This lesson summarizes the key concepts covered in the course lessons. It covers essential unit testing principles together with NUnit concepts. This approach means that lessons taught in this course are transferable to any other unit testing framework.
Fundamentals of unit testing
Software testing means verifying that software does what it is intended to do. The benefits of testing include preventing bugs, reducing development costs, and improving performance. Software tests are built by writing individual test cases. A test case is a set of operations that a system is set to perform to determine whether the system satisfies requirements and whether it functions correctly.
Manual testing is software testing where a person manually performs test cases without using any automation tools. The person who performs manual tests is known as a tester and can be the developer or another member of the team, such as a dedicated tester. Manual testing has a few short-term benefits. One of manual testing’s biggest challenges is the effort required to stem software regression. Software regression is the term used to describe a scenario where, due to the introduction of a bug, a feature that is working in a given release stops working in the next release. These bugs happen due to changes in the existing code and typically occur without the knowledge of the developer of the portion of the code where the bug surfaces.
Automated testing solves some key problems that manual testing cannot. While manual testing only includes the application code, automated testing includes the application code and the test code. Automated testing can consist of end-to-end, integration, and unit testing. Unit testing is where pieces of software are tested with the purpose of validating that each component of the software code performs as expected. One or more unit tests are run as part of unit testing. The benefits of unit testing over end-to-end and integration testing are that units may be tested independently of other code and also be configured such that they are ...