My jmeter
test receives the following json
response
{"result":"success","additional-info":"{"external-profile":{"email":"myemail@gmail.com","firstname":"fn","lastname":"ln","portfolio":{"tags-of-interest":[],"question-created-tags":[{"tag":"un2-new tag-empty","count":1},{"tag":"un2-new tag2-empty","count":1}],"question-answered-tags":[]}}}"}
I am trying to validate that a path exists. I am able to validate that the top level path exists but I can't validate that the nested path exsits.
Eg. validating "additional-info"
works but "additional-info"."external-profile"
doesn't. What am I doing wrong?
This works
This fails with error JMESPATH "additional-info"."external-profile" expected to exist
Just go for 2 JSON JMESPath Extractors:
Extract the content of additional-info
attribute into a JMeter Variable from the response
Extract the attributes from the external-profile
attribute:
You can see the extracted values using Debug Sampler and View Results Tree listener combination: