Skip to content

Glossary: Java Beyond the Basics

Unit test

Also written: unit tests, test error

A small method that calls your code with known inputs and checks the answer automatically on every build. A failure means a wrong result; an error means an unexpected exception.

Where the book teaches it

Related terms

JUnitassertEqualsTest-driven development