10.3.2.  Adding Parameters

User defined parameters may be added to a Groovy script. In the Groovy script they can be referenced by their name, preceded by "parameter".

There are three different types of parameters:

  • String parameter a default value can be given, a list of candidates (allowed values) can be given

  • Integer parameter a default value can be given, a list of candidates (allowed values) can be given

  • Boolean parameter allowed values are "true" or "false" (case insensitive)

Parameter Definition
Figure 10.4. Parameter Definition

Now if you defined a parameter "level", it can be referenced in your script with name "parameterLevel":

Parameter Usage in Script
Figure 10.5. Parameter Usage in Script