How Ghost Client works

The Ghost Client is a Java framework that provides you with the API structure of interfaces, classes and methods for building application tests.

The Ghost Client infrastructure overview

The Ghost Client infrastructure consists of three components:

Launcher
The Launcher is the Ghost Client Java program which starts a testing session for an application.
SessionManager
The SessionManager is the interface that manages the runtime and the test Scenario.
Scenario
The Scenario is the interface that contains the sequence of tests run during a given session.

Ghost Client classes

The methods of these public classes are called in the SessionManager and Scenario classes you define for your test. The GhostRunner class, for example, is the entry point for test case scenarios.

Table 1. Ghost Client classes
Class Description
GhostRunner Provides methods to control a Genero application running in a Genero Application Server. It contains methods for a set of possible actions that an end-user might do on the running application, e.g. set focus on a field, set a value in a field, etc.
Log Implements the logging mechanism used to displays errors, warnings, and information as output from the tests.

Session

Exposes the application object to your BDL program so that it can be retrieved from the session.
Application Exposes the application user interface to your BDL program so that form objects such as field values can be retrieved and set.

The complete details of the packages that make up the Ghost Client and the classes and interfaces it uses can be found in the /doc directory of your GGC package. For more information please see the help file by launching the /doc/index.html file in your browser.

Developing tests with Ghost Client

When you write tests to be run by the Ghost Client, you need to implement its two main interfaces: the SessionManager and the Scenario. These classes function together to implement the GGC tests.
Table 2. Ghost Client interfaces
Class Description

SessionManager

Instantiates and manages Scenario instances according to incoming VM connections and new runtime launches.
Scenario A Scenario describes the action sequence played during the GhostRunner session to simulate user actions on a Genero application.
For more detailed information on developing tests with Ghost Client see Testing with Ghost Client.