jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carl Shaulis <cshau...@homeaway.com>
Subject Re: Response assertion with json format
Date Wed, 27 Jan 2010 15:54:33 GMT
Hi Luca,

Here is a snippet of the JSON response I get:

{"result":{"position":1,"items":[{"type":

Make sure for your test plan you have the User Defined variable

Accept-Encoding: application/json

I use a response assertion and I look for the pattern "result" for Main
Sample only and response field to test is set to text.

Good luck,

Carl


On 1/27/10 5:27 AM, "Luca Borz" <lborz@opera21.it> wrote:

> Hi,
> 
> i'm a newbie of JMeter. I'm using it for testing my website. I'm
> creating test for service of my site.
> I invoke correctly it with a Http Request with some parameters. The body
> response use Json as format. I create a Response assertion with this option:
> - main samples only;
> - Response code (but I have also tried the other options for Response
> Field to test);
> - I choose Contains as Pattern match rules (but also tried the option
> Matches);
> - as parameter I use part of the message visible in Response data of
> View Result Tree;
> The assertions is always false but in the Result Tree I can clearly see
> the fragment of response that I used as parameter for assertion. Where
> is the fault?
> 
> Thanks in advance.


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


Mime
View raw message