jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Roughan <rough...@yahoo.com.au>
Subject RE: How to parse responses
Date Tue, 03 Aug 2004 05:19:39 GMT
Thanks for the response Sebastian.

I think the suggestion will work well for the first
part of my requirement:
> I want to extract the value of id from the form
> section where the text includes cat. e.g. 54

However, I don't think it will work for this second
part:
> Further, if id= does not exist within the form 
> section where the text includes cat, then return
> false or similar.

e.g. If the response was like this:

<form>
blah blah dog blah blah id=32 blah blah
</form>
<form>
blah blah cat blah blah noid blah blah
</form>
<form>
blah blah horse blah blah id=15 blah blah
</form>

in this case I think the suggested regexp would return
15?

I was thinking that ForEach may assist if I actually
had to go through a list of extracted values (e.g. dog
id=32, cat id=54, horse id=15). However this may not
be necessary.

Cheers,
Andrew

 --- "BAZLEY, Sebastian"
<sebastian.bazley@atosorigin.com> wrote: 
> Try a regex of the form
> 
> <sp>cat<sp>.*?id=(\d+)<sp>
> 
> where <sp> = space.
> 
> You don't say how you want to use the id value, so
> it is not clear whether
> the ForEach controller would be useful or not.
> 
> See the JMeter Wiki for a pointer to a very useful
> regex tester.
> 
> S.
> -----Original Message-----
> From: Andrew Roughan [mailto:roughana@yahoo.com.au]
> Sent: 22 July 2004 13:30
> To: jmeter-user@jakarta.apache.org
> Subject: How to parse responses
> 
> 
> Hi, Can someone please tell me whether what I want
> to
> do is possible, and if it is, give a suggestion on
> how
> it can be done?
> 
> If I have a HTML response similar to
> 
> ...
> <form>
>  blah blah dog blah blah id=32 blah blah
> </form>
> <form>
>  blah blah cat blah blah id=54 blah blah
> </form>
> <form>
>  blah blah horse blah blah id=15 blah blah
> </form>
> ...
> 
> I want to extract the value of id from the form
> section where the text includes cat. e.g. 54
> 
> Further, if id= does not exist within the form 
> section where the text includes cat, then return
> false
> or similar.
> 
> I've looked at Regular Expression Extractor (using
> <form.*?</form as a start) and the ForEach
> Controller
> and but I haven't yet worked out how this could be
> done. If this is possible, I sure would like a
> pointer
> on how to go about it. If it isnt, knowing that
> would
> be good too!
> 
> Thanks,
> Andrew
> 
> Find local movie times and trailers on Yahoo!
> Movies.
> http://au.movies.yahoo.com
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> jmeter-user-help@jakarta.apache.org
> 
> 
>
_______________________________________________________
> 
> This e-mail and the documents attached are
> confidential and intended
> solely for the addressee; it may also be privileged.
> If you receive this
> e-mail in error, please notify the sender
> immediately and destroy it.
> As its integrity cannot be secured on the Internet,
> the Atos Origin group
> liability cannot be triggered for the message
> content. Although the
> sender endeavours to maintain a computer virus-free
> network, the
> sender does not warrant that this transmission is
> virus-free and will
> not be liable for any damages resulting from any
> virus transmitted. 
>
_______________________________________________________
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> jmeter-user-help@jakarta.apache.org
> 
>  

Find local movie times and trailers on Yahoo! Movies.
http://au.movies.yahoo.com

---------------------------------------------------------------------
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