I should also have said - I don't know how many urls/user-agents will be
in the suite necessarily, as the suite is being constantly updated.  Is
there any way to loop through the files with an unknown number of
urls/user-agents?

Thanks

Simon

-----Original Message-----
From: sebb [mailto:[EMAIL PROTECTED] 
Sent: 26 September 2007 15:50
To: JMeter Users List
Subject: Re: iterating through 2 data sets

Still does not work, because the url will remain set to <EOF> once
reached as there is nothing to change it.

As I said, JMeter cannot reset the file back to the beginning, so you
need to work round this - see my suggestions.

It might help to know what you are trying to test - perhaps there is a
better way of coding it.

On 26/09/2007, Simon Brown <[EMAIL PROTECTED]> wrote:
> Hi Sebb,
>
> Many thanks for your response.  Sorry - I made a mistake in the
> pseudocode - for every url in file 2 there should be a request made
for
> every header in file 1!
>
> It should be:
>
> String header, url;
> header = readFromCSV(file1);
> url = readFromCSV(file2);
>
> while (header != "<EOF>")
> {
>      while (url != "<EOF>")
>      {
>                HTTPRequest(header, url);
>                url = readFromCSV(file2);
>      }
>        header = readFromCSV(file1);
> }
>
> Regards,
>
> Simon
>
>
>
> -----Original Message-----
> From: sebb [mailto:[EMAIL PROTECTED]
> Sent: 26 September 2007 14:54
> To: JMeter Users List
> Subject: Re: iterating through 2 data sets
>
> On 26/09/2007, Simon Brown <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> >
> >
> > I'm having problems with a while loop within a while loop, doing the
> > following (written in pseudocode):
> >
> >
> >
> > String header, url;
> >
> > header = readFromCSV(file1);
> >
> > url = readFromCSV(file2);
> >
> >
> >
> > while (header != "<EOF>")
> >
> > {
> >
> >            while (url != "<EOF>")
> >
> >            {
> >
> >                        HTTPRequest(header, url);
> >
> >            }
> >
> > }
> >
> >
> >
> > Is there any way to do something equivalent in JMeter?  I currently
> > cannot get it to loop through all the urls and all the headers.  Am
I
> > missing something?
>
> It looks as though the header and url are only read once.
>
> Also presumably the url loop needs to be reset for each header?
>
> It's not possible to "reset" a file reader in JMeter, though you can
> loop through a file repeatedly. If you know how many entries there are
> (or what the last one is) you can construct a loop around that.
>
> BTW, the Java Request sampler is good for testing - it does not need a
> server, and you can include any variable names you like in the label
> or response data etc.
>
> >
> > Thanks,
> >
> >
> >
> > Simon
> >
> >
>
> ---------------------------------------------------------------------
> 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]


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

Reply via email to