0

Request Verification Token is not identifying or getting assigned to a variable by JMeter for a new user registration

In GET, Request header - Request Verification Token is passed as Static one In POST, Request header - Static request verification token is called and in PAYLOAD - Another dynamic Request Verification Token is displaying.

In POST url, I have used below Regular Expression Extractor:

Field to check: Request Headers Name of created variable: Token Regular Expression: input name="__RequestVerificationToken" type="hidden" value="([A-Za-z0-9+=/-_]+?)" Template: $1$ Match no: 0

Queries:

  1. Do I need to use Regular Expression Extractor in GET URL also, If yes what regular expression need to be used?
  2. How to pass Static request verification token value in GET & POST URL?
  3. Do we need to use 2 Regular Expression Extractor in GET & POST URL?

Could you please provide solution?

Wiktor Stribiżew
  • 607,720
  • 39
  • 448
  • 563

1 Answers1

0
  1. Field to check - needs to be Response Body
  2. Using regular expressions for extracting data from HTML is not the best idea, consider switching to CSS Selector Extractor instead.
  3. We don't know the answers to your questions because we're not familiar with the application you're testing, if you have doubts with regards to which values need to be correlated - record the same test scenario 2 times and compare the generated test plans. All parameters which differ are a subject to correlation.
Dmitri T
  • 159,985
  • 5
  • 83
  • 133