jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carl Nygaard (カール)" <carl...@gmail.com>
Subject JMeter __regexFunction
Date Fri, 07 Jul 2006 01:28:29 GMT
I have faith in JMeter; I just know there is some way to do this.

I'm trying to do an http post request.  The post is based on a form
that can have a variable number of parameters.  These parameters are
caused by html like this:

<select name="p" multiple id="p">  <option value="a"
selected>a</option>  <option value="b" selected>b</option> ...

Note that everything is on one line.  I would like to match every one
of the possible values in the form and submit them as selected.

I hunted through the mailing list archives and found that the
__regexFunction is a handy way to get around the problem of not having
a variable number of parameters.  So I made this up:

${__regexFunction(<option value="([^"]*)" selected>,p=$1$,ALL,&,,variableName)}

My hope was that this would result in the expression:

p=a&p=b

which could be added (with some trickery) to the parameter list of the
request.  What i get is this:

p=a

It only matches ONE of the expressions, not all of them.  I assume it
is because they are all on the same line, but despite my attempts to
use fancier regular expressions, I simply can't get it to match all of
them.  Does anyone have any ideas how to do this?

Thanks,
Carl

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