To Demonstrate an FTP upload and Download we need an FTP website where we should have access. I have a sample FTP website where everybody can have access.
Once you navigate to that website, you will find the below page:
- On the above page, we have a username and password, by using these details we can connect to the FTP website.
- We can connect to the FTP site either by using a WinSCP client or Filezilla.
- I am connecting using WinSCP.
- Before that download and Install WinSCP in your system.
- After the successful installation of WinSCP, you will find the login page as below.
- Click on the file Protocol and select FTP.
- Next, enter the Hostname which is present in the dlptest website, and enter the given username and password.
- Click on the Login button.
- Once you click on the Login button, WinSCP will connect to the FTP.
- Here you can drag and drop files from Local system to FTP or From FTP to Local System.
- Let us go to the JMeter and we need to enter some connection details.
- Next, you need to enter all the connection details on the FTP page as shown below. Enter the Server name as ftp.dlptest.com.
- Next, go to the WinSCP and create a new file by clicking on the New.
- After creating a new
.txt file, enter some texts inside the text file as shown below.
- After creating a file, go to the remote file location and refresh WinSCP, you will find the Text.txt file as below.
- Next, go to the JMeter and enter the file name in the Remote File and then enter the Local file location followed by a newly created file name in the JMeter, and enter the Username and Password of the FTP account.
- These are the details which we have to give in the JMeter, Save the test plan.
- Next, add View Result Tree listener to the Thread Group.
- Save and Run the Thread Group, after successful execution the test.txt file has been downloaded to our local system.
- The Test.txt file has been downloaded in the given location.
Challenges I have faced in this while Downloading the File from WinSCP to Local System is:
- Sometimes the local drive does not support them to access remote file locations, in that case, change the local system location.