Expressions available out of the box

Description

Here one could find description of the expressions that are delivered with Vividus itself without any plugins required.

Groovy

Info

Executes groovy script and converts result to a string.

Wording

#{evalGroovy(script)}

Parameters

  1. $script - valid groovy script

Any context variable available in the groovy script by its name
One could use any of online groovy evaluators to verify the script. For example see: Evaluator

Usage

Example 1. TryGroovy.story
Scenario: Click button 5 times
When I initialize Scenario variable `listOfMaps` with values:
|key|
|2  |
|1  |
|3  |
Then `1-2-3` is = `#{evalGroovy(return listOfMaps.collect{it['key']}.sort().join('-'))}`