File upload on Azure Cloud using JMeter

In some performance testing use cases it is not enough to just check how long it takes for a server to render a page, produce a set of search results or create an entity. For certain application types – let’s take enterprise content management systems as an example – the performance of file upload requests is vital and must be tested. Uploading a file in web application is very common functionality. JMeter tool provides the feature of file upload thus makes possible to perform load testing of this feature. This article is about how file upload on Azure Storage is performed with JMeter.

Microsoft Azure Storage

Microsoft Azure Storage is a Microsoft-managed cloud service that provides storage that is highly available, secure, durable, scalable, and redundant.Azure Storage consists of three data services: Blob storage, File storage, and Queue storage.

AuthID & SAS Token

A lightweight service authenticates the client as needed and then generates a SAS. Once the client receives the SAS, they can access storage account resources directly with the permissions defined by the SAS and for the interval allowed by the SAS. The SAS mitigates the need for routing all data through the front-end proxy service.

File upload request would contains Authentication ID and SAS token . It would be like below url for example:

In some application authentication ID (Highlighted in bold)also included in the request url . For example.

After recording you would get one PUT or POST and a OPTION request to upload the file.

We need to correlate AuthID and SaS token values in the URL for each of request.Which you will get from the previous request.

Go to the “Files Upload” Tab on the “HTTP Sampler” and provide the path of your file and MIME type of your file and Leave “Parameter Name” blank.

Now execute your script .You will get “HTTP 201 Created” in response data.

Which means you have successfully upload your file on Azure Cloud Storage.