Test Automation Glossary

unit tests

noun.

Low-level automated tests that exercise individual units of source code directly, written in the same language as production code. Ideally, unit tests exercise one portion of the code with few dependancies so that when a unit test fails a specific part of the code is identified as defective.

In object-oriented languages, units are typically objects. In other languages a unit can be an entire module or individual procedures or functions.

Unit tests are often the first type of test written in the Test Pyramid. Compared to other types of tests they tend to execute quickly, in many languages in milliseconds rather than in minutes or hours for each test.