FTP Request

JMeter – FTP Request

An FTP request sampler must be added to the JMeter script so that Apache JMeter can support the FTP protocol in addition to the HTTP and HTTPS protocols. This post will help you understand how to use JMeter to script FTP, FTPS, and SFTP test plans.

Why are FTP tests crucial?

FTP servers must be load tested to determine capacity, measure performance, and assess the effects of heavy load over an extended period of time when transferring small, medium, and large files.

How to add the “FTP Request” element?

Follow the steps below:

  1. Select ‘Test Plan’
  2. Right-click on ‘Test Plan’
  3. Mouse over ‘Add’
  4. Move your mouse over ‘Thread Group (Users)’
  5. Click ‘Thread Pool’
  6. Right-click on ‘Thread Pool’
  7. Mouse over ‘Add’
  8. Move your mouse over ‘Sample’Click β€˜FTP Request’
JMeter - FTP Request

What are the ‘FTP Request’ element’s input fields?

1. Name: to name the element

2. Leave any comments random.

3. FTP server hostname or IP address, whichever is available. This is the server where you need to download or upload the material. If you already specified it in the FTP Request Default element, you don’t need to do it again.

4. Port: The port number for the FTP server. Unless another port is specified, the

5. The default port of the FTP server is 21. If you already specified it in the default FTP request element, you don’t need to do it again.

6. External File: The URL of the file to be downloaded or used as the destination path for uploading a file to the FTP server.

7. Local File: The location of the file being uploaded to the FTP server or where the remote file is stored locally and where JMeter is now running.

8. Local File Content – When the file is uploaded, the content of the source file can be specified using this entry.

9. Choose to download the file from the FTP server with get(RETR).

10. Choose to upload the file to the FTP server with put(STOR).

11. Whether to use “binary” mode for file transfers while using binary mode. Uncheck this box if you are downloading/uploading plain text files; otherwise, leave it checked Sign in under all circumstances

Some vital tips

FTP requests should be used in the thread pool

Add a test plan item called FTP Request Default where the FTP server name or IP address is specified.

Instead of using “FTP Request Default”, enter values for Remote File and Local File in the “FTP Request” field.

Some typical HTTP 550 (invalid file path) and HTTP 530 (invalid credential) errors

Scroll to Top