jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Schleimer <ssch...@coraid.com>
Subject Re: JSON Path Assertion
Date Sat, 25 May 2013 22:34:48 GMT
I discovered that the path $..state does not properly find "state" in the following:

{"values":[{"fullPath":"admin group","groupId":1}],"message":"","state":"adminSucceed","metaCROp":"noAction"}

Rather, one must use $.state.  Apparently the general search, $..state, requires a more complex
object.  I do use that formulation in other, successful, applications of JSON Path Extraction.

Can anyone explain why the original fails?

Thanks

-steve

____________________________________________
Steve Schleimer
Technical Director | Coraid
Tel: +1 650 730-5123
sschlmr@coraid.com<mailto:sschlmr@coraid.com> | www.coraid.com<http://www.coraid.com>
[cid:E3B06BD4-F16D-4CD4-A6D9-F99B713BDDA0@coraid.com]
Redefining Storage

On May 25, 2013, at 12:26 PM, Steve Schleimer wrote:

(In advance, sorry for not formatting this using the standard text wrappers.  I do not know
what they are or how to use them in an email.  That said, ...)

I am using JSON Path Assertion to sense the state of responses from  certain HTTP operations.
 The responses to the operations are simple JSON maps.  An example of which is:

{"values":[{"fullPath":"admin group","groupId":1}],"message":"","state":"adminSucceed","metaCROp":"noAction"}

The path I use in the JSON Path Assertion to extract the interesting component of the message
is:

$..state

The expected value is:

adminSucceed

Of course, I check "Validate against expected value".

The setup is as follows:


The operation succeeds and the test always fails.  I have made "admin succeed" a child of
"HTTP Request" and it still fails.

Clearly, I do not understand something here.  Please illuminate.

Thanks

-steve
____________________________________________
Steve Schleimer
Technical Director | Coraid
Tel: +1 650 730-5123
sschlmr@coraid.com<mailto:sschlmr@coraid.com> | www.coraid.com<http://www.coraid.com/>
<0clip_image002.png>
Redefining Storage


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org<mailto:user-unsubscribe@jmeter.apache.org>
For additional commands, e-mail: user-help@jmeter.apache.org<mailto:user-help@jmeter.apache.org>


Mime
  • Unnamed multipart/related (inline, None, 0 bytes)
View raw message