Verifying asp.net login with jmeter

I am new to jmeter tool. I want to check my asp.net login. But after two days of searching through the Internet, I could not succeed.

The following are the steps that I followed:

  • Add HTTP Request Defaults .
  • Add HTTP Cookie Manager .
  • Add two Regular Expression Extractor for EVENTVALIDATION and VIEWSTATE .
  • Add the URL of the URL to re-write using ASP.NET_SessionId (check the Path Extension and Cache Session Id ).

    enter image description here

  • There are two pages, one is Login Get Page and the other is Login POST Page . On the login page, I added the following parameters:

    • Username: realUser
    • Password: realPassword
    • __ VIEWSTATE: name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="(.+?)"

    enter image description here

    • __ EVENTVALIDATION: name="__VIEWSTATE" id="__VIEWSTATE" value="(.+?)"

    enter image description here

    • LoginButton: Log+In
  • Add View Results Tree .

I studied the following links but failed.

Current output:

Current output

What am I missing?
Any suggestion please.

Update:

Test Plan Tree Structure:

Test plan tree structure

Login Details: enter image description here

Login Request Tab: enter image description here

+1
source share
2 answers

Try recording using the Jmeter proxy:

Then add all the elements you described to do what is needed for the dynamic, with the exception of the Http Url rewrite modifier.

+2
source

We also had problems getting the jmeter login page. In the end, we made it work. It is important to note:

  • You need to create two HTTP request samples for the login page, the first of which uses the GET method. So the viewstate can be captured by regular expression extractors, and then the second, which uses the POST method, which performs the login.
  • Use firebug or any other capture tool to capture the message of your login page and remember to add all the controls that publish the values. If you forget one parameter, your page will report an error. We also need an empty ___VIEWSTATE parameter. See screenshot for our shipment request.
  • For some pages, we also had to add the __VIEWSTATEENCRYPTED parameter with an empty value

screenshot of the login http post request

+1
source

All Articles