WireMock.Net icon indicating copy to clipboard operation
WireMock.Net copied to clipboard

Session Tracking

Open devmariodiaz opened this issue 4 years ago • 3 comments

Hello Stef,

Greetings.

I have a quick question.

In WireMock is there any way to manage session tracking?

Ref: https://stackoverflow.com/questions/1740860/http-session-tracking/1740900

devmariodiaz avatar Oct 25 '21 13:10 devmariodiaz

No this is not easily done.

The only possible way is to use https://github.com/WireMock-Net/WireMock.Net/wiki/Scenarios-and-States

StefH avatar Oct 25 '21 15:10 StefH

Thanks a lot for all @StefH,

I would like to ask you if you could provide me with any examples, how to use Scenarios and States to simulate a session tracking with WireMock.NET? I cannot find any way to do that using Scenarios and States.

Currently, I'm trying to send a sessionid in the headers in a specific endpoint I after that I'm trying to find that request using this method: POST /__admin/requests/find and sending this payload as a criterion to find some request that contains that sessionid:

{
    "Cookie": "sessionid=0123456789"
}

But this not found any request related. Always returns []

devmariodiaz avatar Nov 03 '21 19:11 devmariodiaz

Related to https://github.com/WireMock-Net/WireMock.Net/issues/671 it seems....

Your approach is currently the only one.

I need some time to think of something else..

StefH avatar Nov 03 '21 21:11 StefH

Closing for now.

StefH avatar Oct 13 '22 17:10 StefH