YAML Plugin
The plugin provides a set of actions for validation of YAML data.
Installation
-
Copy the below line to
dependencies
section of the projectbuild.gradle
filePlease make sure to use the same version for all VIVIDUS dependencies. Example 1. build.gradleimplementation(group: 'org.vividus', name: 'vividus-plugin-yaml')
-
If the project was imported to the IDE before adding new dependency, re-generate the configuration files for the used IDE and then refresh the project in the used IDE.
Steps
The steps syntax uses internal (VIVIDUS-only) term:
-
"YAML element value" or "value of YAML element" - scalar values like
string
,integer
,float
,boolean
(true
orfalse
) andnull
.
Save YAML element value from input
Saves a value of YAML element found in the given YAML into the variable with the specified name and scope.
When I save YAML element value from `$yaml` by YAML path `$yamlPath` to $scopes variable `$variableName`
-
$yaml
- The YAML used to find YAML element value. -
$yamlPath
- The YAML Path used to find YAML element value. -
$variableName
- The name of the variable to save the found YAML element value.
When I save YAML element value from `${response}` by YAML path `store.book[1].title` to scenario variable `title-of-second-book`
Then `${title-of-second-book}` is equal to `Sword of Honour`