Skip to content

JSON Assertion

Configure the JMeter JSON Assertion assertions: properties, defaults, and practical usage notes for building reliable load tests.

Difficulty
intermediate
Guide type
reference
Estimated read time
1 min read
Last verified version
Verified JMeter 5.6

Part of the Assertions category. Also documented in context in the full Component Reference.

JSON Assertion

This component allows you to perform validations of JSON documents. 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.

NameRequiredDescription
Assert JSON Path existsYesPath to JSON element for assert.
Additionally assert valueNoSelect checkbox if you want make assert with some value
Match as regular expressionNoSelect checkbox if you want use regular expression
Expected ValueNoValue for assert or regular expression for match
Expect nullNoSelect checkbox if you expect null
Invert assertion (will fail if above conditions met)NoInvert assertion (will fail if above conditions met)
On this page