GGC 2.00 upgrade guide

These topics describe product changes you must be aware of when upgrading to version 2.00.

Important: This is an incremental upgrade guide that covers only topics related to the Genero Ghost Client version specified in the page title. Check prior upgrade guides if you migrate from an earlier version. If you are migrating your test scenarios, make sure you compile with this version. Make sure to also read about the new features for this version.

Corresponding new features page: GGC 2.00 new features.

Migrating from GGC Version 1 to 2

Genero Ghost Client version 2 is not compatible with version 1. If your tests were written or recorded for version 1, you must use the GGC version 1 to run them until you are ready to migrate to version 2.

If you are migrating your test scenario generated with version 1, you will need to rewrite test code or re-record logs and generate test scenarios using GGC version 2. For more information see the Summary of changes from version 1 to 2.

Deprecated ggcadmin uastart and tcpstart commands

The ggcadmin uastart/tcpstart commands are deprecated. You will need to replace these commands with the ggcadmin ua/tcp. The uastart and tcpstart commands continue to be supported but will be removed in a future release.

Deprecated ggcadmin ua --start-url parameter

The ggcadmin ua --start-url parameter is deprecated. You will need to replace this with --url in commands used to specify the URL to start the application for testing. For example,
ggcadmin ua --url http://localhost:6394/ua/r/myApp --scenario myTests.MyScenario
The --start-url parameter continues to be supported but will be removed in a future release.

Deprecated ggcadmin tcp/ua short options -fg and -sr

To support use of standard getopt (UNIX® like OS ) short options with two characters have been renamed with one character. This effects ggcadmin tcp and ggcadmin ua options -fg and -sr, which are now deprecated. You will need to replace these in your ggcadmin tcp/ua commands. For example:

  • In a command to specify a GUI to forward to, replace -fg with -f
    ggcadmin tcp -w path/to/myapp -f localhost:0 -c "fglrun myapp" --scenario test_dir.myapp_test
  • In a command to specify the speed ratio of a test, replace -sr with -s
    ggcadmin tcp -w path/to/myapp -s 0.1 -c "fglrun myapp" --scenario test_dir.myapp_test

Front-end defaults change

Starting with GGC 2.00.13, the default client name returned by the GGC changes. Prior to this release, the default returned was always "GGC".

Starting with this release, by default:
  • "GBC" when using an HTTP connection (ua).
  • "GDC" when using an direct connection (tcp).
The value can be overridden by --fename:

For test scenarios written in Genero BDL, check for occurrences of either ui.Interface.getFrontEndName() or the feinfo.fename built-in front call, to analyze whether changes to your test scenario application are required.

Deprecated status codes

The Status Code FIELD_NOT_ACTIVE is no longer supported. If your tests were written using this code, you will need to rewrite your test code.

Summary of changes from version 1 to 2

Setting the environment
CLASSPATH for Java is set by running the envcomp environment script. See Install and configure for Genero Ghost Client.
Generating a scenario
Scenarios are generated from a guilog, or a GDC log in v2 using the ggcgen tool. See Recording logs and generating scenarios.
Framework changes:
GGC v2 encapsulates and simplifies the underlying Java framework. BDL scenarios are no longer instantiated directly through the Java Bridge. Now they connect to a GGC backend using channels. See The Genero Ghost Client framework.
  • The GhostGenerator interface no longer exists, its function is replaced with the ggcgen command.
  • The Launcher interface function is replaced with the functionality of ggcadmin or fglrun commands tcp/ua. You can provide a list of scenarios to test in a parameter.

    Thread delays are specified with the --speed-ratio option of the ggcadmin (for Java tests) or the fglrun command (for BDL tests). See Test speed ratio.

    If more than one scenario is to be tested, a scenario provider (ScenarioProvider) interface is created and populated with the scenarios. A configuration (TCP/UA) is created, followed by a SessionManager, and a new session is added using the previously built configuration and scenario provider.

    The created session (UA or TCP session) deals with the main scenario and, if some child VMs are started, with the corresponding child scenarios. See Explore the scenario provider.

Execution statistics
The output when a scenario ends differs in GGV v2. Summary statistics about the execution are displayed when tests end. When test checks or scenarios fail, these are displayed in the summary at the end. See GGC Quick Starts and Session information.
Templates

Templates are new to v2. These correspond to checks that existed in v1, which were enabled by default.

Now options are provided so you can control which checks will be generated. You can also control how they are generated by updating the templates if needed. See Quick Start: Customize a template.

A feature of templates allows you to create a skeleton scenario for an empty test using the header and footer templates.

Logging mechanism
The logging mechanism is different and is configured with the log.properties file. GHOSTLOG of v1 is not used in v2.
Debugging

If you activate the "--dump_*" options feature of the ggcgen tool, it in-lines information as comments about the state of the AUI tree at the moment an action is executed. For instance, a full tree dump is recorded in the scenario log file.

This is a debugging tool, useful for finding where a scenario execution differs from a recorded session. You may find it useful to turn on this feature particularly for support requests.

Macros
The use of macros in GGC version 1 has been replaced by Templates.
Front calls
Support for front calls has been enhanced in v2. See Front calls.