
 
–  TestBed is the factory that creates a test case 
based on a configuration 
An important pattern developed for the test-bed 
is the Scheduler pattern. It provides three modes of 
task invocation: uninterruptible, timer driven, and 
counter driven. The uninterruptible mode simply lets 
a task run forever. The timer driven mode stops a 
task after a predefined time period. In both cases 
task invocations can be time sliced, either randomly 
or within a fixed time interval. The counter mode 
stops a task after a given number of invocations. 
Generally, the scheduler is used as is, and requires 
no additional programming. Distributed schedulers 
can coordinate their activities by joining a group. A 
distributed scheduler can also be used when no 
distribution is immediately required, providing the 
group it joins is unique. 
The Profile pattern defines a virtual user of an 
application. Profile is an abstract class that is closely 
tied to a driver and a test case. A Profile comprises 
the attributes and actions required to set up a test 
case. A test case can define any number of profiles. 
Each profile is assigned a thread to run on by the 
scheduler, and a driver by the TestBed. Different 
profiles may use different scheduling policy and 
drivers. However, this is more a matter of 
convenience when testing multiple applications in 
the same time, rather than a necessity when 
measuring the performance of a single application in 
a single end-to-end test case. 
The Driver pattern defines the standard interface 
to execute a task in our test-bed. Tasks require 
establishing the communication channel when 
simulating an external entity or user, or simply 
invoking a method for white or black box testing. 
For example, when testing the Email GW, after 
composing the email message with or without 
attachments in a profile, an SMTP channel is 
established, and the message is sent to an Email 
GW. A number of standard drivers and profiles have 
been implemented for application, database and 
J2EE bean testing. 
The Configurator pattern provides the methods 
to read in, and parse configuration files and scripts. 
These are text files with attribute value pairs, one 
pair per line. The same attribute can be 
nondestructively redefined multiple times, so that 
multiple profiles can be defined by reusing the same 
attribute name. Some test cases require a more 
complicated mechanism than just sending a 
message. Often, interaction with a sequence of 
actions is required between a virtual user and a 
service provider, such as browsing an album of 
messages. Also a man-to-machine dialogue can take 
place, where the dialogue is based on a grammar. 
For example, when leaving a message on the phone 
a hierarchy of menus that lead the user to a goal 
must be followed. In Voice GW we use VoiceXML 
(VoiceXML) to define the grammar. Rather than 
programming multiple profiles for such a use case, 
Configurator provides the methods to parse and 
prepare a dialogue script for execution. Test scripts, 
configuration files, and content files (e.g. message 
body, attachments) can be accessed from multiple 
locations in a network via a file server. 
The Logger pattern defines the methods to create 
standardized log files suitable for analyzing in a 
spreadsheet. When a test case executes, generated 
data can be saved to file or redirected to the console 
for online monitoring (see Section 3.3). 
These components were built on top of Visper, 
either by refining existing classes (e.g. Logger, 
Scheduler), or by adding new classes (e.g. 
Configurator, Driver, Profile). The reuse ratio was 
about 90% excluding the new classes such as Profile 
and Driver that are test-bed specific. In terms of 
programming work, drivers were the most 
demanding, due to their domain specific and case-
by-case nature, and the number of different 
protocols and systems employed by the 
infrastructure. However, most drivers are simple to 
write, as they can reuse existing code or call 
standard Java APIs such as JavaMail (JavaMail), or 
similar. This has, nevertheless, caused problems 
initially because multiple programmers had to code 
the same specific drivers, before a comprehensive 
database of drivers was established. 
3.3 Visper 
Visper is a novel object-oriented framework that 
identifies and enhances common services and 
programming primitives, and implements a generic 
set of classes applicable to multiple programming 
models in a distributed environment. It emphasizes 
separation of concerns in the design, and hierarchy 
of layers in the implementation. Component reuse 
facilitates easy customizability and adaptability to 
different environments and application needs. Visper 
also features grouping of distributed collaborating 
objects, and agent-based (Genesereth, Ketchpel, 
1994) distributed system management. 
Visper has been designed and implemented in 
Java, with a number of utilities that facilitate 
portability and visual program development. 
Pertinent to this task, it implements a container in 
which remote threads execute, collaborate and 
communicate with each other if necessary. A remote 
thread is the basic unit of computation controlled by 
the host container. Remote threads are autonomous 
computing elements that can be dynamically 
instantiated and can migrate from one machine onto 
another. The Loader class implements a class loader 
INTERNET, WIRELESS AND LEGACY INTEGRATION - Architectural Framework for Testing
217