Search code examples
oauth-2.0visual-studio-2017openid-connectazure-ad-b2cwebtest

Visual Studio Web Performance tests and Azure AD B2C sign-on process


We have some web performance tests created in Visual Studio to test our websites. Now with the replacement of our own forms login with Azure AD B2C these tests need updating to automate the initial login step of the tests. If I record a new test of the login it doesn't work when re-run. So I think I need to extract certain values or cookies that come back and ensure they are sent with my requests. I am struggling somewhat to figure out exactly which values I need to pass, so wanted to ask for advice. I have the test in Visual Studio where I can see the requests & responses. I have also used Postman interceptor to capture me authenticating to look at what is being sent, and have had a look through the requests with Fiddler. If anyone knows the values/cookies I need to pass that'd be a great help. I have read around without much look, there is also mention of different cookies which track the auth process which sound important.

Thanks in advance for any pointers on this process.


Solution

  • You can set the access tokens in the Extraction Rules. You can use Groups to retrieve just the access token. Please see this guide for more information. It covers a lot of what you are asking.