'How to upload the multiple zip files to FTP Server(FileZilla) Using SFTP Sampler in JMeter

I am upload the single zip file at a time to FTP Server if I increases the thread number to 5 it will runs five times but I can see only one in the FTP server



Solution 1:[1]

If you're uploading the same file to the same folder - the previous version will be replaced by the most recent version so your 5 threads are writing to the same file and you're seeing the result of the latest upload only.

The solution would be to use different file names for different threads using __threadNum() function like:

enter image description here

this way the files will appear as:

somefile-1.zip
somefile-2.zip
etc.

so the current thread number will be added to the filename

However on subsequent executions the files again will be replaced so you can use unique names using __UUID() function like:

somefile-${__UUID}.zip

this way you will get filenames looking like:

somefile-0f573e42-c93a-4952-8378-2bdd34b44019.zip

Check out Apache JMeter Functions - An Introduction article for more information on JMeter Functions concept.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Dmitri T