Unit Test

A Unit Test is a software testing technique that involves testing individual components or units of a program in isolation to ensure they function as intended. A “unit” is typically the smallest piece of code that can be logically separated, such as a function, method, or class.

Key Features:

Scope:

  • Tests a single, isolated unit of code without dependencies on external systems like databases or APIs.
  • Focuses on specific functionality rather than the overall behaviour of the software.

Automation:

  • Unit tests are commonly automated to allow quick and repetitive execution during development.

Granularity:

  • Provides the most detailed level of testing, validating the smallest building blocks of the application.