Unit testing is a type of software testing that focuses on individual units or components of a software system. The goal of unit testing is to validate that each unit or component of the system meets its specified requirements and behaves as expected.
A unit test is typically written by a developer as part of the development process and is executed automatically as part of a build or continuous integration process.
What makes a unit test good:
Isolation: A good unit test should test only a single unit of code and not its dependencies. This makes the test more reliable and less prone to false positive results.
Fast execution: Unit tests should be fast, so that developers can run them frequently and get feedback quickly.
Repeatability: Unit tests should be repeatable and produce the same results every time they are run.
Independence: Unit tests should not depend on the results of other tests. This makes it possible to run individual tests and receive meaningful results.
Thoroughness: A good unit test should thoroughly test the unit of code it is designed to test, including its normal behavior as well as edge cases and error conditions.
Readability: Unit tests should be easy to read and understand, so that developers can quickly identify any problems and understand how the code is intended to behave.
Maintenance: Unit tests should be maintainable, so that they can be updated as the code evolves over time. This helps to ensure that the tests continue to accurately reflect the behavior of the code.
Status:: #wiki/notes/mature
Plantations:: Software Testing - 20230221103934
References:: ILOG