Install and configure for Genero Ghost Client

The Genero Ghost Client is embedded in the FGLGWS package. No additional installation is required, however configuration may be necessary.

Note: The Genero Ghost Client is also integrated with Genero Studio. See the Genero Studio User Guide for details.

The GGC is embedded in the FGLGWS package in the $FGLDIR/testing_utilities/ggc directory.

To use Genero Ghost Client API, you need a Java Development Kit (JDK). Make sure that your JDK version is at least version 1.7 or greater.

Configure for Genero BDL tests

At a command prompt, navigate to FGLDIR and execute the script to set the environment.

  • On Linux®/UNIX™/macOS™ execute envcomp.sh
  • On Windows®, execute envcomp.bat
Set the PATH environment to include the directory containing the required JVM library on your system.
  • On Linux/UNIX/macOS set the PATH to a directory containing libjvm.so:

    export PATH=/JDK_DIR/server:$PATH

  • On Windows, set the PATH to a directory containing JVM.DLL:

    set PATH=%PATH%;C:\Program Files\Java\jdk1.8.0_20\jre\bin\server

For more information, see How to set up Java in the Genero Business Development Language User Guide.
Set your CLASSPATH environment variable to the absolute path to the ggc.jar and fgl.jar files. This allows you to compile and run test scenarios from any directory on your disk.
  • On Linux/UNIX/macOS:

    export CLASSPATH=/FGLDIR/testing_utilities/ggc/ggc.jar:/FGLDIR/lib/fgl.jar

  • On Windows:

    set CLASSPATH=C:\FGLDIR\testing_utilities\ggc\ggc.jar;C:\FGLDIR\lib\fgl.jar

To check your configuration, run the demo testing application. See Demos.

Configure for Java tests

Set your PATH environment variable to include the Java Development Kit bin directory.
  • On Linux/UNIX/macOS:

    export PATH=/JDK_DIR/bin:$PATH

  • On Windows:

    set PATH=C:\JDK_DIR\bin;%PATH%

Set your CLASSPATH environment variable to the absolute path to the ggc.jar and fgl.jar files. This allows you to compile and run test scenarios from any directory on your disk.
  • On Linux/UNIX/macOS:

    export CLASSPATH=/FGLDIR/testing_utilities/ggc/ggc.jar:/FGLDIR/lib/fgl.jar

  • On Windows:

    set CLASSPATH=C:\FGLDIR\testing_utilities\ggc\ggc.jar;C:\FGLDIR\lib\fgl.jar

Once PATH and CLASSPATH are set, compile and run your scenarios as shown in these examples:
  • Compile: javac userWorkspace/path/to/generated/.*java
  • Run: java com.fourjs.ggc.Launcher -s userWorkspace.path.to.generated.UserClass -u http://application/url
An alternative to setting the CLASSPATH environment variable is to specify the absolute path to the ggc.jar file using the java -classpath (-cp ) option at runtime. Below are some examples.

On Linux/UNIX/macOS:

  • Compile: javac -cp /absolute/path/to/userWorkspace:/absolute/path/to/ggc.jar userWorkspace/path/to/generated/.*java
  • Run: java -cp /absolute/path/to/userWorkspace:/absolute/path/to/ggc.jar com.fourjs.ggc.Launcher -s userWorkspace.path.to.generated.UserClass -u http://application/url

On Windows:

  • Compile: javac -cp C:\absolute\path\to\userWorkspace;C:\absolute\path\to\ggc.jar userWorkspace\path\to\generated\.*java
  • Run: java -cp C:\absolute\path\to\userWorkspace;C:\absolute\path\to\ggc.jar com.fourjs.ggc.Launcher -s userWorkspace.path.to.generated.UserClass -u http://application/url

For more information on -classpath (-cp ) option, see the Java documentation.