Site Loader
Auckland, New Zealand
In our last post we saw entering username and password to login a web application to perform ASP.Net authentication testing. But as you could see, we hardcoded the username and password field in HTTP Request sampler. If we need to test our web site with 5 different username and passwords, then surely we cannot hardcode the values as did earlier, hence we need to somehow parameterize the value, meaning we need to get the username and password values from external datasource like CSV file and this can be done very well using Config Element in JMeter called CSV Data Set Config as shown below

Configuring CSV Data Set Config

We are going to create a CSV file with username and password as the first line and datas in the next line as shown

All I have did here is given the filename, I have not even passed the variable names, since JMeter will automatically take the first line as column name if no values is supplied in the variable names field.

Configuring HTTP Request

Now we need to configure the HTTP request to accept the parameter values, hence the parameter for post request will look like this

Execute the test

Now we are going to execute the test

I hope now you should have clear understanding of parameterization in JMeter. Thanks, Karthik KK

Post Author: Karthik kk

Leave a Reply

Your email address will not be published. Required fields are marked *