Re: Programmatic access to thread group loop count

2011-07-22 Thread sebb
On 22 July 2011 21:12, E S wrote: > Okay, I see what you mean now. For the sake of posterity, I'll explain it in > a little more detail. I defined a variable on the test plan, as you said, > called LOOPS. Then in the Thread Group I set the value in the "Loop Count" > box to ${LOOPS}. Then in the c

Re: Programmatic access to thread group loop count

2011-07-22 Thread E S
Okay, I see what you mean now. For the sake of posterity, I'll explain it in a little more detail. I defined a variable on the test plan, as you said, called LOOPS. Then in the Thread Group I set the value in the "Loop Count" box to ${LOOPS}. Then in the code, when I want to access this value I use

Re: Programmatic access to thread group loop count

2011-07-21 Thread sebb
Define a variable for the loop count on the Test Plan. Use that wherever you want to know the loop count. On 21 July 2011 23:59, E S wrote: > Can you expound on that a little? I'm not sure I follow. > > On Thu, Jul 21, 2011 at 4:09 PM, sebb wrote: > >> Another way to do this would be to use a v

Re: Programmatic access to thread group loop count

2011-07-21 Thread E S
Can you expound on that a little? I'm not sure I follow. On Thu, Jul 21, 2011 at 4:09 PM, sebb wrote: > Another way to do this would be to use a variable for the loop count. > > On 21 July 2011 20:25, E S wrote: > > FYI, it looks like this can be done with the following code within a > > sample

Re: Programmatic access to thread group loop count

2011-07-21 Thread sebb
Another way to do this would be to use a variable for the loop count. On 21 July 2011 20:25, E S wrote: > FYI, it looks like this can be done with the following code within a > sampler: > > Controller ctrl = > getThreadContext().getThreadGroup().getSamplerController(); > LoopController loopCtrl =

Re: Programmatic access to thread group loop count

2011-07-21 Thread E S
FYI, it looks like this can be done with the following code within a sampler: Controller ctrl = getThreadContext().getThreadGroup().getSamplerController(); LoopController loopCtrl = (LoopController)ctrl; int loopCount = loopCtrl.getLoops(); The getSamplerController() method returns a reference to

Programmatic access to thread group loop count

2011-07-19 Thread E S
I have a custom sampler that I'm writing. Is it possible to programmatically access the thread group's loop count from within the sampler? I can do the following: this.getThreadContext().getThreadGroup() >From that I can get the thread group name, comments, and number of threads but I don't see a