Forum Discussion

mttsow's avatar
mttsow
Occasional Contributor
5 years ago

401 error. How to use variable tof session and token id?

 

 

Hi,,

I am having lots of 401 errors, trying to do load testing.  I looked at some previous q&a and suggested using variable to store dynamic session and token ID can solve this issue.  But I am having difficulties getting the value.  any suggestions?

 

Thanks

Mary

 

 

 

 

 

1 Reply

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    Hi Mary,

     

    At a first glance everything looks correct.

    I would recommend the following:

    -- Add two Custom Message operations after request/response pair where Variable1 and Variable2 are getting their values and output their values to check that correct values were extracted;

    -- Check test log for the failed requests and verify that correct cookie values were sent in requests - I expect that some part of cookie might be corrupted during replacement (Secure, Path, SameSite parts).

    -- You may also try to utilize Developers Tools in, say, Chrome, record the same traffic you are trying to simulate in LoadComplete and compare requests recorded in Chrome and issued by LoadComplete.

     

    If nothing from above helps and you are allowed, you may send me a private message via this forum and we may consider some screen-sharing session.