Professional Documents
Culture Documents
Chapter 19
Unit testing
Unit testing focuses on the inputs/outputs of a
unit.
Specifically, do we get the outputs we expect from
a unit for a given set of inputs.
Testers will also look at trying to fool the unit
by trying obtuse combinations of inputs.
Also, the tester will make sure that the unit
handles errors (erroneous inputs) the way it is
supposed to!
Subsystem testing
Subsystem testing almost always requires
instrumentation, such as a harness, to supply
inputs and intercept outputs.
Subsystem testing on process control systems can
be somewhat difficult: calls to mechanical control
subsystems must be intercepted to prevent damage
(or catastrophe). How do we test reactor control
software without activating a reactor?
Sequences of inputs to
subsystems
Often, inputs must be sequenced to achieve a desired
state. When testing an array object that can
dynamically expand its capacity, testers must force the
capacity expansion to test it. This requires a series of
inputs to be transacted before the actual test begins.
It is not unusual for defects (bugs) to manifest
themselves only after a particular set of inputs has been
supplied to the system/subsystem/unit. It is important
to document what happened to the system before the
failure!
System testing
System testing can often be thought of in
the same manner of unit testing, with the
system as a single unit.
System testing is sensitive to the same
issues that unit testing are: input sequences
and irreversible actions.