Hello Tong,
The documentation you have mentioned is relative to output file not to
input file CSV, CSV Data Set Config use relative path to jmx file but not
in distributed mode. In distributed mode you can use this value to get
relative path even on slave node, "${__BeanShell(import
org.apache.jmeter.services.FileServer;
FileServer.getFileServer().getBaseDir();)}"
[image: image.png]
Best regards
On Wed, Oct 5, 2022 at 4:06 PM Tong Sun <[email protected]> wrote:
> Hi,
>
> According to JMeter doc:
>
> JMeter also supports paths relative to the directory containing the current
> > test plan (JMX file). If the path name begins with "~/" (or whatever is
> > in the jmeter.save.saveservice.base_prefix JMeter property), then the
> > path is assumed to be relative to the JMX file location.
> >
> However, when I tried to put "~/" before
>
>
> - my include script, or
> - my CSV data file
>
>
> Both cases would fail, with the latter giving the error messages of:
>
> java.lang.IllegalArgumentException: Could not read file header line
> for file ~/Data/xxx.csv at
> org.apache.jmeter.services.FileServer.reserveFile(FileServer.java:283)
> ~[ApacheJMeter_core.jar:5.5] at
> org.apache.jmeter.config.CSVDataSet.initVars(CSVDataSet.java:216)
> ~[ApacheJMeter_components.jar:5.5] at
> org.apache.jmeter.config.CSVDataSet.iterationStart(CSVDataSet.java:171)
> ~[ApacheJMeter_components.jar:5.5] at
>
> org.apache.jmeter.control.GenericController.fireIterationStart(GenericController.java:399)
> ~[ApacheJMeter_core.jar:5.5]
>
>
> I'd really love to have "~/" to cover the above two cases as well.
>
> Would that make sense? thx.
>
--
Cordialement,
-------------
Anas OUFDOU