DBMS

Final Exam C/S-Test 2.0

By Sanjiv Purba
DBMS, December 1996 C/S-Test automates software testing cycles in three-tier client/server applications and increases software quality throughout the application development process.

Many development projects delay the testing process for as long as possible in the development lifecycle, sometimes until the final activities prior to application deployment. The many types of testing activities include unit testing, system testing, and regression testing. All of these activities share the objective of producing a high-quality application that satisfies user requirements. Delaying testing activities until the end of the project is risky, and in many situations, it can cause projects to fail, go over budget, and miss their deadlines. Incorporating the testing activities into all development phases is becoming a preferred method for reducing project risk and enabling projects to succeed.

Final Exam C/S-Test provides an opportunity to automate the testing process and build a standard testing framework for all phases of the application development cycle. Final Exam C/S-Test supports automated testing of three-tier client/server applications in heterogeneous environments. The tool lets users build custom test scripts, test client platforms across a TCP/IP network, simulate various loads, and examine application code.

The tool offers an intuitive Windows-based interface with pulldown menus, command buttons, and extensive help facilities. A File menu option allows manipulation of test script files. A Record menu option enables the record process that captures keystrokes to be started and stopped. A Replay menu option gives users sophisticated control over the replay process, including step control, evaluation control, and view manipulation. An Option menu option enables global and script defaults to be manipulated, and a Network menu option allows testing in a distributed environment.

The testing tool is accompanied by both an online and a printed tutorial to support a quick start. Product specialists are also available by phone to talk new users through the tool.

Basic Process

To use Final Exam C/S-Test, begin by activating a session record feature from the pulldown menu to record the keystrokes entered by a user while interactively testing an application. All of these steps generate object-oriented Time Management Language (TML) code that is saved in the default window in an open Final Exam C/S-Test instance. The generated TML code consists of object-oriented functions, messages, and classes. The generated code is saved into a script file in the operating system; it can be modified at any time. The test script can be replayed at a later time using another pulldown option from the Final Exam main window. Replaying a script sends data to the application under test (AUT), as if the user had entered the data interactively. The Replay process can be executed in interactive or batch mode. The Record function can also be used to capture data during a record session into flat files that can later be used as input data.

Test script default values can be modified prior to replaying a script. A series of scripts can be recorded and archived to support an integrated testing strategy. Figure 1 shows a script that is generated when the Microsoft Notepad application is used while a record session is active.

Final Exam C/S-Test lets users compare expected results to actual results. The session record feature or a capture utility defines the expected results, which can be compared to actual results using the following verification methods supported by the product:

The tool provides extensive opportunities to set options for Record, Replay, Capture, Area of Interest (AOI) GUI, and View facilities. Figure 2 shows the options that can be modified with respect to the Record function.

During testing, users will, of course, encounter application problems. These problems can be handled asynchronously. The Exception handling function traps exceptions such as General Protection Faults (GPF) and division by zero. A report of problems encountered during testing is produced.

Some degree of abstraction exists in the test scripts, which can support some application-level changes without requiring a change to the script. In some cases, scripts can be modified with minor changes to support application-level changes. One example is manually changing the name of a data field or output file.

Test Management Language (TML)

The Test Management Language (TML) is used to build testing scripts and is the basis of the testing tool. This language --which is similar to the C programming language -- can be compiled or interpreted. The learning curve with TML is not necessarily as steep as with C, because TML is generated by the tool. Customization or enhancements to the test scripts will require training or self-learning.

TML programs can be nested, and one TML program can consist of many modules. A TML script consists of a combination of statements and declarations, as shown in the following simple program:

is // TML: Testing Sample
message = "Test Started"
print "!!!!!" message "!!!!!"
//
// testing statements
//
message = "Test Ended"
print "-----" message "-----"

Like the C programming language, TML supports sophisticated storage classes, including constants, datatypes, global variables, and arrays. It also supports C-like arithmetic, operator precedence, Boolean operations, string operations, and increment operations. Extensive programming constructs are supported by TML. Repeat logic commands include "do," "for," and "while." Conditional constructs and related commands include "if," "continue," "break," "exit," and "return."

TML is packaged with a rich set of functions similar to those contained in the standard C library. TML also supports extended functions such as RemoteCallerName and SendMessageToTML that are specific to the testing tool. GUI functions correspond to controls such as Windows, Child window controls, Buttons, Edit boxes, Menus, List boxes, Combo list boxes, Scroll bars, and Scroll bar controls. The verification functions are Compare, CompareFile, GetText, GUICompare, WaitCompare, and WaitGUICompare. TML also supports user-defined functions and passed arguments.

User Access Routines (UAR) support calls to third-party code from within a TML script without the need to relink. UAR enables functions to be written in any language, and it permits testing of elements, modules, hardware device interaction, database access, and data structures. UAR routines are executed as a call to an .exe file created by UAR Builder. They also accept arguments and return values to TML variables.

Testing Distributed Applications

Distributed testing is supported through the C/S-Test Net Server and the C/S-Test Monitor modules. TML provides functionality, such as timers, message synchronization, and remote execution, to test applications distributed in an n-tier model. TML functions let clients communicate directly with other clients, without interacting with the Server platform.

The basic approach for distributed testing is to select a platform to act as the testing server, and then to identify clients through IP addresses. TCP/IP and winsock.dll are required by C/S-Test Net Server. Test scripts are executed on every remote client platform involved in the test through a TML command.

Testing in the distributed environment can involve simulating different numbers of users and various loads. It is also possible to test database concurrency, deadlock situations, and live-lock situations. Communication between client platforms can be synchronous and asynchronous. Generated reports can be used to analyze the results of tests, which can be scheduled during non-peak times.

Final Exam Memory Advisor

The Final Exam Memory Advisor tool lets development teams locate memory errors at runtime, including latent memory problems such as allocation of memory that is not used or never freed. This tool supports C and C++ programs and runs on SunOS 4.1.3, Solaris 2.x, HP-UX 9.x, IBM AIX 3.2.5/4.1, DEC UNIX (OSF/1) AXP 3.x, SG/IRIX 5.2/5.3, and DG/UX 5.4.

Final Exam Test Advisor

The Final Exam Test Advisor assesses the completeness and coverage of the application testing process. This tool maps tests with the application code to identify functions that are not invoked, conditions that are not tested, and other areas of the programs that are not visited. This tool supports both C and C++ programs under SunOS 4.1.3 and Solaris 2.x.

Add-Ons

Several add-ons extend the capabilities of Final Exam C/S-Test. The Final Exam Internet Test and Final Exam Internet Load Test support testing of Web applications through objects such as HTML tables and hyperlinks. C/S-Test for PowerBuilder supports object-oriented record, capture, replay, and comparisons of "expected" vs. "actual" results. These procedures are performed from within the PowerBuilder DataWindow Control dialog.

According to Hal Shields, product specialist for Final Exam products, the tool suite will be expanded through email enablement, built-in defect tracking, integration with monitoring and system management tools, and support for a Unix environment.

Passes the Test

A comprehensive automated testing tool should be used throughout a project's lifecycle to build quality into a product, reduce its overall development time, and reduce surprises in the project plan's final phase. The Final Exam C/S-Test product is a good choice for organizations building n-tier distributed client/server applications. The TML development language provides a comprehensive set of functions to execute test scripts in these environments. The current functionality and direction of this product makes it a strong entry in the test tool marketplace.


Figure 1.


--A script that is generated when the Microsoft Notepad application is used while a record session is active.


Figure 2.


--This figure shows the options that can be modified with respect to the Record function.


Sanjiv Purba is a manager and a senior architect with the Deloitte & Touche Consulting Group. He is also the author of several IT books published by John Wiley and Sons. You can reach Sanjiv at 416-601-6621 or email him at spurba@dttus.com.
Subscribe to DBMS and Internet Systems -- It's free for qualified readers in the United States
December 1996 Table of Contents | Other Contents | Article Index | Search | Site Index | Home

DBMS and Internet Systems (http://www.dbmsmag.com)
Copyright © 1996 Miller Freeman, Inc. ALL RIGHTS RESERVED
Redistribution without permission is prohibited.
Please send questions or comments to dbms@mfi.com
Updated Monday, November 18, 1996