You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by jmeter list <jm...@yahoo.com> on 2007/02/10 00:00:28 UTC

using csv to drive a test

Hi All,
  How do I use a csv file to drive a test. 
  I want to do something like this
  +for every line (or some other separator) 
      -do something
  I'm using "CSV Data Set Config" element and able to read the first line, but what should I do to make the test iterate through the file? Its probably a combo of loop controllers and the csv config but I cant think of the way how they connect the two...
   
  here is a sample file im trying this with (i can access value for line 1 but it doesn’t iterate)
   
  1,
  2,
  3,
  4,
  5
   
  Whats the trick?
   
   
  Thanks in advance,
  Ken
   
   
  ps. I know how to do it all through beanshell (read in the file and iterate through each line updating loop variables, etc) but wondering if there is an easier way through the use of existing components...
   

 
---------------------------------
Never Miss an Email
Stay connected with Yahoo! Mail on your mobile. Get started!

Re: using csv to drive a test

Posted by sebb <se...@gmail.com>.
Test Plan
+ Thread Group
+ + CSV Dataset
+ + Sampler using the variable

The CSV Dataset reads the next line every time it needs to - i.e. at
the start of the loop for each thread.

I
On 09/02/07, jmeter list <jm...@yahoo.com> wrote:
> Hi All,
>  How do I use a csv file to drive a test.
>  I want to do something like this
>  +for every line (or some other separator)
>      -do something
>  I'm using "CSV Data Set Config" element and able to read the first line, but what should I do to make the test iterate through the file? Its probably a combo of loop controllers and the csv config but I cant think of the way how they connect the two...
>
>  here is a sample file im trying this with (i can access value for line 1 but it doesn't iterate)
>
>  1,
>  2,
>  3,
>  4,
>  5
>
>  Whats the trick?
>
>
>  Thanks in advance,
>  Ken
>
>
>  ps. I know how to do it all through beanshell (read in the file and iterate through each line updating loop variables, etc) but wondering if there is an easier way through the use of existing components...
>
>
>
> ---------------------------------
> Never Miss an Email
> Stay connected with Yahoo! Mail on your mobile. Get started!

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