0
votes

I am facing 402 response code while logging out from my application using Jmeter. I think I know the problem but don't know to resolve it and that's Session Id which is being passed as the previous value in log out sampler.

Login (Parameters + Session ID 1)

  • Step 1 (Session ID 1)
  • Step 2 (Session ID 1)

Logout (Parameters + Session ID 1 - though the session id gets changed on logout as user gets redirected to login page again)

I think the Session ID should not be passed while logging out from application but don't know a way to do so in Jmeter. Please help. Thanks.

1
how do you pass session ID? e.g. as cookie, as a parameter, in a header, in URL? - Kiril S.

1 Answers

0
votes

If you don't want to allow your cookie manager to send ID within logout request, just change the level of your cookie manager. It works only for requests on the same level and all children. So, all you need is just to make your logout procedure a part of another group. For example, you can add logout request to TearDown thread group.