QamoosTech
Testing & QualityBeginner

Unit Test

PronunciationYOO-nit TEST

Definition

A small automatic test that checks one piece of code, like a single function, in isolation.

Where you hear it

Code reviews, CI pipelines, and job interviews.

Examples

  • Please add a unit test for the discount function.
  • All 120 unit tests passed in 3 seconds.

Common mistake

Writing tests that depend on the network or database. A unit test should be fast and isolated.