A test performed on a small unit, such as a function or class.
A test that verifies behavior at the smallest unit -- an individual function, method, or class. It's ideally run independently of other parts. Slow, unreliable dependencies like a database, filesystem, or external API are normally replaced with mocks or stubs, which is what lets a suite of hundreds or thousands of unit tests run in seconds rather than minutes.
© 2026 ITBGM