• info@helpingtesters.com
  • helpingtesters

File Upload in JMeter

September 10, 2017 JMeter Tutorial
File upload in JMeter, JMeter File Upload, Uploading file in JMeter

In this blog, we will see how we can File upload in JMeter. This will help to do load testing of scenarios where upload is required. One can increase the load by increasing number of users and check the behavior of the application when the load is increased. Whether the user is able to upload successfully or not. 

→Complete list of JMeter Tutorial Series

For creating a File upload in JMeter scenario, follow below steps

  • Launch JMeter Graphical user interface.
  • Right click on Test Plan > Add > Threads > Thread group
  • Then, do right click on Thread group > Add > Sampler > HTTP Request
  • Add any listener say “View Results in Tree”.
  • We are taking the example of the site https://imgbb.com
  • Based on the website, we will add details in “HTTP Request” sampler.
    • Protocol: https
    • Server Name or IP: imgbb.com
    • Method: POST (As we are going to File upload in JMeter)
    • Path: /
    • Click on File upload Tab.
    • Under File Upload option, details are provided of the file that needs to be uploaded.

After filling above options one will be navigated to see below view :

Let us upload a jpg image.

First, place the jpg file in JMeter’s bin folder.

Now, launch “https://imgbb.com/”.

 

Clicking on “Start Uploading” button will request to browse till path of the file which needs to be File upload in JMeter.

In order to use in JMeter, right click on the button – “Start Uploading“ > Inspect

 

Fetch unique identifier from highlighted part of HTML. For example, Here it is the class i.e. ‘btn btn-big blue’.

Using this data lets populate below fields in JMeter under “File Upload” tab.

  • File Path: spring.jpg
  • Parameter Name: btn btn-big blue
  • MIME Type:  image/jpg

Once these details are added. Save the Test plan and Run it.

Success will show that File upload in JMeter successfully.

 

Ankita has worked on different types of testing like Manual, Automation, Performance testing.  She likes to learn about new tools in market that help to make testing easier and interesting. Testing is her passion due to versatile areas it offers.

About the author

Ankita Dawar author

Ankita has worked on different types of testing like Manual, Automation, Performance testing.  She likes to learn about new tools in market that help to make testing easier and interesting. Testing is her passion due to versatile areas it offers.

Leave a Reply

Your email address will not be published.