On 14 May 2015 at 17:34, Andrey Pokhilko <[email protected]> wrote:
> Hi,
>
> Through my investigations of file uploads in JMeter I found that Post
> Files do not use FileServer, thus unable to work correctly with paths
> relative to JMX location. Or maybe I misunderstand the functionality of
> FileServer. But it states in the class doc:
>
> For instance, putting supporting files in the same directory as
> * the saved test plan file allows users to refer to the file with just it's
> * name - this FileServer class will find the file without a problem.
>
> I see good value in this feature of paths relative to JMX location.
> Otherwise it is quite painful to operate test plans with resource files.
> One more thing is that CSV Data Set works fine because it uses
> FileServer, so we're inconsistent: one component works with files in one
> way, another works other way...
>
> My questions:
>
>  1. Is there intentional reason not to use FileServer in HTTP Sampler?

The FileServer class was originally designed for JMeter-specific
files, rather than data files used by samplers.
This is why it was not used for HTTP POST files.

>  2. Or should I implement usage for it?

Having said that, I suppose it might be useful to use it for such
files, so long as the default behaviour is consistent.
I.e. JMeter must continue to check the current location first. If the
file is not found, then it could check other locations.

This will be a behavioural change, so should be carefully noted in the docs.
However I don't think it will change the output of a test unless the
new code finds a file where the old code did not, AND it was
intentional not to find the file.
This seems an unlikely scenario to want to test - it is a test of
JMeter rather than of any server.

> --
> Andrey Pokhilko
>

Reply via email to