Github user max3163 commented on the pull request:
https://github.com/apache/jmeter/pull/168#issuecomment-197777667
First of all, In the present state of JMeter I can't use the the JSON-PATH
post-processor :
This error happen :
2016/03/17 09:53:18 ERROR - jmeter.threads.JMeterThread: Test failed!
java.lang.NoClassDefFoundError: net/minidev/asm/FieldFilter
at net.minidev.json.reader.JsonWriter.<clinit>(JsonWriter.java:157)
I had to add 2 jars "accessors-smart-1.1.jar" and "asm-5.0.3.jar"
See below one example of my problem, solve by my PR :
Consider the result of a rest call like this :
{"tokenId":"1458205185" ,"passwordStatus":"OK , "code" : 200}
My post processor is :
Variable : tokenId
Expression : $.tokenId
Match count : 1
Default : NOT_FOUND
I have this error on the log :
2016/03/17 09:59:26 ERROR -
jmeter.extractor.json.jsonpath.JSONPostProcessor: Error processing JSON content
in Extracteur JSON-PATH - tokenId, message:java.lang.String cannot be cast to
java.util.List
2016/03/17 09:59:26 ERROR -
jmeter.extractor.json.jsonpath.JSONPostProcessor: Error processing JSON content
in Extracteur JSON-PATH - passwordStatus, message:java.lang.String cannot be
cast to java.util.List
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---