You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by em...@t-online.de on 2008/05/03 20:03:37 UTC
new CSV data set per thread or per loop?
Hi *,
after reading
http://www.mail-archive.com/jmeter-user@jakarta.apache.org/msg09521.html
I was under the impression that any thread would get a new line of input at the
beginning of every new loop, or am I misreading the following:
"The CSV Data Set element will read the next line from the file at the
start of each loop; different threads will automatically get different
lines from the file."
But it seems I can't get it right. My setup looks like this
Thread Group: x threads with y loops
+ CSV Data Set: var1;var2;..;varN
+ JavaSamplerClient:
Parameter configuration for the sampler class
var of class1 var1
var of class1 var2
...
var of classN varN
+ Save response to file
+ Summary report
+ View results in tables
What I see in this scenario is that all of the x threads initially read a
single line which is reused for all of the y loops. The csv file contains more
than x*y line of valid input so no problem on this part and as expected when
using z = x*y threads with 1 loop it works fine. Unfortunately the number of
requests planned for this test is > 100.000 which most probably can't be
approached with a 1 loop/thread configuration.
Any idea what is going wrong?
Thanks
Michael
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: new CSV data set per thread or per loop?
Posted by em...@t-online.de.
sebb schrieb:
> 2008/5/3 <em...@t-online.de>:
>> sebb schrieb:
>>
>>
>> > 2008/5/3 <em...@t-online.de>:
>> >
>> > > Hi *,
>> > >
>> > > after reading
>> > >
>> > >
>> http://www.mail-archive.com/jmeter-user@jakarta.apache.org/msg09521.html
>> > >
>> > > I was under the impression that any thread would get a new line of
>> input at
>> > > the beginning of every new loop, or am I misreading the following:
>> > >
>> > > "The CSV Data Set element will read the next line from the file at the
>> > > start of each loop; different threads will automatically get different
>> > > lines from the file."
>> > >
>> > >
>> >
>> > You need to tell CSVRead when it has finished with reading columns
>> > from the line.
>> >
>> > Add a call of the form:
>> >
>> > ${__CSVRead(file,next)}
>> >
>> > to any variable definition (it returns the empty string).
>> >
>>
>> Thanks for your super quick response!
>
> Sorry, that was rubbish. I was confusing CSVRead function with CSV Dataset.
>
> You don't need to do anything to make CSV Dataset move to the next line.
>
>> And forgive me my stupidity but I don't get it to work.
>
> Because the advice was wrong, sorry.
>
>> In my CVS Data Set Config the filename is set to order.csv. As soon as I
>> add
>>
>> ${__CSVRead(order.cvs,next)}
>>
>> or
>>
>> ${__CSVRead("order.cvs",next)}
>>
>> I get this
>>
>> 2008/05/03 20:45:35 INFO - jmeter.services.FileServer: Stored: order.csv
>> 2008/05/03 20:45:35 WARN - jmeter.functions.FileWrapper: endRow(): no
>> entry for order.csv
>
> Yes, because that was an incorrect solution...
But at least it got me going:-) I changed my test to use CVSRead instead of the
CVS Data Set config element but still no success. So I did some more
investigation and found out that I hadn't read the right part of the
documentation and falsely concluded that my setupTest method would get called
for any iteration of any thread. If I had followed the link to the
JavaSamplerClient I would have spotted this
"When the test is started, setupTest() will be called on each thread's
JavaSamplerClient instance to initialize the client. Then runTest() will be
called for each iteration of the test..."
After moving the handling of the dynamic "per iteration" parameters to runTest
either way worked fine. So, sorry for the noise.
>>
>>
>> >
>> > > But it seems I can't get it right. My setup looks like this
>> > >
>> > > Thread Group: x threads with y loops
>> > > + CSV Data Set: var1;var2;..;varN
>
> OK
>
>> > > + JavaSamplerClient:
>
> What is the Java Sampler Client?
> I'm not sure I know this one.
Bad wording on my part, I meant what the documentation calls "java object
request" sampler, my AbstractJavaSamplerClient subclass implementing the test.
Thanks,
Michael
>> > > Parameter configuration for the sampler class
>> > > var of class1 var1
>> > > var of class1 var2
>> > > ...
>> > > var of classN varN
>> > > + Save response to file
>> > > + Summary report
>> > > + View results in tables
>> > >
>> >
>>
>> The next part of my question is where I have to put the line(s) exactly.
>> You meant in the "Send Parameters With the Request" section of Java Request?
>> I tried the following
>>
>>
>> + CSV Data Set: var1;var2;..;varN
>> + JavaSamplerClient:
>> Parameter configuration for the sampler class
>> var of class1 ${var1}
>> var of class2 ${var2}
>> ...
>> var of classN ${varN} ${__CSVRead(order.cvs,next)}
>>
>> and
>>
>>
>> + CSV Data Set: var1;var2;..;varN
>> + JavaSamplerClient:
>> Parameter configuration for the sampler class
>> var of class1 ${var1} ${__CSVRead(order.cvs,next)}
>> var of class2 ${var2} ${__CSVRead(order.cvs,next)}
>> ...
>> var of classN ${varN} ${__CSVRead(order.cvs,next)}
>>
>> As I'm not sure which variable definition you were referring, I tried also
>>
>> + CSV Data Set: var1;var2;..;varN;${__CSVRead(order.cvs,next)}
>>
>> + JavaSamplerClient:
>> Parameter configuration for the sampler class
>> var of class1 ${var1}
>> var of class2 ${var2}
>> ...
>> var of classN ${varN}
>>
>> But nothing changed besides the WARN log entry.
>> Sorry for bugging you with such stupid questions - but please, save my
>> day:-)
>>
>> Thanks again
>> Michael
>>
>>
>>
>>
>> >
>> > > What I see in this scenario is that all of the x threads initially read
>> a
>> > > single line which is reused for all of the y loops. The csv file
>> contains
>> > > more than x*y line of valid input so no problem on this part and as
>> expected
>> > > when using z = x*y threads with 1 loop it works fine. Unfortunately the
>> > > number of requests planned for this test is > 100.000 which most
>> probably
>> > > can't be approached with a 1 loop/thread configuration.
>> > >
>> > > Any idea what is going wrong?
>> > >
>> > > Thanks
>> > > Michael
>> > >
>> > > ---------------------------------------------------------------------
>> > > 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
>> >
>> >
>> >
>>
>>
>> ---------------------------------------------------------------------
>> 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
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: new CSV data set per thread or per loop?
Posted by sebb <se...@gmail.com>.
2008/5/3 <em...@t-online.de>:
> sebb schrieb:
>
>
> > 2008/5/3 <em...@t-online.de>:
> >
> > > Hi *,
> > >
> > > after reading
> > >
> > >
> http://www.mail-archive.com/jmeter-user@jakarta.apache.org/msg09521.html
> > >
> > > I was under the impression that any thread would get a new line of
> input at
> > > the beginning of every new loop, or am I misreading the following:
> > >
> > > "The CSV Data Set element will read the next line from the file at the
> > > start of each loop; different threads will automatically get different
> > > lines from the file."
> > >
> > >
> >
> > You need to tell CSVRead when it has finished with reading columns
> > from the line.
> >
> > Add a call of the form:
> >
> > ${__CSVRead(file,next)}
> >
> > to any variable definition (it returns the empty string).
> >
>
> Thanks for your super quick response!
Sorry, that was rubbish. I was confusing CSVRead function with CSV Dataset.
You don't need to do anything to make CSV Dataset move to the next line.
> And forgive me my stupidity but I don't get it to work.
Because the advice was wrong, sorry.
> In my CVS Data Set Config the filename is set to order.csv. As soon as I
> add
>
> ${__CSVRead(order.cvs,next)}
>
> or
>
> ${__CSVRead("order.cvs",next)}
>
> I get this
>
> 2008/05/03 20:45:35 INFO - jmeter.services.FileServer: Stored: order.csv
> 2008/05/03 20:45:35 WARN - jmeter.functions.FileWrapper: endRow(): no
> entry for order.csv
Yes, because that was an incorrect solution...
>
>
> >
> > > But it seems I can't get it right. My setup looks like this
> > >
> > > Thread Group: x threads with y loops
> > > + CSV Data Set: var1;var2;..;varN
OK
> > > + JavaSamplerClient:
What is the Java Sampler Client?
I'm not sure I know this one.
> > > Parameter configuration for the sampler class
> > > var of class1 var1
> > > var of class1 var2
> > > ...
> > > var of classN varN
> > > + Save response to file
> > > + Summary report
> > > + View results in tables
> > >
> >
>
> The next part of my question is where I have to put the line(s) exactly.
> You meant in the "Send Parameters With the Request" section of Java Request?
> I tried the following
>
>
> + CSV Data Set: var1;var2;..;varN
> + JavaSamplerClient:
> Parameter configuration for the sampler class
> var of class1 ${var1}
> var of class2 ${var2}
> ...
> var of classN ${varN} ${__CSVRead(order.cvs,next)}
>
> and
>
>
> + CSV Data Set: var1;var2;..;varN
> + JavaSamplerClient:
> Parameter configuration for the sampler class
> var of class1 ${var1} ${__CSVRead(order.cvs,next)}
> var of class2 ${var2} ${__CSVRead(order.cvs,next)}
> ...
> var of classN ${varN} ${__CSVRead(order.cvs,next)}
>
> As I'm not sure which variable definition you were referring, I tried also
>
> + CSV Data Set: var1;var2;..;varN;${__CSVRead(order.cvs,next)}
>
> + JavaSamplerClient:
> Parameter configuration for the sampler class
> var of class1 ${var1}
> var of class2 ${var2}
> ...
> var of classN ${varN}
>
> But nothing changed besides the WARN log entry.
> Sorry for bugging you with such stupid questions - but please, save my
> day:-)
>
> Thanks again
> Michael
>
>
>
>
> >
> > > What I see in this scenario is that all of the x threads initially read
> a
> > > single line which is reused for all of the y loops. The csv file
> contains
> > > more than x*y line of valid input so no problem on this part and as
> expected
> > > when using z = x*y threads with 1 loop it works fine. Unfortunately the
> > > number of requests planned for this test is > 100.000 which most
> probably
> > > can't be approached with a 1 loop/thread configuration.
> > >
> > > Any idea what is going wrong?
> > >
> > > Thanks
> > > Michael
> > >
> > > ---------------------------------------------------------------------
> > > 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
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> 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
Re: new CSV data set per thread or per loop?
Posted by em...@t-online.de.
sebb schrieb:
> 2008/5/3 <em...@t-online.de>:
>> Hi *,
>>
>> after reading
>>
>> http://www.mail-archive.com/jmeter-user@jakarta.apache.org/msg09521.html
>>
>> I was under the impression that any thread would get a new line of input at
>> the beginning of every new loop, or am I misreading the following:
>>
>> "The CSV Data Set element will read the next line from the file at the
>> start of each loop; different threads will automatically get different
>> lines from the file."
>>
>
> You need to tell CSVRead when it has finished with reading columns
> from the line.
>
> Add a call of the form:
>
> ${__CSVRead(file,next)}
>
> to any variable definition (it returns the empty string).
Thanks for your super quick response!
And forgive me my stupidity but I don't get it to work.
In my CVS Data Set Config the filename is set to order.csv. As soon as I add
${__CSVRead(order.cvs,next)}
or
${__CSVRead("order.cvs",next)}
I get this
2008/05/03 20:45:35 INFO - jmeter.services.FileServer: Stored: order.csv
2008/05/03 20:45:35 WARN - jmeter.functions.FileWrapper: endRow(): no entry
for order.csv
>> But it seems I can't get it right. My setup looks like this
>>
>> Thread Group: x threads with y loops
>> + CSV Data Set: var1;var2;..;varN
>> + JavaSamplerClient:
>> Parameter configuration for the sampler class
>> var of class1 var1
>> var of class1 var2
>> ...
>> var of classN varN
>> + Save response to file
>> + Summary report
>> + View results in tables
The next part of my question is where I have to put the line(s) exactly. You
meant in the "Send Parameters With the Request" section of Java Request?
I tried the following
+ CSV Data Set: var1;var2;..;varN
+ JavaSamplerClient:
Parameter configuration for the sampler class
var of class1 ${var1}
var of class2 ${var2}
...
var of classN ${varN} ${__CSVRead(order.cvs,next)}
and
+ CSV Data Set: var1;var2;..;varN
+ JavaSamplerClient:
Parameter configuration for the sampler class
var of class1 ${var1} ${__CSVRead(order.cvs,next)}
var of class2 ${var2} ${__CSVRead(order.cvs,next)}
...
var of classN ${varN} ${__CSVRead(order.cvs,next)}
As I'm not sure which variable definition you were referring, I tried also
+ CSV Data Set: var1;var2;..;varN;${__CSVRead(order.cvs,next)}
+ JavaSamplerClient:
Parameter configuration for the sampler class
var of class1 ${var1}
var of class2 ${var2}
...
var of classN ${varN}
But nothing changed besides the WARN log entry.
Sorry for bugging you with such stupid questions - but please, save my day:-)
Thanks again
Michael
>> What I see in this scenario is that all of the x threads initially read a
>> single line which is reused for all of the y loops. The csv file contains
>> more than x*y line of valid input so no problem on this part and as expected
>> when using z = x*y threads with 1 loop it works fine. Unfortunately the
>> number of requests planned for this test is > 100.000 which most probably
>> can't be approached with a 1 loop/thread configuration.
>>
>> Any idea what is going wrong?
>>
>> Thanks
>> Michael
>>
>> ---------------------------------------------------------------------
>> 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
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: new CSV data set per thread or per loop?
Posted by sebb <se...@gmail.com>.
2008/5/3 <em...@t-online.de>:
> Hi *,
>
> after reading
>
> http://www.mail-archive.com/jmeter-user@jakarta.apache.org/msg09521.html
>
> I was under the impression that any thread would get a new line of input at
> the beginning of every new loop, or am I misreading the following:
>
> "The CSV Data Set element will read the next line from the file at the
> start of each loop; different threads will automatically get different
> lines from the file."
>
You need to tell CSVRead when it has finished with reading columns
from the line.
Add a call of the form:
${__CSVRead(file,next)}
to any variable definition (it returns the empty string).
> But it seems I can't get it right. My setup looks like this
>
> Thread Group: x threads with y loops
> + CSV Data Set: var1;var2;..;varN
> + JavaSamplerClient:
> Parameter configuration for the sampler class
> var of class1 var1
> var of class1 var2
> ...
> var of classN varN
> + Save response to file
> + Summary report
> + View results in tables
>
> What I see in this scenario is that all of the x threads initially read a
> single line which is reused for all of the y loops. The csv file contains
> more than x*y line of valid input so no problem on this part and as expected
> when using z = x*y threads with 1 loop it works fine. Unfortunately the
> number of requests planned for this test is > 100.000 which most probably
> can't be approached with a 1 loop/thread configuration.
>
> Any idea what is going wrong?
>
> Thanks
> Michael
>
> ---------------------------------------------------------------------
> 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