jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Raghav, Pushpendra" <Pushpendra.Rag...@marsh.com>
Subject Not able to parameterize File Path\Name
Date Tue, 22 Aug 2017 19:29:59 GMT
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.
**********************************************************************

Mime
  • Unnamed multipart/related (inline, None, 0 bytes)
View raw message