O'Reilly logo

Software Testing, 4th Edition by Paul C. Jorgensen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

II UNIT TESTING

The term “unit” needs explanation. There are several interpretations about exactly what constitutes a unit. In a procedural programming language, a unit can be

  • A single procedure

  • A function

  • A body of code that implements a single function

  • Source code that fits on one page

  • A body of code that represents work done in 4 to 40 hours (as in a work breakdown structure)

  • The smallest body of code that can be compiled and executed by itself

In an object-oriented programming language, there is general agreement that a class is a unit. However, methods of a class might be limited by any of the “definitions” of a unit for procedural code.

The bottom line is that “unit” is probably best defined by organizations implementing code. In my telephony ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required