Stub testing
A technique used in testing
modules, especially where
modules are written and tested in
a top-down fashion, where a few
lines of code are used to
substitute for subordinate
modules.
System testing
The bringing together for testing
purposes of all the programs that
a system comprises. Programs
are typically integrated in a top-
down, incremental fashion.
Integration testing
The process of bringing together
for testing purposes all of the
modules that a program
comprises. Modules are typically
integrated in a top-down,
incremental fashion.
Unit testing
Each module is tested alone in
an attempt to discover any errors
in its code.
Chapter 10 Systems Implementation and Operation 327
The first such technique is unit testing, sometimes called module or func-
tional testing. In unit testing, each module (roughly a section of code that per-
forms a single function) is tested alone in an attempt to discover any errors that
may exist in the module’s code. Yet, because modules coexist and work with
other modules in programs and systems, they must be tested together in larger
groups. Combining modules and testing them is called integration testing.
Integration testing is gradual. First you test the highest level, or coordinating
module, and only one of its subordinate modules. The process assumes a typi-
cal structure for a program, with one highest-level, or main, module and various
subordinate modules referenced from the main module. Each subordinate mod-
ule may have a set of modules subordinate to it, and so on, similar to an organi-
zation chart. Next, you continue testing subsequent modules at the same level
until all subordinate to the highest-level module have been successfully tested to-
gether. Once the program has been tested successfully with the high-level mod-
ule and all of its immediate subordinate modules, you add modules from the next
level one at a time. Again, you move forward only when tests are successfully
completed. If an error occurs, the process stops, the error is identified and cor-
rected, and the test is redone. The process repeats until the entire program—all
modules at all levels—is successfully integrated and tested with no errors.
System testing is a similar process, but instead of integrating modules into
programs for testing, you integrate programs into systems. System testing fol-
lows the same incremental logic that integration testing does. Under both inte-
gration and system testing, not only do individual modules and programs get
tested many times, so do the interfaces between modules and programs.
Current practice (as previously outlined) calls for a top-down approach to
writing and testing modules. Under a top-down approach, the coordinating
module is written first. Then the modules at the next level are written, followed
by the modules at the next level, and so on, until all of the modules in the sys-
tem are done. Each module is tested as it is written. Because top-level modules
contain many calls to subordinate modules, you may wonder how they can be
tested if the lower-level modules haven’t been written yet. The answer is stub
testing. Stubs are two or three lines of code written by a programmer to stand
in for the missing modules. During testing, the coordinating module calls the
stub instead of the subordinate module. The stub accepts control and then
returns it to the coordinating module.
System testing is more than simply expanded integration testing, where you are
testing the interfaces between programs in a system rather than testing the inter-
faces between modules in a program. System testing is also intended to demon-
strate whether a system meets its objectives. The system test is typically
conducted by information systems personnel led by the project team leader,
although it can also be conducted by users under the guidance of information sys-
tems personnel.
The Testing Process
Up to this point, we have talked about an overall test plan and seven different types
of tests for software applications. We haven’t said much about the process of test-
ing itself. Two important things to remember about testing information systems are:
1. The purpose of testing is confirming that the system satisfies
requirements.
2. Testing must be planned.
Testing is not haphazard. You must pay attention to many different aspects of a
system, such as response time, response to extreme data values, response to no
input, response to heavy volumes of input, and so on. You must test anything
(within resource constraints) that could go wrong or be wrong with a system.