Session Tracking #376

Closed
opened 2025-12-29 15:22:16 +01:00 by adam · 4 comments
Owner

Originally created by @devmariodiaz on GitHub (Oct 25, 2021).

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

Originally created by @devmariodiaz on GitHub (Oct 25, 2021). 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
adam added the question label 2025-12-29 15:22:16 +01:00
adam closed this issue 2025-12-29 15:22:17 +01:00
Author
Owner

@StefH commented on GitHub (Oct 25, 2021):

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 commented on GitHub (Oct 25, 2021): No this is not easily done. The only possible way is to use https://github.com/WireMock-Net/WireMock.Net/wiki/Scenarios-and-States
Author
Owner

@devmariodiaz commented on GitHub (Nov 3, 2021):

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 commented on GitHub (Nov 3, 2021): 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 []
Author
Owner

@StefH commented on GitHub (Nov 3, 2021):

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 commented on GitHub (Nov 3, 2021): 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..
Author
Owner

@StefH commented on GitHub (Oct 13, 2022):

Closing for now.

@StefH commented on GitHub (Oct 13, 2022): Closing for now.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/WireMock.Net-wiremock#376