Launcher reference

The Launcher class is the entry point to run a scenario written by hand in Java.

The complete details of the packages and classes that make up the Genero Ghost Client can be found in the /doc directory of your GGC package. Please see the help file by launching the /doc/index.html file in your browser.

Syntax

java com.fourjs.ggc.Launcher [options]
Table 1. Launcher options
Option Description

--url url
-u url

Specify the URL to use to test your application, see Launch tests to different front-ends.

--manager session-manager-classname
-s session-manager-classname

Specify the fully package-qualified java SessionManager to use.
Important: This option is mandatory.

--command command
-cd command

Specify a test from a stand-alone DVM, using the direct connection mode.
Note: Not used with the URL -u option ), see Launch tests with direct connection

--command-wd workingDir
-cwd workingDir

Specify the directory from where to launch the application being tested.

--thread_number number
-t number

Specify the number of thread instances to launch to simulate the number of users using an application.

--thread_delay delay
-td delay

Specify the delay (in seconds or milliseconds) between the launch of Ghost Client sessions when running multiple thread instances. The default unit is seconds; append "ms" for milliseconds.

--no_x509_check
-x

Prevent the server X.509 certificates checking.

--help
-h

Print the usage and exit.

--version
-v

Print the version and exit.

See also Display version number.

Launch tests with direct connection

Run the integrity tests in direct connection mode.

In the syntax of the following command line example it is assumed that the GGC package was unzipped in the same directory where you are running the Launcher, and that your environment is configured to run Java and the GGC, see Install and configure for Genero Ghost Client.

For example, to run the integrity tests for the demo application from a stand-alone DVM, using the direct connection mode, you run this command:

cd FGLDIR\demo ; java com.fourjs.ggc.Launcher  -s com.fourjs.ggc.testcases.IntegrityTestsSessionManager --command "fglrun demo"

In this example a URL is not used to launch the application. Therefore instead of the -u option, the Launcher is run with just the -s option and the path to the session manager.

The --command option is added to invoke the DVM to launch the application for testing.
Note:
  • We first change to the directory where the application is located.
  • The DVM command to launch the application needs to be passed in double quotes (for example, " fglrun demo").

Launch tests to different front-ends

Run tests behaving as different front-ends.

In the syntax of the following command line example it is assumed that the GGC package was unzipped in the same directory where you are running the Launcher, and that your environment is configured to run Java and the GGC, see Install and configure for Genero Ghost Client.

Depending on how you want to test, run the command option in example 1 to run your application tests against different front-end clients, or run the command option in example 2 to test all clients at once:
  1. java com.fourjs.ggc.Launcher -u http://localhost:6394/ua/r/myapp -s path.to.mySessionManager.mySessionManager

    The Launcher is the entry point of the Genero Ghost Client Java program which starts a testing session for an application. This command is run by launching Java to run the Launcher class followed by the -u option and the URL of your application. The -s option is used followed by the path to the session manager.
    Tip: Depending on the user agent protocol you provide in the URL, you can specify what front-end the test is to be run as:
    • /ua/r/; for version 3 clients: Genero Web Client for JavaScript (GWC-JS), GDC 3.00, GMA, or GMI - UAProxy.
    • /ja/r/; for Genero Desktop Client (GDC 2.50) - GDCProxy.
    • /wa/r/; for Genero Web Client for HTML5 (GWC-HTML5) - HTML5Proxy.
  2. java com.fourjs.ggc.Launcher -u http://<host>:<port>/gas/ua/r/<group>/<myapp> -s path.to.mySessionManager.mySessionManager  --all_mode

    This example is basically the same instruction but with the addition of the --all_mode option at the end to specify that the test is to be run for all clients.
    Note: The front-end you specify in the URL (ua/) will be the first one to be run.