Jmeter - FTP TEST PLANIn this chapter, we will see how to test a FTP site using JMeter. Let us create a Test Plan to test the FTP site. Rename Test Plan 1. Open the JMeter window by clicking /home/manisha/apache-jmeter-2.9/bin/jmeter.sh. 2. Click the Test Plan node. 3. Rename this Test Plan node as TestFTPSite. Add Thread Group Add one Thread Group, which is placeholder for all other elements like Samplers, Controllers, and Listeners.
Now that we have defined our users, it is time to define the tasks that they will be performing. Add FTP Request elements. We add two FTP request elements, one which retrieves a file and the other which puts a file on the ftp site. 1. Select the FTPusers element. 2. Right-click the mouse button to get the Add menu 3. Select Add > Sampler > FTP Request. 4. Select the FTP Request element in the tree. 5. Edit the following properties as shown below: The following details are entered in this element:
The following details are entered in this element:
The final element you need to add to your Test Plan is a Listener. This element is responsible for storing all of the results of your FTP requests in a file and presenting a visual model of the data. 1. Select the FTPusers element. 2. Add a View Results Tree listener by selecting Add > Listener > View Results Tree. Run the Test Plan Now save the above test plan as ftpsite_test.jmx. Execute this test plan using Run > Start option. View the Output The following output can be seen in the listener. You can see that four requests are made for each FTP request and the test is successful. The retrieved file for GET request is stored in the /bin folder. In our case, it is /home/manisha/apache-jmeter-2.9/bin/. For PUT request, the file is uploaded at the path /home/manisha/. |