Example Script Variables

Let’s define a script variable with name MY_FIRST_SHARED_VAR with value 'testValue' and run the below code:

groovy
logger.info("My variable has a value: " + MY_FIRST_SHARED_VAR)

You should see the log with content:

groovy
INFO - My variable has a value: testValue

Now let’s define a variable with name NO_RETRIES with value '5' and run the below code:

groovy
NO_RETRIES + 10

The result will be 510 (string concatenation), rather than 15.