jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: Counter within a loop
Date Fri, 19 Sep 2008 00:30:43 GMT
On 28/08/2008, Nadav Samet <thesamet@gmail.com> wrote:
> That's weird.
>
>  So I was trying to debug what's going on. It seems like HTTPSamplerBase
>  caches the file list, so it's not aware that the filenames should change
>  between subsequent iterations. In HTTPSamplerBase around line 1548:
>
>         if (fileList != null){
>             return fileList;
>         }
>
>  When I comment the above lines out, I am getting a fresh value in each
>  iteration. Any ideas?

I think the cache was added to save the possibly expensive process of
regenerating the list.  Unfortunately any variables are resolved when
the list is created.

This obviously needs to be revisited.

>
>  -Nadav
>
>
>
>  On Fri, Aug 22, 2008 at 1:50 PM, Nadav Samet <thesamet@gmail.com> wrote:
>
>  > I have tried this against both 2.3.2 and trunk. I have attached a minimal
>  > example in which this problem occurs.
>  >
>  > I've discovered that if I add an additional file to the sampler, then the
>  > counter will work right on the second file, but is frozen on the initial
>  > value for the first file. Perhaps this bug popped up after the HTTPFileArgs
>  > feature had been introduced?
>  >
>  > -Nadav
>  >
>  >
>  > On Thu, Aug 21, 2008 at 8:35 PM, Ryan Miling <rmiling@bzzagent.com> wrote:
>  >
>  >> I cannot reproduce this error. I set-up my test plan exactly like yours
>  >> and was able to send the files
>  >> 'myfile0.txt','myfile1.txt',...,'myfile9.txt' along with the HTTP
>  >> Request. Like you, I had done this...
>  >>
>  >> + Thread Group
>  >> ++ Loop Controller
>  >> +++ Counter
>  >> +++ HTTP Request
>  >> +++ Debug Sampler
>  >> ++ View Results Tree
>  >>
>  >> ...except I threw on a Debug Sampler and View Results Tree to see what
>  >> was going on. You do have the most recent version of JMeter, correct?
>  >>
>  >>
>  >> > -----Original Message-----
>  >> > From: Nadav Samet [mailto:thesamet@gmail.com]
>  >> > Sent: Thursday, August 21, 2008 3:24 PM
>  >> > To: jmeter-user@jakarta.apache.org
>  >> > Subject: Counter within a loop
>  >> >
>  >> > Hi there,
>  >> >
>  >> > I am trying to create a loop that each iteration would initiate a
>  >> request.
>  >> > One field in the request (the file to send) varies with each
>  >> iteration.
>  >> >
>  >> > This is how I set it up:
>  >> >
>  >> > + ThreadGroup
>  >> > ++ Loop controller      (Loop Count = 10)
>  >> > +++ Counter  (Start=0, increment=1, max=100000, reference name=index)
>  >> > +++ Request   (Send files with the request: myfile${index}).txt)
>  >> >
>  >> > It turns out that it does loop 10 times, but it sends myfile0.txt on
>  >> all
>  >> > iterations, instead of the different 10 files I've prepared. Does it
>  >> do
>  >> > the
>  >> > string interpolation on the file name too early? What's the right way
>  >> to
>  >> > do
>  >> > it?
>  >> >
>  >> > --
>  >> > Thanks,
>  >> > Nadav
>  >>
>  >> ---------------------------------------------------------------------
>  >> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
>  >> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>  >>
>  >>
>  >
>  >
>  > --
>  > Sincerely yours,
>  > Nadav
>  >
>

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