background image
<< White Box testing | Acceptance Testing >>

Unit, Integration and System testing

<< White Box testing | Acceptance Testing >>
Unit, Integration and System testing
The first type of testing that can be conducted in any development phase is
unit testing.
In this, discrete components of the final product are tested independently before being assembled
into larger units. Units are typically tested through the use of `test harnesses' which simulate the
context into which the unit will be integrated. The test harness provides a number of known
inputs and measures the outputs of the unit under test, which are then compared with expected
values to determine if any issues exist.
In
integration testing smaller units are integrated into larger units and larger units into the
overall system. This differs from unit testing in that units are no longer tested independently but in
groups, the focus shifting from the individual units to the interaction between them.
At this point "stubs" and "drivers" take over from test harnesses.
A stub is a simulation of a particular sub-unit which can be used to simulate that unit in a larger
assembly. For example if units A, B and C constitute the major parts of unit D then the overall
assembly could be tested by assembling units A and B and a simulation of C, if C were not
complete. Similarly if unit D itself was not complete it could be represented by a "driver" or a
simulation of the super-unit.
As successive areas of functionality are completed they can be evaluated and integrated into the
overall project. Without integration testing you are limited to testing a completely assembled
product or system which is inefficient and error prone. Much better to test the building blocks as
you go and build your project from the ground up in a series of controlled steps.
System testing represents the overall test on an assembled software product. Systems testing
is particularly important because it is only at this stage that the full complexity of the product is
present. The focus in systems testing is typically to ensure that the product responds correctly to
all possible input conditions and (importantly) the product handles exceptions in a controlled and
acceptable fashion. System testing is often the most formal stage of testing and more structured.
The SIT or Test Team
In large organisations it is common to find a "SIT" or independent test team. SIT usually stands for
"Systems Integration Testing" or "Systems Implementation Testing" or possibly "Save It, Testing!"
And is the role of this team unit, system testing or integration testing?
Well, nobody really knows. The role of the SIT team usually is not unit, integration nor system
testing but a combination of all three. They are expected to get involved in unit testing with
developers, to carry through the integration of units into larger components and then to provide
end-to-end testing of the systems.
13
Figure 5: Integration Testing
Unit D (complete)
Unit C
Not
complete
STUB
Unit B
Complete
Unit A
Complete
Unit D (incomplete)
DRIVER
Unit A
Complete
Unit B
Complete
Unit C
Complete