Q:

Jmeter assert json response element to be NOT NULL

I am getting Json response, I have parsed it using jp@gc - JSON Path Extractor and got an element say 'Access_Token'. This Access_Token is dynamic. So I just want to make sure that this element is not null.
Any leads would be much appreciated.

A:

In the JSON Path Extractor provide Default Value, for example NOT_FOUND

Add Response Assertion after the JSON Path Extractor and configure it as follows:

Apply To: JMeter Variable -> Access_Token
Pattern Matching Rules:

Tick NOT
Tick Equals

Patterns to Test: NOT_FOUND (or whatever you entered into the "Default Value" input of the JSON Path Extractor)

See How to Use JMeter Assertions in Three Easy Steps article for comprehensive information on using Assertions in JMeter scripts.

