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 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

-h or --help

Displays help for the ggcadmin commands.

-V or --version

Display GGC version information.
Table 2. ggcadmin tcp command options
Option Description
-h or --help Displays help for the tcp command.
-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.
-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

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

Provides front call handler support for user- provided front call handlers.
-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.
--check-as-failure Treat failed checks as failure. If any check fails, the test scenario fails. The default is FALSE.
--instance-count argument Specify the total number of instances to execute in parallel with each other. The default is 1.
--instance-delay argument Specify the number of milliseconds that GGC waits between starting each instance. The default is 100.
-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.
--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.
--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.
--user-data key=value Sets the value of a data key. This option can be called multiple times to set multiple name=value pairs.

You then use the Java API method Client.getUserData(name String) in the test scenario to retrieve the value of the user data by name. See Java API functions for GGC for more information about the Java API and its methods.

--user-data-file filename Specifies the file that contains user data. This file must contain a list of name=value pairs, one per line.

You then use the Java API method Client.getUserData(name String) in the test scenario to retrieve the value of the user data by name. See Java API functions for GGC for more information about the Java API and its methods.

-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.
Table 3. ggcadmin ua command options
Option Description
-h or --help Displays help for the ua command.
-u argument or

--url argument

Specify the URL to start the application. For example, http://localhost:6394/ua/r/gwc-demo.
--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.
--check-as-failure Treat failed checks as failure. If any check fails, the test scenario fails. The default is FALSE.
--instance-count argument Specify the total number of instances to execute in parallel with each other. The default is 1.
--instance-delay argument Specify the number of milliseconds that GGC waits between starting each instance. The default is 100.
-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.
--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.
--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.
--user-data key=value Sets the value of a data key. This option can be called multiple times to set multiple name=value pairs.

You then use the Java API method Client.getUserData(name String) in the test scenario to retrieve the value of the user data by name. See Java API functions for GGC for more information about the Java API and its methods.

--user-data-file filename Specifies the file that contains user data. This file must contain a list of name=value pairs, one per line.

You then use the Java API method Client.getUserData(name String) in the test scenario to retrieve the value of the user data by name. See Java API functions for GGC for more information about the Java API and its methods.

Table 4. ggcadmin startbdlserver command options
Option Description
-h or --help Displays help for the startbdlserver command.
--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.
--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 because the scenario implicitly starts the daemon of the BDL server and therefore 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.