You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by "Raghav, Pushpendra" <Pu...@marsh.com> on 2017/08/22 19:32:25 UTC

RE: Not able to parameterize File Path\Name

Hi , [Just made correction in 2nd point.]

I read many blogs and article which suggest that path of a CSV Data file can be parameterized to pick a different file in run time.

They suggest doing following way :


1.       Create  Beanshell sampler and add this code in it : - props.put("path","/apache-jmeter-3.2/Data/accountID.csv");

2.       Use ${__P("path")} to replace value of path in "Filename" text box of CSV Data set config.  [just corrected this statement]


But I get an error in logs : File 1 must exist and be readable. Some times I get message that File path must exist and be readable.

Overall looks like _P function  is not successfully replacing value of path with the value assigned in Beanshell sampler. Can you please help if I am using wrong syntax or if there should be any other better way to parameterize Filename ?

Thanks
Pushpendra Singh Raghav



From: Raghav, Pushpendra
Sent: Tuesday, August 22, 2017 3:30 PM
To: user@jmeter.apache.org
Subject: Not able to parameterize File Path\Name

Hi ,

I read many blogs and article which suggest that path of a CSV Data file can be parameterized to pick a different file in run time.

They suggest doing following way :


1.       Create  Beanshell sampler and add this code in it : - props.put("path","/apache-jmeter-3.2/Data/accountID.csv");

2.       Use ${__P(vars.get("path"))} to replace value of path in "Filename" text box of CSV Data set config.

[cid:image001.png@01D31B5A.A887B930]

But I get an error in logs : File 1 must exist and be readable. Some times I get message that File path must exist and be readable.

Overall looks like _P function  is not successfully replacing value of path with the value assigned in Beanshell sampler. Can you please help if I am using wrong syntax or if there should be any other better way to parameterize Filename ?

Thanks
Pushpendra Singh Raghav



________________________________


**********************************************************************
This e-mail transmission and any attachments that accompany it may
contain information that is privileged, confidential or otherwise
exempt from disclosure under applicable law and is intended solely for
the use of the individual(s) to whom it was intended to be addressed.
If you have received this e-mail by mistake, or you are not the
intended recipient, any disclosure, dissemination, distribution,
copying or other use or retention of this communication or its
substance is prohibited. If you have received this communication in
error, please immediately reply to the author via e-mail that you
received this message by mistake and also permanently delete the
original and all copies of this e-mail and any attachments from your
computer. Thank you.
**********************************************************************

________________________________


**********************************************************************
This e-mail transmission and any attachments that accompany it may
contain information that is privileged, confidential or otherwise
exempt from disclosure under applicable law and is intended solely for
the use of the individual(s) to whom it was intended to be addressed.
If you have received this e-mail by mistake, or you are not the
intended recipient, any disclosure, dissemination, distribution,
copying or other use or retention of this communication or its
substance is prohibited. If you have received this communication in
error, please immediately reply to the author via e-mail that you
received this message by mistake and also permanently delete the
original and all copies of this e-mail and any attachments from your
computer. Thank you.
**********************************************************************