You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Fulvio Guglielmelli <fu...@yahoo.it> on 2007/10/04 11:23:26 UTC
JAVA REQUEST - ${__CSVRead and NEXT VALUE
Hi,
i have a JAVA REQUEST class with parameter
a | ${__CSVRead(try.csv,0)}
whei i run the test, into the java class it always read the first ROW of try.csv file.
Into the log i saw jmeter read the next value i don't know how take it to be use.
I tried to use
a | ${__CSVRead(try.csv,next)}
a | ${__CSVRead(try.csv,next())}
or into the java class class
params.addArgument("a", "${__CSVRead(try.csv.csv,next())}");
but Jmeter return null value
I can make in way
1) Using a loop Controller
2) Using a ${__counter(,)}
My problem is: HOW CAN I PASS THE counter VALUE TO THE JAVA CLASS and use it in CSVRead?
Could you help me?
FULVIO
---------------------------------
---------------------------------
L'email della prossima generazione? Puoi averla con la nuova Yahoo! Mail
Re: JAVA REQUEST - ${__CSVRead and NEXT VALUE
Posted by sebb <se...@gmail.com>.
That's by design - CSVRead will always start a new line for each new
thread, but will only start a new line within a thread if the thread
uses next.
Otherwise how would JMeter know if the thread had finished reading
columns from the row?
On 18/10/2007, neetu kulshrestha <na...@gmail.com> wrote:
> as per my experience with jmeter. if I use loop then it always takes first
> row but if I use threads then it takes the next value. Don't know if its by
> design or a bug
>
> On 10/4/07, Fulvio Guglielmelli <fu...@yahoo.it> wrote:
> >
> > Hi,
> > i have a JAVA REQUEST class with parameter
> > a | ${__CSVRead(try.csv,0)}
> > whei i run the test, into the java class it always read the first ROW of
> > try.csv file.
> >
> > Into the log i saw jmeter read the next value i don't know how take it to
> > be use.
> > I tried to use
> > a | ${__CSVRead(try.csv,next)}
> > a | ${__CSVRead(try.csv,next())}
> > or into the java class class
> > params.addArgument("a", "${__CSVRead(try.csv.csv,next())}");
> >
> > but Jmeter return null value
> > I can make in way
> > 1) Using a loop Controller
> > 2) Using a ${__counter(,)}
> > My problem is: HOW CAN I PASS THE counter VALUE TO THE JAVA CLASS and
> > use it in CSVRead?
> >
> > Could you help me?
> > FULVIO
> >
> >
> >
> > ---------------------------------
> >
> > ---------------------------------
> > L'email della prossima generazione? Puoi averla con la nuova Yahoo! Mail
>
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: JAVA REQUEST - ${__CSVRead and NEXT VALUE
Posted by neetu kulshrestha <na...@gmail.com>.
as per my experience with jmeter. if I use loop then it always takes first
row but if I use threads then it takes the next value. Don't know if its by
design or a bug
On 10/4/07, Fulvio Guglielmelli <fu...@yahoo.it> wrote:
>
> Hi,
> i have a JAVA REQUEST class with parameter
> a | ${__CSVRead(try.csv,0)}
> whei i run the test, into the java class it always read the first ROW of
> try.csv file.
>
> Into the log i saw jmeter read the next value i don't know how take it to
> be use.
> I tried to use
> a | ${__CSVRead(try.csv,next)}
> a | ${__CSVRead(try.csv,next())}
> or into the java class class
> params.addArgument("a", "${__CSVRead(try.csv.csv,next())}");
>
> but Jmeter return null value
> I can make in way
> 1) Using a loop Controller
> 2) Using a ${__counter(,)}
> My problem is: HOW CAN I PASS THE counter VALUE TO THE JAVA CLASS and
> use it in CSVRead?
>
> Could you help me?
> FULVIO
>
>
>
> ---------------------------------
>
> ---------------------------------
> L'email della prossima generazione? Puoi averla con la nuova Yahoo! Mail
Re: JAVA REQUEST - ${__CSVRead and NEXT VALUE
Posted by sebb <se...@gmail.com>.
On 04/10/2007, Fulvio Guglielmelli <fu...@yahoo.it> wrote:
> Hi,
> i have a JAVA REQUEST class with parameter
> a | ${__CSVRead(try.csv,0)}
> whei i run the test, into the java class it always read the first ROW of try.csv file.
Because you have not used next()
The following should work:
${__CSVRead(try.csv,0)}${__CSVRead(try.csv,next)}
But the CSV Dataset element is much easier to use.
> Into the log i saw jmeter read the next value i don't know how take it to be use.
> I tried to use
> a | ${__CSVRead(try.csv,next)}
> a | ${__CSVRead(try.csv,next())}
> or into the java class class
> params.addArgument("a", "${__CSVRead(try.csv.csv,next())}");
>
> but Jmeter return null value
> I can make in way
> 1) Using a loop Controller
> 2) Using a ${__counter(,)}
> My problem is: HOW CAN I PASS THE counter VALUE TO THE JAVA CLASS and use it in CSVRead?
> Could you help me?
What are you trying to achieve?
I don't understand what the counter has got to do with CSVRead.
> FULVIO
>
>
>
> ---------------------------------
>
> ---------------------------------
> L'email della prossima generazione? Puoi averla con la nuova Yahoo! Mail
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org