SK.
SK.

Reputation: 4358

How dynamic parameters are getting generated and how to capture them in web test in Visual Studio for Performance Testing

How do I get new id token (authentication token) every time I ran a web test from Visual Studio. My web application is using OpenID Connect and Azure Active Directory to login into the web application.

After reading and investigation, I understood that I have to correlate the parameters. Can someone please suggest how do I capture these dynamic parameters?

client-request-id 39371e73-5c40-4422-b3f1-e71127bb0484
state=01749f3e-e5bb-4444-8d1c-f08fd9e941fd
nonce=94da7cb8-03ec-4b0f-8534-352fa1b09dd1
response_mode=fragment
sso_nonce=AQABAAAAAADCoMpjJXrxTq9VG9te-7FX1_Wtyg82e5SVlfLq2mszMissCNULzM6ixkhP-o3PTq2nYFxexFyTsSs6Jkot4bBRchweYw3HSt_0YBNd8UmX5CAA
mscrid=39371e73-5c40-4422-b3f1-e71127bb0484

Basically, how these parameters are getting generated and how do I capture to get the new id token? Is it coming from JavaScript? Thanks guys for help me here.

enter image description here

Upvotes: 0

Views: 369

Answers (1)

AdrianHHH
AdrianHHH

Reputation: 14038

Commonly values like those shown in the question can be found in the responses to earlier requests. The act of "correlating" means finding the values in an earlier response, working out how to extract them from the response and then replacing all occurrences of that value in subsequent requests with the context parameter (CP) holding the value. Typically the values are not generated locally, i.e. not generated by Javascript running in the browser.

In a Visual Studio load test the values are extracted by using "extraction rules". There are several built in rules that cover many cases. If necessary you can write your own extraction rules. These rules store the extracted value in a CP.

There are many web sites giving tutorials on how to do this correlation and how to use extraction rules. I recommend studying the Microsoft web pages as you are using their toolset.

Upvotes: 0

Related Questions