TOOTSIE: A High-end OO Development Environment

Robert V. Binder

System Requirements

What would ideal automated testing for object-oriented development look like? The answer can't be too much different than an environment I recently developed to support testing of a large client/server application, which I'll call BigFoot. Tootsie (Total Object-Oriented Testing Support Environment) provided comprehensive test automation for BigFoot development.

BigFoot is a multi-platform client/server system implemented in C++. Clients use Microsoft Foundation Classes for Windows 95 and Windows NT. Server objects wrap a relational DBMS running on multiple Sun/Solaris servers. An ORB provides client/server communication using a distributed object model. BigFoot processing modes include high volume batch, real-time external links, and GUI-based interactive sessions. The system must provide 7x365 availability. Any incorrect output could have very serious and costly consequences.

The investment in test automation was motivated by short development cycles as well as the necessarily high reliability. BigFoot customers frequently produced totally new requirements on very short notice for rapid delivery. To obtain a repeatable reduction in development cycle time, BigFoot relied on systematic reuse and an architecture designed for extendibility . To insure high reliability and contribute to rapid development, the testing strategy had provide both high-volume regression testing and stringent component testing in compressed time cycles. Testing had to be both highly automated and highly effective. There were three main design goals for Tootsie.

(1) Effective user interface/ high usability. The target environment consisted of many technological islands. An effective test tool suite should present consistent mechanism for test documentation and execution, regardless of the technology of the implementation under test. Access to all test capabilities should be only a few "clicks" away from code editing, in any platform. We wanted Tootsie's users to:

(2) Automate test generation. Hand-coding of drivers and stubs to for comprehensive and repeatable testing can easily double programming and maintenance effort. Some aspects of test design are very challenging, others are mechanical enough to be automated. Thus automated generation of test drivers, test cases, and stubs which would allow subsequent manual editing was needed. Tootsie would:

(3) Automate test setup and execution. Effective testing cannot be done without a repeatable and controllable test suite. Repeatable testing is especially important with object-oriented development since adequate testing under most forms of reuse requires rerunning tests of reused components. It can be difficult to set and determine the state of a system of objects, so automated test setup is necessary part of repeatable testing. Tootsie's test setup and execution would:

Tootsie meet all of these requirements.

OOA/D for Capability-driven Testing

Tootsie supports specification-based testing. In large part, Tootsie's extensive test automation was possible because a complete object model containing over 300 problem domain classes had been developed for BigFoot. This allowed development of specification-based test suites in parallel with iterative class development. It turns out that iterative development actually mitigates a long-standing obstacle to specification-based testing: stale specifications. If an implementation has been refined without updating its specification, the specification is of little to no use for testing. The tester must interpolate changes to reverse-engineer a testable specification from the implementation.

The stale specification problem is addressed in two ways when an OOA/D repository is the primary source for test suites in interactive/incremental development. First, iterative changes tend to be small and therefore easier to record. Second, when tests can be automatically generated, there is a strong motivation to keep the specification current, since this reduces the developer's test design and test coding work. Automatic test generation, a viable repository, and iterative specification-based development produce a sustainable synergy which leads to higher quality systems.

Tootsie supports the FREE testing methodology. FREE is specification-based and requires that cartoon-level Object Modeling Technique models be upgraded to test-ready content. For BigFoot, this upgrade consisted of:

Without these extensions, the typical OMT specification is an untestable cartoon. The information is useful for human interpretation but cannot support automated test case generation.

Test Control Strategy and Implementation

A primary design goal for Tootsie was to use off-the-shelf software tools. A very high degree of test automation is possible when off-the-shelf tools are augmented with a systematic approach to built-in test (parallel driver hierarchies, assertions, set/reset/register in every class, etc.) However, as most of the application system had been developed, it would have been impractical to retro-fit extensive built-in test capabilities. Thus we concentrated on tool-based based testing.

A test plan for a system release is made up of many test runs. A test run may include many test cases; a test case may be used in many test runs. A test case has three main phases: setup, execute, and evaluate. The mechanics of these steps is significantly different depending on the implementation and kind of test. Even the simplest testing scenario involves using at least four testing tools, possibly running on different platforms. Without a common interface, the developer would have to learn to use ten completely different and idiosyncratic tool interfaces, ranging from command line cryptic to GUI obstructive. Tootsie was designed to present the same interface regardless of the test focus (class/cluster, subsystem, or application.) This was accomplished by using a multiplatform tool which could run any kind of test (Segue's QA/Planner and QA/Partner.) At the leaf level of a test plan, the appropriate test tool and implementation under test was designated. This provided a powerful yet straightforward interface to both large test plans (10000s of test cases) and the large collection of tools in Tootsie.

Table 1 lists the tools that comprised Tootsie. Readers should bear in mind that the tools used in Tootsie were selected to support the specific constraints and requirements of BigFoot.

Slot Tool
Line Item Requirements DOORS
Extended Use Cases DOORS and DXL
Object Models Paradigm Plus
Test Case Generation T/StP
Unit Test Driver Generation Cantata
Code Coverage Cantata
Regression Test Support Discover
Test Suite Management QA Organizer
GUI and Console Test Driver QA Partner
Exception Test Simulation QC/Sim
Configuration Management ClearCase
Problem Tracking and Process Metrics QA Plan/Track (Direct Technology)
Database Loader/Unloader Custom Perl script and Sybase SQL
Database Comparator Customer Perl script and Sybase SQL

They're not necessarily the right choice for other applications. The challenge in developing Tootsie was in not so much in selecting the tools, but in providing bridges among these islands and the application islands. In a few cases, interfaces were available from the tool suppliers. For the majority we had to develop interfaces, which typically consisted of ASCII files and Perl scripts (not very exotic, but highly effective and portable.)

Some Testing Scenarios

Testing is not a monolithic activity. Testing work depends on the scope and technology of the implementation under test. For example, initial unit test of a server cluster with no user interface needs a driver which can simulate messages sent to the server and simulate (or control) DBMS wrapped by the cluster under test. This is very much different from what is needed for a unit test of Windows 95 GUI implemented with a DLL, and from selection of a regression test suite at the system scope includes batch, GUI, and performance testing. In all, there were two dozen testing scenarios for BigFoot. The scenarios differed by platform, client tests, server tests, batch process tests, various scopes of integration sequences, and regression testing. Tootsie's components were configured to support all possible testing scenarios for BigFoot.

For example, scenario for unit test of a server class/cluster with Tootsie is comprised of the following steps (each is actually an activation of a separate test tool.) Each step is activated under the control of the QA/Partner.

  1. Extract the test parameters for the class from the OOA/D repository.
  2. Automatically generate the raw test case values.
  3. Generate a test harness (a driver, an object of the class under test, and a code section to instantiate a message for each test case) for the class.
  4. Include base class test drivers as appropriate.
  5. Generate a controllable stub library for untested objects used by the class under test.
  6. Instrument the class under test.
  7. Build a test package using the driver, instrumented class, and stub library.
  8. Run the database loader.
  9. Run the test package
  10. Run the database unloader
  11. Run the database comparator.

The output produced by this scenario includes recording of the test case results in the QA/Partner test script, the coverage report, the stub trace report (if any), the exception log, and the database comparator output. Tootsie provided a consistent interface and control mechanism for developers regardless of the scenario and scope of the test.

Tootsie supports a full life cycle test process using the FREE test design methodology. It is constructed from off-the-shelf testing tools and simple utility programs. Although this approach seemed straightforward to us, none of Tootsie's tool vendors could point to other organizations using the same extent of test automation. This correspondent would appreciate hearing from any readers who have developed similar testing systems -- drop me a note at rbinder@rbsc.com.

References

[1] Robert V. Binder, "State-based Testing," Object, v 5, n 6, July-August 1995.

[2] Robert V. Binder, "State-based Testing: Sneak paths and Conditional Transitions," Object, v 5, n 6, July-August 1995.

[3] Robert V. Binder, "Use-cases, Threads, and Relations: The FREE Approach to System Testing," Object, v 6, n 2, February 1996.

[4] Robert V. Binder, The FREE Approach to Object-Oriented Testing.

 


Home | Contact | Copyright | Site Map
First Release: 1 December 1995. Last Rev: 15 October 2001