ggcadmin

The ggcadmin tool runs Java scenarios in either TCP direct or UA mode through the GAS. It also provides commands to start and stop the BDL scenario server.

Syntax

ggcadmin { -V | -h | command [options] }
  1. command is one of the commands as described in ggcadmin commands.
  2. options are described in Options.

ggcadmin commands

The ggcadmin tool supports four commands:
  • ggcadmin tcp [options]
    The tcp command launches the Java scenario in direct TCP mode. Options are described in Table 2.
  • ggcadmin ua [options] 
    The ua command launches the Java scenario in UA mode. Options are described in Table 3 .
  • ggcadmin startbdlserver [options]
    The startbdlserver command starts the BDL scenario server. Options are described in Table 4.
  • ggcadmin stopbdlserver [options] 
    The stopbdlserver command stops the BDL scenario server. Options are described in Table 5.

Options

Table 1. ggcadmin version and help options
Option Description

-V or --version

Display GGC version information.

-h or --help

Displays help for the ggcadmin commands.
Table 2. ggcadmin tcp command options
Option Description
-h or --help Displays help for the tcp command.
-V or

--version

Prints version information
-w directory_name or

--working-directory directory_name

Specify the path to the directory containing the application being tested. The default is the current working directory ( . ).
--check-as-failure Treat check failures as scenario failures. The default is FALSE. See Scenario failures and check failures.
-c argument or

--command-line argument

Specify the runtime command (fglrun). The argument is the program passed to the runtime to test. Enclose the command and argument in quotations. For example, "fglrun price".
--dump-command Expand the command line options that are loaded from a default argument file. See Default argument file.
--dvm-available seconds Specify the delay for the DVM to start and be available. The default is 10 seconds.
-e argument or

--environment-file argument

Sets environment variables that will prepare the correct environment to run the test scenario. The argument is a file listing the environment variables in the form:
ENVIRONMENT_VARIABLE_NAME=<value>
If environment variables in values are to be expanded, they must be referenced (regardless of the platform) using the dollar sign and curly braces, for example ${ENVIRONMENT_VARIABLE_NAME}. For examples, see Set test environment.
--fename client-name Specify the client name used by the GGC. Use this option to have the GGC return a client name other than the default when running a test.

By default, the GGC returns "GDC" when using a TCP/IP connection.

-f argument or

--forward-gui argument

Forward GUI to the specified FGLSERVER. The AUI tree received from the DVM can be forwarded to a running GDC with --forward-gui localhost:0 to provide a visual feedback of the scenario execution.
-F argument [,...] or

--frontcall-handler argument [,...]

Provides front call handler support for user- provided front call handlers.
--scenario argument [,...] Specify test scenarios to be run. The argument option can take a list of scenarios separated by commas.
--scenario-provider argument The scenario provider implements scenarios for an application starting a child application, which may require multiple scenarios. It expects a class implementing the com.fourjs.ggc.ScenarioProvider interface. The provider provides a scenario instance when requested. See Explore the scenario provider.
Important: The --scenario-provider option can not be used with the --scenario option and vice versa.
--session-ending-delay argument Define an idle delay before considering the session ended. The argument is the delay in milliseconds you specify. The default is 1000.
-s argument or

--speed-ratio argument

Specify an execution speed for the test. The scenario generator injects wait delays. This parameter provides a way to run your tests faster or slower. For example, a ratio set to 1 equals 100%. This is the default or normal wait delay. A 10% increase in speed is achieved by setting the ratio to 0.1. For an even faster test, set the ratio to 0, which equals no wait delay. Setting the ratio to 2, increases the delay by a factor 2 (200% ), the scenario will take at least twice as long to execute. See Test speed ratio.
Table 3. ggcadmin ua command options
Option Description
-h or

--help

Displays help for the ua command.
-V or

--version

Prints version information
-u argument or

--url argument

Specify the URL to start the application. For example, http://localhost:6394/ua/r/gwc-demo.
--check-as-failure Treat check failures as scenario failures. The default is FALSE. See Scenario failures and check failures.
--check-certificates Request to check SSL certificates. This feature is disabled by default (false). To enable set --check-certificates. See Check certificates.
--dump-command Expand the command line options that are loaded from a default argument file. See Default argument file.
--fename client-name Specify the client name used by the GGC. Use this option to have the GGC return a client name other than the default when running a test.

By default, the GGC returns "GBC" when using an HTTP connection.

-f argument or

--forward-gui argument

Forward GUI to the specified FGLSERVER. The AUI tree received from the DVM can be forwarded to a running GDC with --forward-gui localhost:0 to provide a visual feedback of the scenario execution.
-F argument [,...] or

--frontcall-handler argument [,...]

Provides front call handler support for user- provided front call handlers.
-H argument [,...] or

--http-handler http_handler [,...]

Provides HTTP handler support. For example, a default HTTP handler (GIPSSOHandler) is provided for Single Sign on to authenticate a user with the Genero IDP SSO.
--scenario argument [,...] Specify test scenarios to be run. The argument option can take a list of scenarios separated by commas.
--scenario-provider argument The scenario provider implements scenarios for an application starting a child application, which may require multiple scenarios. It expects a class implementing the com.fourjs.ggc.ScenarioProvider interface. The provider provides a scenario instance when requested. See Explore the scenario provider.
Important: The --scenario-provider option can not be used with the --scenario option and vice versa.
--session-ending-delay argument Define an idle delay before considering the session ended. The argument is the delay in milliseconds you specify. The default is 1000.
-s argument or

--speed-ratio argument

Specify an execution speed for the test. The scenario generator injects wait delays. This parameter provides a way to run your tests faster or slower. For example, a ratio set to 1 equals 100%. This is the default or normal wait delay. A 10% increase in speed is achieved by setting the ratio to 0.1. For an even faster test, set the ratio to 0, which equals no wait delay. Setting the ratio to 2, increases the delay by a factor 2 (200% ), the scenario will take at least twice as long to execute. See Test speed ratio.
Table 4. ggcadmin startbdlserver command options
Option Description
-h or

--help

Displays help for the startbdlserver command.
-V or

--version

Prints version information
--dump-command Expand the command line options that are loaded from a default argument file. See Default argument file.
-i argument or

--idle-delay argument

Define an idle delay in seconds to wait before exiting due to inactivity. The argument is the delay in seconds you specify. The default is 300. 0 is infinite wait.
-p argument or

--port argument

Specifies the port on which the server listens for connections (default is 6500)
Table 5. ggcadmin stopbdlserver command options
Option Description
-h or

--help

Displays help for the stopbdlserver command.
-V or

--version

Prints version information
--dump-command Expand the command line options that are loaded from a default argument file. See Default argument file.
-p argument or

--port argument

Specifies the port on which the server listens for connections (default is 6500)

Usage

The ggcadmin command line tool provides two main functions for working with scenarios:
Start and stop the BDL scenario server

The command ggcadmin startbdlserver can be used to start the scenario server manually. Generally, you don't need to use this command as the scenario implicitly starts the daemon of the BDL server, and therefore it stops when the scenario ends.

If you start the scenario server manually, it will keep running when the scenario ends and then you need to use the ggcadmin stopbdlserver command to stop it.

Run Java scenario tests
You use the ggcadmin tcp command to run Java tests in direct mode. For example:
ggcadmin tcp -w path/to/myApp -c "fglrun myApp" --scenario myTests.MyScenario
You use the ggcadmin ua command to run Java tests against applications running in the Genero Application Server (GAS). The application must be open at the URL:
ggcadmin ua --url http://localhost:6394/ua/r/myApp --scenario myTests.MyScenario
See How to run Java tests.