YAML Plugin

The plugin provides a set of actions for validation of YAML data.

Installation

  1. Copy the below line to dependencies section of the project build.gradle file

    Example 1. build.gradle
    implementation(group: 'org.vividus', name: 'vividus-plugin-yaml', version: '0.5.2')
  2. If the project was imported to the IDE before adding new plugin, 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 or false) and null.

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`
Example 2. Validate the title of the second book
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`