authenticationjmeter

Microsoft Authentication through JMeter in Web Application while login


I'm trying to log in to a web application that uses Microsoft accounts for authentication. I am using JMeter for load testing and I was wondering how I could log in to the Microsoft accounts using JMeter.

The protocol being used is OpenID Connect, upon going to the web application, it opens up a Microsoft login page where you enter your email, submit your password, and then get redirected back to the web application. Does anyone know how I would simulate this in JMeter?

Upon signing in to the web application, it opens up a Microsoft login page where you enter your email, submit your password, and then get redirected back to the web application.

I tried my level best however I'm unable to automate it. If anyone knows of any YouTube links or anything else that would be helpful, please share them with me.


Solution

  • It's a matter of correlation

    You basically need to simulate all the requests the real browser sends, the easiest way is to record them.

    Next you need to handle all dynamic parameters (extract them using suitable JMeter Post-Processors and replace recorded values with JMeter Variables)

    The process is described in details in OpenID Connect - How to Load Test with JMeter article.

    Example test plan for Microsoft-based external authentication: https://bitbucket.org/blazemeter/oauth2-correlation/src/master/atlassian-microsoft-oauth.jmx