You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Sander Stevens <S....@kpn-is.nl> on 2005/06/03 11:07:13 UTC

Response assertion match

Hi,

 

I have another question about response assertions (yep, heavy jmeter
user these days :-).

 

My database query returns:

COUNT(*)

0

 

I want to match this with a response assertion.

My response assertion has two lines:

COUNT\(\*\)

0

and the options are set like: 'Matches' and 'Text Response'.

 

'Matches' is very important, because it should be exactly those two
strings.

But it appears to be red in my results. So I am missing something I
think. 

 

Any ideas?

 

Thanks in advance.

Sander

 

 

Met Vriendelijke Groet,

 

Sander Stevens

KPN Internet Solutions

Internet Technologies Amersfoort

Tel:  030-6588500 (ex. 88633)

Fax: 033-4513101

Mobiel: 06-46404673

E-mail: s.stevens@kpn-is.nl

MSN: stevens_sander@hotmail.com

 

 

 


Re: Response assertion match

Posted by sebb <se...@gmail.com>.
See:

http://jakarta.apache.org/jmeter/usermanual/component_reference.html#Response_Assertion

Try adding (?s) at the start of the expression.

S.
On 6/3/05, Michael Stover <ms...@apache.org> wrote:
> Sebb's the regular expression master around here, but your problem most
> likely has to do with the new lines and the fact that JMeter by default
> treats the input as a multiple-line input.  So, you will want to do
> something like:
> 
> COUNT\(\*\)\s*0\s*
> 
> However, this probably won't work either because I don't know if \s will
> match new lines under multiple-line input.  But, there is a way to tell
> the regex to treat it as single-line, I just don't know the exact
> syntax.  I suggest finding yourself a good perl regex reference page and
> bookmarking it.
> 
> -Mike
> 
> On Fri, 2005-06-03 at 11:07 +0200, Sander Stevens wrote:
> > Hi,
> >
> >
> >
> > I have another question about response assertions (yep, heavy jmeter
> > user these days :-).
> >
> >
> >
> > My database query returns:
> >
> > COUNT(*)
> >
> > 0
> >
> >
> >
> > I want to match this with a response assertion.
> >
> > My response assertion has two lines:
> >
> > COUNT\(\*\)
> >
> > 0
> >
> > and the options are set like: 'Matches' and 'Text Response'.
> >
> >
> >
> > 'Matches' is very important, because it should be exactly those two
> > strings.
> >
> > But it appears to be red in my results. So I am missing something I
> > think.
> >
> >
> >
> > Any ideas?
> >
> >
> >
> > Thanks in advance.
> >
> > Sander
> >
> >
> >
> >
> >
> > Met Vriendelijke Groet,
> >
> >
> >
> > Sander Stevens
> >
> > KPN Internet Solutions
> >
> > Internet Technologies Amersfoort
> >
> > Tel:  030-6588500 (ex. 88633)
> >
> > Fax: 033-4513101
> >
> > Mobiel: 06-46404673
> >
> > E-mail: s.stevens@kpn-is.nl
> >
> > MSN: stevens_sander@hotmail.com
> >
> >
> >
> >
> >
> >
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> 
>

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


Re: Response assertion match

Posted by Michael Stover <ms...@apache.org>.
Sebb's the regular expression master around here, but your problem most
likely has to do with the new lines and the fact that JMeter by default
treats the input as a multiple-line input.  So, you will want to do
something like:

COUNT\(\*\)\s*0\s*

However, this probably won't work either because I don't know if \s will
match new lines under multiple-line input.  But, there is a way to tell
the regex to treat it as single-line, I just don't know the exact
syntax.  I suggest finding yourself a good perl regex reference page and
bookmarking it.

-Mike

On Fri, 2005-06-03 at 11:07 +0200, Sander Stevens wrote:
> Hi,
> 
>  
> 
> I have another question about response assertions (yep, heavy jmeter
> user these days :-).
> 
>  
> 
> My database query returns:
> 
> COUNT(*)
> 
> 0
> 
>  
> 
> I want to match this with a response assertion.
> 
> My response assertion has two lines:
> 
> COUNT\(\*\)
> 
> 0
> 
> and the options are set like: 'Matches' and 'Text Response'.
> 
>  
> 
> 'Matches' is very important, because it should be exactly those two
> strings.
> 
> But it appears to be red in my results. So I am missing something I
> think. 
> 
>  
> 
> Any ideas?
> 
>  
> 
> Thanks in advance.
> 
> Sander
> 
>  
> 
> 
> 
> Met Vriendelijke Groet,
> 
>  
> 
> Sander Stevens
> 
> KPN Internet Solutions
> 
> Internet Technologies Amersfoort
> 
> Tel:  030-6588500 (ex. 88633)
> 
> Fax: 033-4513101
> 
> Mobiel: 06-46404673
> 
> E-mail: s.stevens@kpn-is.nl
> 
> MSN: stevens_sander@hotmail.com
> 
>  
> 
> 
> 
> 



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