JSON/YAML Path Assertion


This plugin was originally developed by Atlantbh d.o.o., released as jmeter-components, then merged into JP@GC, and reworked significantly in v.1.2.1


This component allows you to perform validations of JSON or YAML documents (Use Input Format radio buttons for switch between JSON/YAML.).

First, it will parse the JSON and fail if the data is not JSON.

Second, it will search for specified path, using syntax from Jayway JsonPath 1.2.0. If the path is not found, it will fail.

Third, if JSON path was found in the document, and validation against expected value was requested, it will perform validation. For the null value there is special checkbox in the GUI.

Note that if the path will return array object, it will be iterated and if expected value is found, the assertion will succeed. To validate empty array use [] string. Also, if patch will return dictionary object, it will be converted to string before comparison.

NOTE: In case when checked YAML Input Format then plugin will convert YAML to JSON.