0

I am working on log-in scenario for Jmeter. Once I logged-in, I am redirected to the below request:

https://analogb2c.b2clogin.com/analogb2c.onmicrosoft.com/B2C_1A_ADI_SignUpOrSignInWithKmsi/SelfAsserted?tx=StateProperties=eyJUSUQiOiJlOWRiNTU1Zi05N2ZmLTRmOTYtOGQwMC0yOTc2MGNlYmE4ZDYifQ&p=B2C_1A_ADI_SignUpOrSignInWithKmsi

How do I extract the Query String Parameters "tx" and "p" and "X-CSRF-TOKEN" that is in the request headers? What is the regular expression to get the values? I will use the value to the next succeding request. Thanks

Query String Parameters

Omeng
  • 33
  • 1
  • 4

1 Answers1

0

For the tx it would be something like:

tx=(.+?)&

enter image description here

For the X-CSRF-TOKEN it would be something like:

X-CSRF-TOKEN:\s*(.*)

enter image description here

If you have problems with JMeter Regular Expressions - you can consider switching to the Boundary Extractor, it basically extracts everything between left and right boundaries, doesn't require any domain knowledge and works much faster. More information: The Boundary Extractor vs. the Regular Expression Extractor in JMeter

Dmitri T
  • 159,985
  • 5
  • 83
  • 133