Next: Iterators
Up: Hardware Techniques for Testing
Previous: Hardware Techniques for Testing
For more than 25 years there have been proposals for
component-based approaches to software development [5].
However, only recently have off-the-shelf components
become available commercially.
Currently, software components in the form of C++ class libraries
are available from hardware manufacturers such as IBM,
and software development companies including Microsoft,
Unix Systems Laboratories, and Rogue Wave Software.
From the tester's point of view,
these libraries can be divided into two broad groups:
-
Graphical User Interface (GUI) classes provide window and menu
creation and manipulation, and keyboard and mouse event handling.
GUI classes interact heavily with the environment through
the keyboard, mouse, and screen.
-
Collection classes provide object-oriented abstract data types:
sets, lists, queues, trees, etc.
With these classes, interaction is entirely through function calls and
return values.
With object-oriented methods, productivity and reliability
can be vastly improved, primarily through reuse.
Because reliability depends on testing, this improvement cannot be realized
without effective class testing.
Our research focuses on the automated testing of collection classes
[2,3].
There are two main requirements for class test suites:
-
Effective.
The tests must be likely to reveal faults if present.
Generally, it is far more difficult to quantify test effectiveness
for software than for hardware.
As a minimal requirement, we generate tests that achieve 100%
statement coverage of the code under test.
-
Affordable.
The test suite development and maintenance costs must be reasonable.
As a rule of thumb, we seek test suites that cost significantly less
to develop and maintain than the code under test.
The tests for class C must be repeated many times:
for the initial version of C, after each modification to C, and
when C is used in a new environment, such as a new operating system
or compiler.
This requirement for repeatability suggests that
test execution should be automated.
However, unlike hardware tests,
a software test suite will probably not be run thousands of times.
Thus, test execution time (``socket time'') is less important in software testing than in hardware testing.
To date there has been very little work in university or industry
on class testing.
This gap jeopardizes the future of object-oriented software engineering.
Next: Iterators
Up: Hardware Techniques for Testing
Previous: Hardware Techniques for Testing
Peter Walsh
Thu Jan 18 14:37:02 PST 1996