RSS

Tag Archives: Json

JMeter – Working with JSON – Extract JSON response

Ok, like i promised in a previous post of mine, talking about working with JSON and JMeter, i will discuss using the JSON response for extracting specific values, to be further used in the test script.

Now, there is no rocket science in this. Sending an HTTP Request with a JSON string as payload, will return a JSON string also, built on the same convention as already discussed. Now, the only thing you need is to extract the information you need from this response. I consider the Regular Expression Extractor to be the best  option.

Read the rest of this entry »

Advertisements
 
Leave a comment

Posted by on 15/09/2015 in Jmeter, Json

 

Tags: ,

How to count JSON objects in an Array using jsonpath

Although JSONPath Extractor doesn’t provide hasSize function it is still can be done.

Given example JSON from the answer by PMD UBIK-INGENIERIE, you can get matches number onbook array at least in 2 ways:

Read the rest of this entry »

 
Leave a comment

Posted by on 14/09/2015 in Jmeter, Json

 

Tags: ,

JSONPath expressions

JSONPath expressions always refer to a JSON structure in the same way as XPath expression are used in combination with an XML document. Since a JSON structure is usually anonymous and doesn’t necessarily have a “root member object” JSONPath assumes the abstract name $ assigned to the outer level object.

Read the rest of this entry »

 
Leave a comment

Posted by on 09/09/2015 in Jmeter, Json

 

Tags: ,