jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Felix Schumacher <>
Subject Re: Not able to parameterize File Path\Name
Date Fri, 25 Aug 2017 19:13:21 GMT

the list strips off images quite regularly, so we can't see, what you 
have done. Try to describe your test case in words.

Am 22.08.2017 um 21:29 schrieb Raghav, Pushpendra:
> 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.
I guess, that the property gets read, before the beanshell sets prop. 
You might want to look at the __log function, that logs the return value 
of some expression, before it passes it on. So try ${__log(__P(..))}.

> 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.
> **********************************************************************

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