You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by danimni <da...@gmail.com> on 2012/01/22 14:29:42 UTC

Can one 'CSV Data Set Config' point, via a vriable, to another CSV file location?

Hi All,
I have a question regarding 'CSV Data Set Config'.
Can one 'CSV Data Set Config' point, via a vriable, to another CSV file
location?
I have this test, where I would like to run it several time, each time with
different 'CSV data set config'.
So, I've created the first 'CSV Data Set Config', where one of the variables
is "SECOND_CSV_LOCATION".
And for the second 'CSV Data Set Config', in the 'Filename' field, I set
${SECOND_CSV_LOCATION}.
This way, I don't have to open the jmeter GUI each time I need to change the
second CSV file location.
For example
First CSV gets the following values:
Filename: c:\jmeter\MyTest\FirstCSVFile
Variable Names: Host,Port,SECOND_CSV_LOCATION

where 'SECOND_CSV_LOCATION' gets "c:\jmeter\MyTest\SecondCSVFile1" OR
"c:\jmeter\MyTest\SecondCSVFile2"

Second CSV gets the following values:
Filename: ${SECOND_CSV_LOCATION}
Variable Names: Username,Password

I hope my explanations are clear.. :)

Thanks in advanced,
Dan.

--
View this message in context: http://jmeter.512774.n5.nabble.com/Can-one-CSV-Data-Set-Config-point-via-a-vriable-to-another-CSV-file-location-tp5164044p5164044.html
Sent from the JMeter - User mailing list archive at Nabble.com.

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


Re: Can one 'CSV Data Set Config' point, via a vriable, to another CSV file location?

Posted by J <ga...@gmail.com>.
Hi

Using variables you cab point the csv anywhere you want to ..

Also ( the shite way ) can use a regexp. On the jmx file ..

On 22 Jan 2012, at 13:29, danimni <da...@gmail.com> wrote:

> Hi All,
> I have a question regarding 'CSV Data Set Config'.
> Can one 'CSV Data Set Config' point, via a vriable, to another CSV file
> location?
> I have this test, where I would like to run it several time, each time with
> different 'CSV data set config'.
> So, I've created the first 'CSV Data Set Config', where one of the variables
> is "SECOND_CSV_LOCATION".
> And for the second 'CSV Data Set Config', in the 'Filename' field, I set
> ${SECOND_CSV_LOCATION}.
> This way, I don't have to open the jmeter GUI each time I need to change the
> second CSV file location.
> For example
> First CSV gets the following values:
> Filename: c:\jmeter\MyTest\FirstCSVFile
> Variable Names: Host,Port,SECOND_CSV_LOCATION
> 
> where 'SECOND_CSV_LOCATION' gets "c:\jmeter\MyTest\SecondCSVFile1" OR
> "c:\jmeter\MyTest\SecondCSVFile2"
> 
> Second CSV gets the following values:
> Filename: ${SECOND_CSV_LOCATION}
> Variable Names: Username,Password
> 
> I hope my explanations are clear.. :)
> 
> Thanks in advanced,
> Dan.
> 
> --
> View this message in context: http://jmeter.512774.n5.nabble.com/Can-one-CSV-Data-Set-Config-point-via-a-vriable-to-another-CSV-file-location-tp5164044p5164044.html
> Sent from the JMeter - User mailing list archive at Nabble.com.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org
> 

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


Re: Can one 'CSV Data Set Config' point, via a vriable, to another CSV file location?

Posted by danimni <da...@gmail.com>.
Thanks you, Sebb.
I will give it a try... :)

--
View this message in context: http://jmeter.512774.n5.nabble.com/Can-one-CSV-Data-Set-Config-point-via-a-vriable-to-another-CSV-file-location-tp5164044p5433381.html
Sent from the JMeter - User mailing list archive at Nabble.com.

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


Re: Can one 'CSV Data Set Config' point, via a vriable, to another CSV file location?

Posted by sebb <se...@gmail.com>.
On 22 January 2012 13:29, danimni <da...@gmail.com> wrote:
> Hi All,
> I have a question regarding 'CSV Data Set Config'.
> Can one 'CSV Data Set Config' point, via a vriable, to another CSV file
> location?
> I have this test, where I would like to run it several time, each time with
> different 'CSV data set config'.
> So, I've created the first 'CSV Data Set Config', where one of the variables
> is "SECOND_CSV_LOCATION".
> And for the second 'CSV Data Set Config', in the 'Filename' field, I set
> ${SECOND_CSV_LOCATION}.
> This way, I don't have to open the jmeter GUI each time I need to change the
> second CSV file location.
> For example
> First CSV gets the following values:
> Filename: c:\jmeter\MyTest\FirstCSVFile
> Variable Names: Host,Port,SECOND_CSV_LOCATION
>
> where 'SECOND_CSV_LOCATION' gets "c:\jmeter\MyTest\SecondCSVFile1" OR
> "c:\jmeter\MyTest\SecondCSVFile2"
>
> Second CSV gets the following values:
> Filename: ${SECOND_CSV_LOCATION}
> Variable Names: Username,Password
>
> I hope my explanations are clear.. :)

No need to use CSV to read the variable.

Just pass the file name on the command line as a property:

jmeter -JCSVNAME=xxxxx

and then use ${__P(CSVNAME)} in the filename field.

Or you can define the property in user.properties.


> Thanks in advanced,
> Dan.
>
> --
> View this message in context: http://jmeter.512774.n5.nabble.com/Can-one-CSV-Data-Set-Config-point-via-a-vriable-to-another-CSV-file-location-tp5164044p5164044.html
> Sent from the JMeter - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org
>

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