Introduction

Contrary to previous wisdom in the testing field, unit testing is a process that developers must complete. It is the developer's responsibility to prove that the software does what it is supposed to do and that there are no missing features. The purpose of unit testing is to: (6)

  • Verify that the logic works

  • Verify that all of the necessary logic is present

Hetzel published the following definition of unit testing.

Testing individual units of logic as they are coded. What we are concerned with is testing logical pieces or units of work that arise naturally. These may be functions, subroutines, or just logically distinct parts of individual programs. (6)

Unit testing is also known as testing in the small, program testing, module testing ...

Get Just Enough Software Test Automation now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.