How To Create FTP Test Plan in JMeter

Use JMeter for FTP Testing (both Get and Put)

About File Transfer Protocol

File Transfer Protocol is a widely used standard network protocol for FIle sharing between a client and server in the same network. FTP Server functions with a TCP/IP network. All the client connections are established by switching ON an FTP server.

We are using FileZilla which is a free open source FTP and FTPS server for file sharing.

You can download the FileZilla Client from this link. It is straightforward to configure FileZilla to use a certain FTP server. Let’s see how to test FTP upload and download using Apache JMeter and FileZilla.

(A) Adding FTP Request Sampler

1
Add Thread Group

blank

Go to Jmeter and add a Thread Group to your Test Plan. Right, Click on Test Plan and Click Add>Threads(Users)>Thread Group.

2
Add FTP Request Sampler

blank

Add an FTP Request Sampler. Right-click on the created Thread group and click Add>Sampler>FTP Request.

3
Configure FTP Request

blank

In the opened window, you can use your FTP server username and password. But I am using a publicly available FTP server for this demonstration. You can find the username and password form this link. Find the server called “ftp.swfwmd.state.fl.us” and “anonymous” as username and an email address as the password. Give your server name for the “Server Name or IP” section and fill “Username” and “Password” with your user name and password for the server.

We have to select “get(RETR)”  as we first try to download a file from the server.

(B) Create and Run FTP GET Request

4
Select Remote File

blank

We have to give the file location address to the “Remote File” section. To get the file location, I used FileZilla. Open FileZilla and fill “Host,” “username,” and “password” with your server address, username, and password provided.

Now you would be able to see the server file locations under the “Remote site” section. I have selected the “README.txt” file in the server to download.

5
Obtain Remote File URL

blank

Select the file’s address that you want to download by Right click >Copy URL(s) to clipboard.

6
Update GET Request

blank

Paste it on the Remote File section in JMeter and remove the server address as it has mentioned in the Server name section. Then copy the destination location on your local computer from FileZilla and paste it on the Local File section in JMeter. Give a file name to save your file. I have given the title as ABC.txt.

blank

7
Add Listeners for Capturing Result

blank

Add a “View Results Tree” listener and “View Results in Table” listener to view your test results.

8
Run FTP Request and Verify Results

blank

Now click “Start” to run your project and observe the results in listeners. If you have successfully run the components, you can see the results below.

blank

You can also refresh the FileZilla window and check whether the created file appears in the specified directory.

blank

(C) Create and Run FTP POST Request

For running FTP POST via JMeter, you would essentially run the same above steps except changing some parameters and commands in your request which would be different from GET request.

9
Create FTP Request Sampler

Create an FTP Request Sampler and fill it with the same details as in the previous sampler. Hence you can follow the above steps from 1 To 3 to create FTP Sampler in JMeter and then follow the below steps to configure a POST request instead of GET request.

Alternatively, you can use your existing FTP Post Plan which you prepared using the above steps, and just convert it into a POST test plan by making changes in itself. Both the options are easy peasy!

10
Update POST Request for Local

blank

I have selected the downloaded file ABC.txt to upload. So the “Local File” location is unchanged. Select a compatible directory in the FTP server to store your data using FileZilla. I have selected a directory in the “/pub/incoming” folder. Verify your results as in the previous section.

11
Select FTP PUT Command

blank

We have to change the get(RETR) to put(STOR) for posting a file.

Also you can use binary mode over ASCII mode by clicking “Use binary Mode”. You can also view a preview of your file by clicking “Save File in Response?”.

12
Run FTP Request and Verify Results

blank

Response Data section shows the response data, and it is a better way to check the accuracy of your downloaded file.

We can test the performance of our FTP Servers as in the above instructions. JMeter is one of the best applications for it.

Tushar Sharma
Tushar Sharmahttps://www.automationdojos.com
Hi! This is Tushar, the author of 'Automation Dojos'. A passionate IT professional with a big appetite for learning, I enjoy technical content creation and curation. Hope you are having a good time! Don't forget to subscribe and stay in touch. Wishing you happy learning!

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Recent Posts

RELATED POSTS

Getting Started with Apache JMeter

1. Introduction As a developer, you may have tested the functionality of your code hundreds of times during development. This is known as functional testing....

How To Do API Testing with JMeter

Introduction Application Programming Interface is a very popular term among developers. It is simply a request provider that responds to your request. In other words,...

Working with JMeter Listeners

About Listeners Listeners are used for displaying test results in JMeter. Listeners allow system engineers to analyze the responses from the testing system and monetize...

How To Do Database Testing with JMeter

Introduction In this 'How-To', You will be guided to perform a database load test using JMeter. We will be installing Apache JMeter to perform the...

Â

RECENT 'HOW-TO'

How To Install Oh-My-Posh On Windows PowerShell

Oh-My-Posh is a powerful custom prompt engine for any shell that has the ability to adjust the prompt string with a function or variable. It does not...

MORE ON CODEX

FEATURED PROJECTS

Windows JDK Manager (win-jdk-Manager)

ADjo LABS PROJECT : Simple and lightweight desktop utility with Interactive cmd Interface for easy view, re-point and switching between JAVA versions on windows. Demonstrating the capability...

MORE IN THIS CATEGORY

Getting Started with Apache JMeter

1. Introduction As a developer, you may have tested the functionality of your code hundreds of times during development. This is known as functional testing....

How To Add SSH Private Keys to Eclipse

One of the common use cases for accessing Git repositories on Github is authentication via SSH keys. This offers a secure way of working...

How To Convert String To Date in Java

Introduction There are often scenarios in programming, where you will need to convert a date in String format to an actual Date object. For example,...

Getting Started With Atlassian Jira

Jira is one of the best software used for agile development. It is built for a better team contribution and to deliver an amazing...

CHECKOUT TUTORIALS

Desired Capabilities in Selenium Web Driver

1. Desired Capabilities in Selenium The performance of a Web application may vary according to different browsers and operating systems. Hence to ship out a...

Working with JMeter Listeners

- Advertisement -spot_img