Re: Response assertion with json format

2010-01-28 Thread sebb
On 28/01/2010, Luca Borz wrote: > Hi, > > i keep the same problem on plugin Jakarta for regular expression test > (?s)Apple,.+?Pie > Works fine, but in Jmeter doesn't work. Seems that in Jmeter the carriage > return is not recognized. Unlikely; JMeter uses ORO. > Anyone have any cue for solv

Re: Response assertion with json format

2010-01-28 Thread Luca Borz
Hi, i keep the same problem on plugin Jakarta for regular expression test (?s)Apple,.+?Pie Works fine, but in Jmeter doesn't work. Seems that in Jmeter the carriage return is not recognized. Anyone have any cue for solve this problem? I think about it, and I have two question: - it's possible t

Re: Response assertion with json format

2010-01-27 Thread Deepak Shetty
The assertion is a child of the sampler that returns this repsonse correct (not of a higher element like Thread Group or some controller)? 2010/1/27 Luca Borz > Hi, > > in the ORO plugin work fine both of expression. In my JMeter they don't > work at all. I will check once again my data tomorro

Re: Response assertion with json format

2010-01-27 Thread Luca Borz
Hi, in the ORO plugin work fine both of expression. In my JMeter they don't work at all. I will check once again my data tomorrow. Thanks for all. -- Opera21 *Luca Borz* Junior Programmer *Opera21 Nordest S.r.l.* *Rovereto (TN)* 38068 - Via F. Zeni, 8 - Tel. 02.69374.426 - Fax 0464.44336

Re: Response assertion with json format

2010-01-27 Thread sebb
On 27/01/2010, Luca Borz wrote: > Hi Carl, > > my problem is multi-line. > For example, I have the response like this > > {"result": > {"position":1, > "items":[{"type": > > And I look for: > > "position":1, > "items": > > > I use this expressions: > > - "position":1

Re: Response assertion with json format

2010-01-27 Thread Luca Borz
Hi Carl, my problem is multi-line. For example, I have the response like this {"result": {"position":1, "items":[{"type": And I look for: "position":1, "items": I use this expressions: - "position":1,\n"items": - ^"position":1,$^"items":$ - ^"position":1,$\n^"items":

Re: Response assertion with json format

2010-01-27 Thread Carl Shaulis
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 fi

Re: Response assertion with json format

2010-01-27 Thread Luca Borz
Thanks seeb the problems are two: - I must use Text code option as you said; - I use the wrong escaping for new line inside the pattern expression; -- Opera21 *Luca Borz* Junior Programmer *Opera21 Nordest S.r.l.* *Rovereto (TN)* 38068 - Via F. Zeni, 8 - Tel. 02.69374.426 - Fax 0464.443360 *Vim

Re: Response assertion with json format

2010-01-27 Thread sebb
On 27/01/2010, Luca Borz 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 opt

Response assertion with json format

2010-01-27 Thread Luca Borz
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