HBO-i Logo
Unit test

Unit test

Default set

Why

Find certain types of bugs as early as possible and ensure your code keeps running after a change.

How

Define one or more tests for each ‘atomic part’ of the code (e.g. a method or function). The unit should be tested in isolation.

Practice

Many companies use unit tests as part of their continuous integration environment. With every build, all unit tests are run to get an overview of the quality of the software and possible bugs. Some companies define the unit tests first and then create the code, leading to successful unit tests (Test-Driven Development).

Ingredients

Phases

Trade-offs

InspirationData
ExpertiseFit
OverviewCertainty

Read more about the trade-offs: Inspiration or Data / Expertise or Fit / Overview or Certainty.