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.
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:
See How to Use JMeter Assertions in Three Easy Steps article for comprehensive information on using Assertions in JMeter scripts.
Add a BeanShell PostProcessor component after you get your Access_Token and in it check what you want...
if (vars.get("Access_Token") != null) {
// do something
} else {
// do something else
}
Depending on your needs, you can do basically what ever you want from here. For example stop the thread, stop the test...