ggcgen
You use the ggcgen BDL tool to generate test scenarios from a recorded session. It accepts logs recorded by the DVM (guilog) or logs recorded using the Genero Desktop Client (GDC) or Genero Browser Client (GBC).
Syntax
ggcgen { -V | -h | command [options] argument [...] }
- command is either bdl to generate a test scenario in BDL, or java to generate a scenario in Java.
- options are described in Options.
- argument are log files or skeleton names passed as argument from which scenarios are generated. One scenario per log file. With the --skeleton option, an empty scenario is generated without using a log file.
Options
Option | Description |
---|---|
|
Display GGC version information. |
|
Displays help for the ggcgen commands. |
-v or
--verbose |
Generate verbose output for help with debugging. This option is not enabled by default. |
--output-directory |
Specify where to place generated files. Default is current working directory. |
--comment-prefix
argument |
The template's comment prefix. The default punctuation is two exclamation marks,
!! , and lines with this prefix are filtered. The argument option
allows you to specify an alternative prefix. |
--dump-command |
Expand the command line options that are loaded from a default argument file. See Default argument file. |
Option | Description |
---|---|
--template-directory
argument [...] |
Specify template directories to use. The
argument option can take a list of directories. The lookup will be performed in the
order the arguments appear in the command line. |
Option | Description |
---|---|
--no-wait |
Specify that wait instructions, such as BDL Call ggc.wait() or Java
client.wait() , are not generated. The 'wait' instruction is expanded using the
wait.4gl code template. |
--dump-all |
Enables all information (AUI log, AUI tree) to be included in comments in the scenario. Default value is false. |
--dump-auitree |
The state of the AUI tree is included in comments between each instruction sent to the DVM. Default value is false. |
--dump-auilog |
The source log file used to generate the scenario is included in comments in the instructions between the AUI tree and the client. Default value is false. |
Option | Description |
---|---|
--check-all |
This option provides you with optional checks that can be generated and then performed at runtime. It enables all checks provided by the templates in GGCDIR/template/bdl/check_*.4gl. |
--check-window |
This option checks the current window name and title using the template GGCDIR/template/bdl/check_window.4gl |
--check-form |
This option checks the current form name and title using the template GGCDIR/template/bdl/check_form.4gl. |
--check-focus |
This option checks the focused field using the template GGCDIR/template/bdl/check_focus.4gl. |
--check-value |
This option checks the value of the focused field using the template GGCDIR/template/bdl/check_value.4gl. |
--check-actions |
This option checks the active/inactive state of an action using the template GGCDIR/template/bdl/check_action.4gl. |
--check-messages |
This option generates code to check that
MESSAGE and ERROR instructions contain expected messages values.
It also checks in case values are missing. The GGCDIR/template path has the
following templates that enable these checks based on whether your test uses Genero BDL or Java:
|
Option | Description |
---|---|
--skeleton |
This option allows you to generate an empty scenario.
The header.4gl and footer.4gl templates only will be generated
in the named scenario. Dump and check options will be ignored. |
--package-name |
This option is used with the ggcgen java
--skeleton command. It allows you to specify the Java package name. |
Usage
You use the ggcgen
tool to generate scenarios from a recorded session.
There are several options you can use to effect the generated scenario. You can set the template directory to one with your specific checks. Or if you want to perform standard checks, you can set these with the check options.
ggcgen bdl --template-directory ${GGCDIR}/template/bdl/alternate-checks --check-all mylog.log
Or
for
Java:ggcgen java --template-directory ${GGCDIR}/template/bdl/alternate-checks --check-all mylog.log
--dump-*
) when you need to see detailed information
such as the state of the AUI tree generated in the scenario.You can use the --skeleton
option to generate an empty scenario. The code from
the header
and footer
templates only will be expanded. It does not
require a log file, just the name of the scenario to generate. Multiple scenarios can be created by
listing them separated by spaces.
ggcgen bdl --skeleton tests
Or for Java: ggcgen java --skeleton --package-name tests myscenario