You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Mark Hanford <ma...@hanfordonline.co.uk> on 2014/10/09 17:10:43 UTC

Problem when looping through multiple CSV lists of URLs

Hi, folks. I'm pretty new at JMeter, so apologies if this is either a daft
question, or I'm approaching the whole idea from the wrong angle.

I have a list of about 1000 URLs in our product that I need to hit and
measure. They are from various areas of the product, so it doesn't make
sense to compare them all as a single set, so they have been split into 10
files of ~100 URLs each.

I would like (I think) a bunch of threads to start up, and hit all 1000
pages, but I want each "HTTP Request" to have it's own name to distinguish
between them.

I've tried using a While Controller, which works for the first list, but it
never runs any subsequent ones:

Test Plan
    Thread Group
        While Controller
                CSV Data Set Config - data-a.csv
                HTTP Request - "Data A"
        While Controller
                CSV Data Set Config - data-b.csv
                HTTP Request - "Data B"

All the links in Data A are processed, and the results look good, but
nothing is ever run in Data B.

Thanks,

Mark

Re: Problem when looping through multiple CSV lists of URLs

Posted by sebb <se...@gmail.com>.
On 9 October 2014 17:27, Mark Hanford <ma...@hanfordonline.co.uk> wrote:
> Wow - your first suggestion didn't even cross my mind and would solve the
> immediate problem - the CSV even has that data in it already...
>
> For the second, I'm not entirely sure yet. I think what I'd actually like
> to do is test those 1000 URLs randomly, not in the order they're in the
> file, so the whole app is being hit all the time, multiple times.

In which case why not randomise the file before starting the test?

> I'll check the logs too.
>
> Thanks
> Mark
>
> On 9 October 2014 17:23, Deepak Shetty <sh...@gmail.com> wrote:
>
>> >but I want each "HTTP Request" to have it's own name to distinguish
>> between them.
>> Keep a single file - put the name as part of file (so name,url) and use
>> ${name} in your HTTP request name
>>
>> >I've tried using a While Controller, which works for the first list, but
>> it never runs any subsequent ones:
>> Probably you need to see jmeter.log - probably you have an infinte loop -
>> adding a debug sampler  +view results tree helps to see what is happening.
>> However this is probably not what you want to do right? Do you want all
>> URLs of Data A to complete before you move onto Data B?
>>
>> regards
>> deepak
>>
>>
>> On Thu, Oct 9, 2014 at 8:10 AM, Mark Hanford <ma...@hanfordonline.co.uk>
>> wrote:
>>
>> > Hi, folks. I'm pretty new at JMeter, so apologies if this is either a
>> daft
>> > question, or I'm approaching the whole idea from the wrong angle.
>> >
>> > I have a list of about 1000 URLs in our product that I need to hit and
>> > measure. They are from various areas of the product, so it doesn't make
>> > sense to compare them all as a single set, so they have been split into
>> 10
>> > files of ~100 URLs each.
>> >
>> > I would like (I think) a bunch of threads to start up, and hit all 1000
>> > pages, but I want each "HTTP Request" to have it's own name to
>> distinguish
>> > between them.
>> >
>> > I've tried using a While Controller, which works for the first list, but
>> it
>> > never runs any subsequent ones:
>> >
>> > Test Plan
>> >     Thread Group
>> >         While Controller
>> >                 CSV Data Set Config - data-a.csv
>> >                 HTTP Request - "Data A"
>> >         While Controller
>> >                 CSV Data Set Config - data-b.csv
>> >                 HTTP Request - "Data B"
>> >
>> > All the links in Data A are processed, and the results look good, but
>> > nothing is ever run in Data B.
>> >
>> > Thanks,
>> >
>> > Mark
>> >
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org


Re: Problem when looping through multiple CSV lists of URLs

Posted by Mark Hanford <ma...@hanfordonline.co.uk>.
Wow - your first suggestion didn't even cross my mind and would solve the
immediate problem - the CSV even has that data in it already...

For the second, I'm not entirely sure yet. I think what I'd actually like
to do is test those 1000 URLs randomly, not in the order they're in the
file, so the whole app is being hit all the time, multiple times.

I'll check the logs too.

Thanks
Mark

On 9 October 2014 17:23, Deepak Shetty <sh...@gmail.com> wrote:

> >but I want each "HTTP Request" to have it's own name to distinguish
> between them.
> Keep a single file - put the name as part of file (so name,url) and use
> ${name} in your HTTP request name
>
> >I've tried using a While Controller, which works for the first list, but
> it never runs any subsequent ones:
> Probably you need to see jmeter.log - probably you have an infinte loop -
> adding a debug sampler  +view results tree helps to see what is happening.
> However this is probably not what you want to do right? Do you want all
> URLs of Data A to complete before you move onto Data B?
>
> regards
> deepak
>
>
> On Thu, Oct 9, 2014 at 8:10 AM, Mark Hanford <ma...@hanfordonline.co.uk>
> wrote:
>
> > Hi, folks. I'm pretty new at JMeter, so apologies if this is either a
> daft
> > question, or I'm approaching the whole idea from the wrong angle.
> >
> > I have a list of about 1000 URLs in our product that I need to hit and
> > measure. They are from various areas of the product, so it doesn't make
> > sense to compare them all as a single set, so they have been split into
> 10
> > files of ~100 URLs each.
> >
> > I would like (I think) a bunch of threads to start up, and hit all 1000
> > pages, but I want each "HTTP Request" to have it's own name to
> distinguish
> > between them.
> >
> > I've tried using a While Controller, which works for the first list, but
> it
> > never runs any subsequent ones:
> >
> > Test Plan
> >     Thread Group
> >         While Controller
> >                 CSV Data Set Config - data-a.csv
> >                 HTTP Request - "Data A"
> >         While Controller
> >                 CSV Data Set Config - data-b.csv
> >                 HTTP Request - "Data B"
> >
> > All the links in Data A are processed, and the results look good, but
> > nothing is ever run in Data B.
> >
> > Thanks,
> >
> > Mark
> >
>

Re: Problem when looping through multiple CSV lists of URLs

Posted by Deepak Shetty <sh...@gmail.com>.
>but I want each "HTTP Request" to have it's own name to distinguish
between them.
Keep a single file - put the name as part of file (so name,url) and use
${name} in your HTTP request name

>I've tried using a While Controller, which works for the first list, but
it never runs any subsequent ones:
Probably you need to see jmeter.log - probably you have an infinte loop -
adding a debug sampler  +view results tree helps to see what is happening.
However this is probably not what you want to do right? Do you want all
URLs of Data A to complete before you move onto Data B?

regards
deepak


On Thu, Oct 9, 2014 at 8:10 AM, Mark Hanford <ma...@hanfordonline.co.uk>
wrote:

> Hi, folks. I'm pretty new at JMeter, so apologies if this is either a daft
> question, or I'm approaching the whole idea from the wrong angle.
>
> I have a list of about 1000 URLs in our product that I need to hit and
> measure. They are from various areas of the product, so it doesn't make
> sense to compare them all as a single set, so they have been split into 10
> files of ~100 URLs each.
>
> I would like (I think) a bunch of threads to start up, and hit all 1000
> pages, but I want each "HTTP Request" to have it's own name to distinguish
> between them.
>
> I've tried using a While Controller, which works for the first list, but it
> never runs any subsequent ones:
>
> Test Plan
>     Thread Group
>         While Controller
>                 CSV Data Set Config - data-a.csv
>                 HTTP Request - "Data A"
>         While Controller
>                 CSV Data Set Config - data-b.csv
>                 HTTP Request - "Data B"
>
> All the links in Data A are processed, and the results look good, but
> nothing is ever run in Data B.
>
> Thanks,
>
> Mark
>