On 12/05/2008, Ori Marco <[EMAIL PROTECTED]> wrote: > Hi > > How can I check xml returned from HTTP request using regular expression > or other?
Yes, you can use Response Assertion and/or XML Assertion. > Regular expression failed to find full xml template, but succeeded > In finding each row separately. Not entirely sure I follow what you are saying here. A regular expression can match anything you want, so it will only fail to "find full xml template" if the expression is incorrect. > Example > I need to check that the xml that return is > > <?xml version="1.0"?> > <a> > <b>(\d+)</b> > </a> > I suggest you add an XML Assertion, followed by a Response Assertion using "matches". http://jakarta.apache.org/jmeter/usermanual/component_reference.html#Response_Assertion Just replace the newlines and spaces in the your sample above with \s+ (and ? with \? because ? is a metacharacter) e.g. <\?xml version="1.0"\?>\s+<a>\s+ etc > Thanks > > Ori Marko > Quality Assurance Engineer > Praxell Inc. > http://www.praxell.com > > > -----Original Message----- > From: sebb [mailto:[EMAIL PROTECTED] > Sent: Monday, May 12, 2008 1:32 PM > To: JMeter Users List > > Subject: Re: FW: xml response asserion > > It's not clear to me what you are asking. > > What did you try? > What did you expect to happen? > What actually happened? > Any error messages (log file, console window)? > > > On 12/05/2008, Ori Marco <[EMAIL PROTECTED]> wrote: > > Anyone? > > > > Ori Marko > > Quality Assurance Engineer > > Praxell Inc. > > Mobile: 0524-455-177 > > Office:03-6126060 Ext 612 > > Fax: 03-6126066 > > http://www.praxell.com > > -----Original Message----- > > From: Ori Marco [mailto:[EMAIL PROTECTED] > > Sent: Sunday, May 04, 2008 12:09 PM > > To: JMeter Users List > > Subject: RE: xml response asserion > > > > Also adding XML Assertion to request failed on row: > > <?xml version="1.0"?> > > Which should be fine, I'm using jmeter 2.3 > > > > FYI > > > > Ori Marko > > Quality Assurance Engineer > > Praxell Inc. > > Mobile: 0524-455-177 > > Office:03-6126060 Ext 612 > > Fax: 03-6126066 > > http://www.praxell.com > > -----Original Message----- > > From: Ori Marco [mailto:[EMAIL PROTECTED] > > Sent: Sunday, May 04, 2008 11:56 AM > > To: JMeter Users List > > Subject: xml response asserion > > > > Hi > > > > > > > > I want to check xml response with assertion using response xml > template. > > > > I failed assertion using the template as 1 pattern to test (that > > contains), But assertion succeeded to check each row as a pattern to > > test. > > > > Can't I check response with full xml template pattern to test? > > > > > > > > Thanks > > > > > > > > Ori Marko > > Quality Assurance Engineer > > Praxell Inc. > > http://www.praxell.com <http://www.praxell.com> > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

