jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Simon Brown" <Simon.Br...@openwave.com>
Subject RE: iterating through 2 data sets
Date Wed, 26 Sep 2007 14:20:23 GMT
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:sebbaz@gmail.com] 
Sent: 26 September 2007 14:54
To: JMeter Users List
Subject: Re: iterating through 2 data sets

On 26/09/2007, Simon Brown <Simon.Brown@openwave.com> 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: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


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