JMeter assistance please!


Recommended Posts

Hi Guys,

I need some help with JMeter.

I am trying to perform a secure login through JMeter. My web application is using the HTTPS protocol. I have Java 1.6 so I think SSL implementation is already in.

What I did was, I started the HTTP Proxy Server. Then i performed the login through the browser. So it recorded everything. There are a few variables that are generated at runtime. Namely these 2:

id

newpassword

Basically, at the login page, when you enter your username and password and click "Submit", the page will execute a javascript method call encrypt which hash the your username with a salt and modulus to produce the id and hash your password with a salt and modulus to produce the newpassword. Then it appends it in the URL and send it to the server for verification.

However, these 2 values changes for every request. So my question is, how can I just JMeter to send these 2 variable as well?

Thanks.

Link to comment
Share on other sites

  • 4 years later...
  1. You can add a BSF PreProcessor to your request and put JavaScript code which calculates ID and hash there. Result can be stored into JMeter Variables via vars.put() method and used in the main HTTP Request which performs login.
  2. Try recording your login scenario as follows:
    • 1st request - open login page
    • 2nd request - perform the login

and  look into View Results Tree listener to find dynamic data there. Usually it is present in the previous response, you should be able to get it from there using Regular Expression Extractor

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.