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
If you have read the complete series of JMeter so far, you should have hands on with JMeter by now, since we covered almost all the nitty-gritty details of JMeter. In this post we are going to see one of the real time scenario on user authentication done in ASP.Net webForm. This is one of the problem which I faced while working with JMeter, and user authentication cannot be achieved via recording controller in JMeter discussed in last post of this series.
Application under Test (AUT)
I have a simple application which has just two pages one is login and another one is home page as shown below
Figure 1 : Application Under Test
The application does very crazy authentication, if both username and password are same, then it allow the user to login, else will not, I told you it’s crazy.
In our last couple of post in JMeter Test Plan creation, we created HTTP Requests manually by adding them one by one (which we need to test). But there is another cool option available in JMeter, where we can record the HTTP requests (automatically) on clicking the URL’s in the browser. This will come handy, since we don’t have to babysit and do creation of each and every request as we did earlier.
In order to do recording the first and foremost thing we need to do is to configure the browser’s proxy setting, so that JMeter can listen the request and response coming from the browser. In order to do that in firefox, go to Tools à Options à Network Tab à Settings
à and change the proxy settings to manual proxy configuration as shown below
In our last post we saw creating a Simple HTTP Request plan in JMeter, where we just created a HTTP Request Default with some HTTP Request and Listeners. But we did not used any kind of
- Logic Controllers (Looping, Conditions)
- Assertion Validations etc
In this post, we are going to deal with little advanced JMeter Test Plan.
So far in this series, we saw theoretically about JMeter and its components, but from this topic of JMeter Series, we are going to deep dive and start on practical working test plans in JMeter (Since that’s what we need)
In this post we are going to discuss on HTTP Request Test Plan for a web site and check the performance of the web site with multiple users.
In our last some post with our JMeter Series, we saw introduction of JMeter and its related components. This topic is kind of off topic in JMeter series, but still we need this to understand before moving forward.
We already know what Fiddler is, if you are new to it, please go through details here real quick to get an insight on Fiddler.
As you know in JMeter we will mostly work with HTTP request (Web Applications), we might sometimes need an advanced option to debug our HTTP request and response. Within JMeter we already have Request and Response tabs, but still Fiddler can be more handy (Since its built for that purpose).
In the last post we saw how some of the components in JMeter like Threads (Users), Config Elements and Timers. In this post we are going to discuss on some more important components of JMeter which comes very useful while working with Test Plan creation.
Samplers are the most important component in JMeter, since we will use it for either creating a new HTTP request or JDBC Request or LDAP Request and many more. Samplers are especially used to make requests