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) or 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
ScenarioProvider 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). This configuration uses a direct connection to the Dynamic Virtual Machine (DVM). - a UA configuration (
UAConfig
class). This configuration 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 our example, it is a UA configuration as the application tested is running on the GAS.
- SessionManager
- The
SessionManager
interface manages the runtime and the testScenario
. In our example, there is more than one scenario, so theScenarioProvider
is created and populated with the scenarios. - GGC scenario program
- The scenario 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.
Java tests with Ghost Client
- a TCP configuration (
TCPConfig
class). This configuration uses a direct connection to the Dynamic Virtual Machine (DVM). - a UA configuration (
UAConfig
class). This configuration runs through the Genero Application Server (GAS) to the DVM.
ggcadmin tcp -w path/to/myapp -c "fglrun myapp" --scenario-provider 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 our example, 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 our example, there three scenarios. The--scenario-provider
option specifies that the scenario provider class (test_sample in the command example) is being used to run the test.