Skip to content
Bugwise
Menu

Unit testing

Also called: Component testing

Testing the smallest pieces of code, like a single function, usually by developers.

Definition

Unit testing checks individual units of code, such as a function or class, in isolation. It is the first test level, almost always automated and written by developers. Fast unit tests catch many bugs before testers ever see the build.

In practice

A developer writes an automated test checking that the function calculateTotal() returns 25.00 for two items priced 10.00 and 15.00.

Learn it in context

Lessons that use this term.

Related terms

Esc

Type to search the whole site.