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: [hidden email] MSN: [hidden email] |
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: [hidden email] > > MSN: [hidden email] > > > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
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 <[hidden email]> 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: [hidden email] > > > > MSN: [hidden email] > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [hidden email] > For additional commands, e-mail: [hidden email] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
Free forum by Nabble | Edit this page |