Skip to content

Unit test

A focused check of a small, defined part of software, such as a rule or function.

Software Development

Check a small unit deliberately

A unit test examines a small, defined part of software. This can be a rule, function or closely related group. The team should clarify what it treats as a unit and which dependencies the test includes or replaces.

In a fictional example, a rule checks whether a justification is filled in. The test expects rejection for empty input and acceptance for suitable completed input. This checks that rule’s behaviour, not the whole approval workflow. Whether interface, permissions and storage work together correctly needs further suitable checks. Meaningful expected results matter more than a bare count of unit tests.

Sources

Articles on this topic

Software Development with ASES

Custom software, web and mobile apps