0
votes

I am working on a Jmeter login script. To create this script I used blazemeter. The thing is that it is not working correctly as I get a http 403 response code.

Thanks to fire fox I know that in my header I need to send the next data whenever I do a GET to the web page: enter image description here

This is how I do it in JMETER: enter image description here

Extractor: enter image description here

This is the response: enter image description here

The problem I am having is that the session id is not working correctly. I dont know if this is the problem why I have a 403 response code but it is still a problem. I tried everything to solve this error code but I failed so I need to start from the beginning Look at this: enter image description here enter image description here

Do you have any suggestions to resolve this problem of the sesison id? If you do, I would really appreciate it

UDPATE: I changed the variable in the petition because I was naming it wrong but I am still having issues. No id appears: enter image description here

1
Did I get this right that you're sending the 'Cookie' header with your initial request (GET_LOGIN)? - Yuri G
Right now, I am sending in the petition header of GET, the gx client ID. I managed myself to resolve that but I am still having a 403 in post login. I thought it showed that error because I was not sending headers correctly but no. - Mauricio Estevez

1 Answers

1
votes

You're trying to extract Cookie value from the response message, switch the Regular Expression Extractor to the Response Headers (Cabeceras) and your approach should start working:

enter image description here


Also be aware that you don't even need the Regular Expression Extractor.

  1. Add the next line to user.properties file:

    CookieManager.save.cookies=true
    
  2. Restart JMeter to pick the property up
  3. Add HTTP Cookie Manager to your Test Plan
  4. In the HTTP Header Manager (Gestor de Cabecera HTTP) refer the extracted value as ${COOKIE_GX_CLIENT_ID}