Is Unit testing functional or nonfunctional?

Is Unit testing functional or nonfunctional?

Integration tests or functional tests for regression testing rely heavily on unit testing. Unit testing’s major goal is to validate small bits of code, specific functions/algorithms. Unit tests are typically designed by developers with the goal of being as simple as possible.

Unit testing is a type of functional testing for the following reasons:

  1. Early in the development cycle, fix bugs.
  2. A unit test can be used to test small functions and algorithms.
  3. API level unit testing is also possible.
  4. To assist with code reuse.