Skip to end of metadata
Go to start of metadata


GINT or user provided command generatorsease testcase definition and maintenance by defining testcase parameters used to generate commands. This makes the testcase more readable, easier to document with comments, and more understandable than a long command string. GINT provides a number of built in generators and a facility to aid adding and managing user defined command generators.


Command generator can be set on an individual testcase (cmdGenerator parameter) or globally by setting the default command generator using gint.setCmdGenerator. A command generator is uniquely identified by name and (optional) parameter settings in the form of a parameter map. Each command generator can define custom testcase parameters specific to the domain of the command being used.


  • Use setCmdGenerator to set the default command generator used for all testcases without cmd, inline, or cmdGenerator defined
  • Use addCmdGenerator to add or replace a command generator in the list of known generators
  • Use getCmdGenerator to get a command generator by name and parameter setting

Examples - used in a test script

  1. gint.setCmdGenerator('groovy') // set default cmd generator to groovy, no parameters
  2. gint.setCmdGenerator('java', [class: 'myClass', classpath: 'myClasspath']) // set default cmd generator to my java class
  3. As part of a testcase definition: gint.add(name: 'example1', jar: 'my.jar', gint.getCmdGenerator('java', [classpath: 'myClassPath']))

GINT provided command generators

  • No labels