Something I've done is I have a While Controller, then inside the While
Controller I have a CSV Data File.  I then have a stub/plug value in the
last record of the CSV Data File.  The stub/plug value is read into a
variable that I test for within the While Controller.

Here's the snippet of the JMX file...

        <org.apache.jmeter.control.WhileController>
          <stringProp
name="TestElement.gui_class">org.apache.jmeter.control.gui.WhileControll
erGui</stringProp>
          <stringProp
name="TestElement.test_class">org.apache.jmeter.control.WhileController<
/stringProp>
          <stringProp name="TestElement.name">While
Controller</stringProp>
          <boolProp name="TestElement.enabled">true</boolProp>
          <stringProp
name="WhileController.condition">${__javaScript(&quot;${id-bug}&quot;!=&
quot;999999&quot;,dummy)}</stringProp>
        </org.apache.jmeter.control.WhileController>
        <hashTree>
          <CSVDataSet>
            <stringProp name="delimiter">|</stringProp>
            <stringProp
name="TestElement.gui_class">org.apache.jmeter.testbeans.gui.TestBeanGUI
</stringProp>
            <stringProp
name="TestElement.test_class">org.apache.jmeter.config.CSVDataSet</strin
gProp>
            <stringProp
name="variableNames">userid-001,passwd-001,id-project,id-bug,access-leve
l</stringProp>
            <stringProp
name="TestElement.name">mantis-view-issues</stringProp>
            <boolProp name="TestElement.enabled">true</boolProp>
            <stringProp
name="filename">projects-issues-001.txt</stringProp>
          </CSVDataSet>
          <hashTree/>

And here's a snippet of the CSV Data File...

<snip>
Brown, Chris|xxxxxxxx|146|18193|55
Brown, Chris|xxxxxxxx|146|24241|55
Brown, Chris|xxxxxxxx|146|24242|55
stub, plug|xxxxxxxx|146|999999|55
</snip>
 
So, checking the WhileController.condition above, you can see I simply
test for the 999999 value in the id-bug variable...Also, I use a "|"
delimiter instead of the usual comma...


hth,


Adym Lincoln
I/S Corporate - I/S Internal Applications
603-245-8245
Ext : 58245
[EMAIL PROTECTED]

...
It's a bug planet...it's an ugly planet...ever feel like your software
project is going in the wrong direction.
...


-----Original Message-----
From: sebb [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 17, 2006 6:10 AM
To: JMeter Users List
Subject: Re: increment in While Controller

So how do you know when to stop?

S.
On 17/02/06, Aliaksandr Yermakovich <[EMAIL PROTECTED]>
wrote:
>
> I cannot use Loop controller, because I don't know how many steps will
be.
>
> Best regards,
> Alex Y.
> -----Original Message-----
> From: sebb [mailto:[EMAIL PROTECTED]
> Sent: Thursday, February 16, 2006 6:45 PM
> To: JMeter Users List
> Subject: Re: increment in While Controller
>
> On 16/02/06, Richard Gaywood <[EMAIL PROTECTED]> wrote:
> > On 2/16/06, Aliaksandr Yermakovich <[EMAIL PROTECTED]>
> wrote:
> > >
> > > Could somebody tell me, how too create and use a variable and
increase
> it
> > > each
> > > loop in While Controller? Like:
> > >
> > > while ( foo=="true")
>
> BTW, this is not a valid  expression for the While Controller - see
the
> docs...
>
> > >           i++;
> > > );
> >
> >
> >
> > Look at the Counter pre-processor. Try adding it to a While loop.
> >
> >
>
> Or why not use a Loop Controller with a variable count?
>
> Loop N times
> - Counter 1 ... anything > N
> - Sampler
>
> S
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to