The Genero Ghost Client framework
The Genero Ghost Client is a Java framework for building application tests.
GGC infrastructure overview
The GGC architecture is designed to test scenarios written in Genero Business Development Language (BDL) and Java. The underlying APIs define functionality that is independent of the implementation. It is made up of interfaces, classes, and tools that handle all of the low-level code of generating tests so that you can quickly build scenarios to test your applications.
Interface | Description |
---|---|
|
Instantiates and manages Scenario
instances according to incoming VM connections and new runtime launches. |
Scenario |
A Scenario is by default a function
call handler. It invokes front calls and its Play method handles the interface with
the client by providing the Client instance as a parameter. |
ScenarioProvider |
If there is more than one scenario, the
SessionProvider is created and populated with the scenarios. |
Client |
The Client interface provides all the
methods to interact with the DVM or get information on the current state or content of the
application.It includes methods for delays between actions, like |
For details of the Java packages and classes, see the javadoc distributed with the Genero Ghost Client in your FGLGWS installation. The javadoc is found in your $GGCDIR/doc/javadoc/ directory. See the help file by launching the $GGCDIR/doc/javadoc/index.html file in your browser.
BDL tests with Ghost Client
- a TCP configuration (
TCPConfig
class) that uses a direct connection to the Dynamic Virtual Machine (DVM) - a UA configuration (
UAConfig
class) that runs through the Genero Application Server (GAS) to the DVM
fglrun test_sample ua --url http://localhost:6394/ua/r/myapp
For examples
of running BDL tests, see How to run BDL tests.- UAConfig/TCPConfig
- The UAConfig/TCPconfig is the configuration created for the session. In this case it is a UA configuration as the application is tested running on the GAS.
- SessionManager
- The
SessionManager
interface manages the runtime and the testScenario
. In this example. there is more than one scenario, so theSessionProvider
is created and populated with the scenarios. - GGC scenario program
- The scenario you generated for the test (test_sample in our example)
includes all scenarios from the session. This program sends instructions to the BDL scenario server
as each scenario is tested. There are instructions to select the scenario such as:
These are passed in direct binding to the Java API to implement the interface.CALL ggc.selectScenario(0)
Java tests with Ghost Client
- a TCP configuration (
TCPConfig
class) that uses a direct connection to the Dynamic Virtual Machine (DVM) - a UA configuration (
UAConfig
class) that runs through the Genero Application Server (GAS) to the DVM
ggcadmin tcp -w path/to/myapp -c "fglrun myapp" --scenario myTests.test_sample
For
examples of running Java tests, see How to run Java tests.- UAConfig/TCPConfig
- The UAConfig/TCPconfig is the configuration created for the session. In this case it is a TCP configuration as the application is tested running in direct mode.
- SessionManager
- The
SessionManager
interface manages the runtime and the testScenario
. In this example. there is more than one scenario, so theSessionProvider
is created and populated with the scenarios.