jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sonam Chauhan <sonam.chau...@ce.com.au>
Subject RE: Regression Testing w/ JMeter
Date Wed, 27 Apr 2005 04:33:58 GMT
> result. I can ignore the blankline in regex by (?s)
> but not space. I have to copy and paste again for the
> new result.

Just a thought... is the (?x) modifier of any use?  

>From 'perldoc perlre':
-- 
x   Extend your pattern's legibility by permitting whitespace and com-
    ments.
--

Or perhaps you could define a XML "style guide" and nail down your
developers so no superfluous stuff is added by ensuring code does not get
promoted out of dev unless it has passed all regression tests.

Sonam Chauhan
-- 
Electronic Commerce, Corporate Express Australia Ltd.
Phone: +61-2-9335-0725, Email: sonam.chauhan@ce.com.au
 

> -----Original Message-----
> From: Dave Maung [mailto:dmaung1@yahoo.com]
> Sent: Wednesday, 27 April 2005 2:09 PM
> To: JMeter Users List
> Subject: RE: Regression Testing w/ JMeter
> 
> > I think there is an XML parser setting (ignore
> > whitespace or not) but this
> > is an example where a simple full-text response
> > checker (with regexs
> > accounting for permitted variants) would have caught
> > the different behavior
> > in testing.
> 
> yes you can do that. I also tried that in the past but
> actually turn out very messy. Because, everytime
> developers modify a space, I have to get the new
> result. I can ignore the blankline in regex by (?s)
> but not space. I have to copy and paste again for the
> new result.
> 
> Ex:
> <root>
> <list index="0"></list>
> </root>
> 
> this diff will fail because index="0" and index = "0"
> does not match
> <root>
> <list index = "0"></list>
> </root>
> 
> 
> also I cannot use any meta data character in your
> validate result such as ?,.,*,. I have to append "\".
> Otherwise, it will just fail.
> 
> 
> Dave
> 
> 
> 
> --- Sonam Chauhan <sonam.chauhan@ce.com.au> wrote:
> 
> > Thanks Dave: my tests need to assert against XML,
> > HTML and EDI flat files.
> > But even for XML, a schema often isn't available
> > (e.g.: when a standard is
> > only defined by a DTD), or may not be useful. Let me
> > illustrate...
> >
> > We use the webMethods platform at work. Once, after
> > installing a patch, the
> > platform subtly changed how it built XML tags
> > containing empty strings.
> > Instead of building tags together like this:
> >     <a></a>
> > ...it started building them with a carriage return
> > in between:
> >     <a>
> >     </a>
> >
> > Ariba provides a DTD for the cXML standard. cXML
> > documents built in both,
> > the old and new fashions, validated against Ariba's
> > DTD in XMLSpy, but Ariba
> > itself rejected the new documents as invalid.
> > Eventually, webMethods
> > provided a fix that reverted the platform to the
> > earlier behavior.
> >
> > I think there is an XML parser setting (ignore
> > whitespace or not) but this
> > is an example where a simple full-text response
> > checker (with regexs
> > accounting for permitted variants) would have caught
> > the different behavior
> > in testing.
> >
> > Regards,
> > Sonam Chauhan
> > --
> > Electronic Commerce, Corporate Express Australia
> > Ltd.
> > Phone: +61-2-9335-0725, Email:
> > sonam.chauhan@ce.com.au
> >
> >
> > > -----Original Message-----
> > > From: Dave Maung [mailto:dmaung1@yahoo.com]
> > > Sent: Wednesday, 27 April 2005 12:10 PM
> > > To: JMeter Users List
> > > Subject: RE: Regression Testing w/ JMeter
> > >
> > > at work, I wrote XML Schema and validate against
> > xml response using XML
> > > scehma assertion. It is best suite, if your
> > application is xml based.
> > > However, If you are using HTML, it is very hard.
> > Maybe XHTML validation
> > > may work.
> > >
> > >
> > > Dave
> > >
> > > Sonam Chauhan <sonam.chauhan@ce.com.au> wrote:
> > > Hi Mike, Sebb -
> > >
> > > > It would be hard - there could be dozens or even
> > hundreds of characters
> > > > that need to be escaped else they'll be treated
> > as funky regular
> > > > expression signifiers.
> > >
> > > I played around on this a while back... I recall I
> > used a Perl script to
> > > process the text to escape metacharacters. (I used
> > the quotemeta builtin
> > > Perl function that escapes just about everything
> > not alphanumeric with a
> > > backslash - even spaces!). I could not get it to
> > work though - even with
> > > modifiers. I _suspect_ it could be a line
> > terminator issue - I suspect
> > > Java
> > > does something strange with line terminations of
> > text pasted into a
> > > textbox.
> > >
> > >
> > > Obviously, even if it works, a 4-step process
> > involving external tools
> > > isn't
> > > practical for everyday use. Ideally, an 'Enhanced
> > Response Assertion'
> > > element would allow me to simply paste in a full
> > document, mark certain of
> > > text, and edit them as regular expressions (these
> > would then display in a
> > > different font or color).
> > >
> > > Seb, you also mentioned:
> > > > > The Regex Tester might help here.
> > >
> > > I haven't used one so far -- is there a specific
> > one you had in mind?
> > >
> > > Regards,
> > > Sonam Chauhan
> > > --
> > > Electronic Commerce, Corporate Express Australia
> > Ltd.
> > > Phone: +61-2-9335-0725, Email:
> > sonam.chauhan@ce.com.au
> > >
> > >
> > > > -----Original Message-----
> > > > From: Michael Stover
> > [mailto:mstover1@apache.org]
> > > > Sent: Tuesday, 26 April 2005 11:25 PM
> > > > To: jmeter-user@jakarta.apache.org
> > > > Subject: Re: Regression Testing w/ JMeter
> > > >
> > > > It would be hard - there could be dozens or even
> > hundreds of characters
> > > > that need to be escaped else they'll be treated
> > as funky regular
> > > > expression signifiers.
> > > >
> > > > -Mike
> > > >
> > > > On Tue, 2005-04-26 at 11:18 +0100, sebb wrote:
> > > > > Clever idea - should work.
> > > > > But it is harder to make work than
> > removing/replacing the variable
> > > > > bits as you are finding!
> > > > >
> > > > > The modifiers such as (?m) and (?s) do work in
> > JMeter.
> > > > >
> > > > > Note that these can change the meaning of ".",
> > ^ $ etc
> > > > >
> > > > > The Regex Tester might help here.
> > > > >
> > > > > S.
> > > > > On 4/26/05, Sonam Chauhan wrote:
> > > > > > > Or one could develop a new Assertion.
> > > > > > >
> > > > > > > You might still need to add a way to edit
> > the responses to remove
> > > > the
> > > > > > > variable data.
> > > > > >
> > > > > > Sebb and Keith - I tried something similar
> > with plain response
> > > > assertions
> > > > > > and regexs... my intention was to get JMeter
> > to act as a rudimentary
> > > > diff
> > > > > > facility (it just signals if something is
> > different), but I may have
> > > > run
> > > > > > into a limitation the regex support.
> > > > > >
> > > > > > The usual way to use Response Assertions is
> > setting snippets of text
> > > > (which
> > > > > > may have regexs) in an assertion. JMeter
> > then tries to match the
> > > > response
> > > > > > body (or headers) against it.
> > > > > >
> > > > > > Is it possible to assert a suitably
> > processed multiline document? I
> > > > was
> > > > > > thinking of something like this:
> > > > > >
> > > > > > 1. Take the _entire_ body response from a
> > server
> > > > > > 2. Replace the variable bits with suitable
> > regular expressions
> > > > > > 3. Quote any other regex metacharacters
> > > > > > 4. Take the text processed this way, and set
> > it as a JMeter response
> > > > > > assertion
> > > > > >
> > > > > > I tried doing this - JMeter lets me paste in
> > this multi-line text
> > > into
> > > > the
> > > > > > assertion textbox with no problems, but try
> > as I might, I could not
> > > it
> > > > to
> > > > > > work. I also tried using Perl5 extended
> > regular expressions of
> > > > multiline
> > > > > > matching - i.e., instead of /abc/m, I set
> > the assertion to (?m)abc -
> > > > but no
> > > > > > go.
> > > > > >
> > > > > > I'd like your thoughts on this issue.
> > > > > >
> >
> === message truncated ===
> 
> 
> ---------------------------------------------------------------------
> 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


Mime
View raw message