Javatpoint Logo
Javatpoint Logo

JMeter FTP Test Plan

In this section, we shall learn how to create a basic test plan to test a FTP site.

For our test purpose we will use a publically available FTP location, which we can use to test download of a file. You can use any available demo FTP location present in the market. For our test we are using a FTP location present under the URL: https://dlptest.com/ftp-test/

The following image shows the webpage which will open when we hit the above mentioned URL.


JMeter FTP Test Plan
  • Click on the URL present under the FTP Test section.
  • It will redirect to its login page where we have to fill the login credentials.
  • User Name : [email protected]
  • Password : eiTqR7EMZD5zy7M

JMeter FTP Test Plan

The following image shows the directory level structure under the given FTP location.


JMeter FTP Test Plan

Now, we will create a Test Plan to test download of a file using the same FTP location.

Create JMeter Test Plan

  • Go to your JMeter bin folder and double click on the ApacheJMeter.jar file to launch JMeter interface.
  • Click on the Test Plan node.
  • Rename this test plan node as DemoFTPtest.
  • Select the DemoFTPtest node and right click on the selected item.
  • Mouse hover on "Add" option, then elements list will be displayed.
  • Select Threads (Users) > Thread Group.

Modify the following properties of the thread group:

  • Name - FTPusers
  • Number of Threads (Users)- 4
  • Ramp-Up Period - leave the default value (1).
  • Loop Count- 1

JMeter FTP Test Plan

Add Sampler

  • Select the FTPusers element (Thread Group) and right click on the selected item.
  • Mouse hover on "Add" option then elements list will be displayed.
  • Select Sampler >FTP Request.

JMeter FTP Test Plan

Set up the following fields in the FTP Request control panel:

  • Name - FTP Request Get
  • Server Name or IP - ftp.dlptest.com
  • Remote File - .ftpquota (you can select any directory file present on the desired FTP location)
  • Local File - D:\demotxt.txt
  • Select get(RETR)
  • Username - [email protected]
  • Password - eiTqR7EMZD5zy7M

JMeter FTP Test Plan

Add Listener

The Listener element will be responsible for storing all of the results of your FTP request in a file and presenting a visual model of the data.

  • Select the FTPusers element.
  • Mouse hover on "Add" option then elements list will be displayed.
  • Select Listener > View Results Tree option.

JMeter FTP Test Plan

Save and Execute Test Plan

  • Click on File > Save Test Plan as.
  • Save the entire test plan as FTP_test.jmx.

JMeter FTP Test Plan
  • Click on Run > Start to execute the test plan.

Verify the Output

The following image shows that the four requests are made for each FTP request and the test is successful.


JMeter FTP Test Plan

JMeter FTP Test Plan

JMeter FTP Test Plan

The retrieved information for GET request is stored in the D:\demotxt.txt file. You can verify this result by viewing the Request tab of View Results Tree listener element.


JMeter FTP Test Plan





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA