jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Friedl, Justin" <JFri...@cdgnow.com>
Subject RE: Foreach loops with groups
Date Tue, 06 Sep 2005 22:11:53 GMT
Here's what I have:

Regular Expression Extractor

reference name: synopticDataIn
Regex: .*sendRequest\((\d+),(\d+), '(\d+-\d+).*
template: $1$
Match No.: -1
Default Value: fout

ForEach controller
Input variable prefix: synopticDataIn
Output variable name: synopticDataOut
Add "_" before number: checked

then looking at the request tab in the view Results Tree the parameters
become:
${synopticDataIn_1_g1} becomes 11479239
${synopticDataIn_1_g2} becomes 1529
${synopticDataOut_g1} becomes ${synopticDataOut_g1}
${synopticDataOut} becomes 11479239
${synopticDataOut_1_g1} becomes ${synopticDataOut_1_g1}
${synopticDataOut_g1} becomes ${synopticDataOut_g1}


if I switch the template to $0$
${synopticDataOut} becomes <a id="a_1" href="#"
onClick="processLoading(parent.parent.searchResults);
sendRequest(11479239,1529, '21-00');
parent.parent.swapFrame('searchResults');">
${synopticDataIn_1_g1} becomes 11479239
${synopticDataIn_1_g2} becomes 1529

I cannot figure out the proper syntax.  I thought ${synopticDataOut_g1}
should work.  Any ideas? Examples?

Thanks in advance,
Justin



-----Original Message-----
From: sebb [mailto:sebbaz@gmail.com] 
Sent: Wednesday, August 31, 2005 4:09 PM
To: JMeter Users List
Subject: Re: Foreach loops with groups


Yes, the foreach loop won't start if the first variable is missing.

What do your Regex and ForEach test elements look like now?

S.
On 31/08/05, Friedl, Justin <JFriedl@cdgnow.com> wrote:
> Thanks. I tried this.  Now it won't even go into the foreach loop. My 
> guess is it's because the foreach input var doesn't match the regex 
> reference name.
> 
> 
> 
> 
> 
> -----Original Message-----
> From: sebb [mailto:sebbaz@gmail.com]
> Sent: Wednesday, August 31, 2005 10:21 AM
> To: JMeter Users List
> Subject: Re: Foreach loops with groups
> 
> 
> Try
> 
> ForEach:
> Input:    RegexVar_g
> Output: outputVar
> Add '-':  unchecked
> 
> and refer to
> 
> ${outputVar}
> 
> S.
> On 31/08/05, Friedl, Justin <JFriedl@cdgnow.com> wrote:
> > I have a regular expression that returns three groups: 
> > .*sendRequest\((\d+),(\d+), '(\d+-\d+).* I then have a foreach 
> > controller in which I map input var "inputVar" to output var 
> > "outputVar" with the "add '_' before number" checked.
> >
> > How can I access variables in a sample controller within the foreach 
> > loop? I've tried: 
> > ${outputVar_g1},${outputVar_1},${outputVar1},${outputVarg1},${output
> > Va
> > r_g1_1
> > },${outputVar_1_g1}
> > Nothing seems to work.   The result view tree shows the sample is being
> > called but the params output the literals and don't seem to replace the
> > variables with values.
> >
> > I'm using jmeter 2.1 and I see in the changes that "ForEach 
> > Controller can now loop through sets of groups" was fixed in 2.0.3
> >
> > I'm sure I'm missing something simple.
> >
> > Thanks in advance,
> > Justin
> >
> >
> >
> 
> ---------------------------------------------------------------------
> 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



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