jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Deepak Shetty <shet...@gmail.com>
Subject Re: Loop controller question
Date Mon, 22 Jun 2009 19:52:45 GMT
Youll have to use beanshell(or equivalent scripts) as far as I know.
the above approach works if you had to use the templated version as is.and
since you want to find the individual groups , it wont work directly

I would try something like
Sampler
   Regex extractor
For Each
  Sampler
     Bean shell preproc
        get the groups and set it as you want into the sampler using add
argument

You could if you want specify template like $1$~$2$~$4$ and parse it based
on the ~(or whatever delimiter) which keeps your beanshell fairly simple.
Various ways you can do the same thing above (e.g. maintain an index in the
loop and use one of the __ functions to get the group value)

regards
deepak


On Mon, Jun 22, 2009 at 12:25 PM, Stromas, Aaron (NIH/OD) [C] <
stromasam@od.nih.gov> wrote:

> Hello again,
>
> I'm running into a problem with this approach: my RE picks up several
> matching groups and the RE Extractor template looks something like this:
> $1$$2$$4$$5$. I was hoping to use the ForEach controller with an Http
> Request sampler, where the sampler has parameters whose values are the
> results of the RE match. If I define the Reference Name in RE Extractor as
> tuple, I was hoping to use the match results in assigning parameters as
> follows:
>
> Name         Value
> -------------------
> ID           ${tuple_g1}
> Type         ${tuple_g2}
>
> But it turns out I need the loop index as part of the parameter value
> designator:
>
> Name         Value
> -------------------
> ID           ${tuple_1_g1}
> Type         ${tuple_1_g2}
>
> This defeats the whole rational of using the ForEach controller. Am missing
> something again? TIA.
>
> -a
>
> -----Original Message-----
> From: Deepak Shetty [mailtosssss:shettyd@gmail.com<mailtosssss%3Ashettyd@gmail.com>
> ]
> Sent: Monday, June 22, 2009 2:31 PM
> To: JMeter Users List
> Subject: Re: Loop controller question
>
> Hi
> you can with a ForEach Controller
> In Match no specify -1 for the Regex extractor
> Use a Foreach controller and in the input variable prefix specify the
> reference name of the RegEx extractor
> regards
> deepak
>
> On Mon, Jun 22, 2009 at 11:13 AM, Stromas, Aaron (NIH/OD) [C] <
> stromasam@od.nih.gov> wrote:
>
> > Greetings,
> >
> > Is it possible to use the outcome of Regular Expression Post-processor,
> > namely, the number of matches to govern the number of loop executions? I
> > suspect not but would like to know for sure. TIA.
> >
> > -a
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message