0
votes

I am working with Jmeter to do load testing. I created a simple login script using BlazeMeter. Then I imported the file into Jmeter.

Whenever I try to run the script, it fails. The first problem I encounter here is that in my first http request I receive a 403 response code: enter image description here

I added a cookie manager and an authorization manager to try and solve this but it is not working. I think the problem is with cors in the manager header as 403 code means that it received the petition but the access to it was denied. Do you have any suggestions on how to resolve this? I tried adding post processors but couldn't make them work. Maybe because I am a newbie to jmeter and load testing. Idk.

1

1 Answers

0
votes

As per HTTP Status 403 description

The HTTP 403 Forbidden client error status response code indicates that the server understood the request but refuses to authorize it.

so most probably your request is missing some authentication context.

Your recording seems to be incomplete, you seem to be testing a GeneXus-based application and it is using AJAX_SECURITY_TOKEN header as the security parameter.

From your screenshot it seems that you're sending recorded hard-coded value, however you should design your script as follows:

  1. Perform initial request, i.e. open login page
  2. Extract AJAX_SECURITY_TOKEN header value using Regular Expression Extractor
  3. Substitute this e8985.... recorded value with the JMeter Variable from the Regular Expression Extractor

Check out Using Regular Expressions to Extract Tokens and Session IDs to Variables article for more information.