Jmeter ftp requests with different file names

2019-07-26 04:08发布

问题:

I am new to the jmeter. I prepared some jmeter scripts to move file from local directory to remote ftp directory. I have succeeded doing this by using jmeter FTP sampler. Now I am facing a challenge in changing the filename every time before I put it in remote directory. I want to process multiple ftp requests with different file names.

Is there any way that I can change the filename in every FTP request before moving to FTP request. jmeter version 2.13.

Thanks, Ajeesh

回答1:

Do you have a test plan that looks something like the following?

If you right click on "FTP Request" in the tree in the pane on the left, you can select "Duplicate" to add another FTP request as part of this test plan.

You can change the remote / local file in the pane on the right for the newly added FTP request.



回答2:

You could use an csv configuration element, this talks about the same problem but for http.

First you need to add an FTP sampler:

And you need to load the file names from a csv configuration file:

.

It will use a CSV entry per each iteration, it will replace the name by the variable ${files}.