@high-optician-2097 I think this isn't quite what I'm asking for. This is for testing something with a frontend, but I'm talking about my backend.
So to give more context: I have a backend with some routes. Say POST /myRessource.
The endpoint is later called from some Frontend, for instance a SPA. It will check for cookies and forward them to Ory to get the session and check if the user is authenticated. So theoretically I could use my frontend to get some sample token or I could use something like curl directly in my tests or for manual testing against ory directly.
But this ist just a lot of effort. For instance at the moment my frontend isn't even running. I just wrote a new rest endpoint and want to test it quickly with Postman. And for this I have to spin up my frontend, do a login, copy the cookie from the browser, paste it into postman. That's really a lot of effort and kind of demotivating.
What I instead would prefer is to have some sample cookie or token, which just always works. Obviously only for my test ory kratos instance. So whenever I do a request for my test user with cookie X Ory will just accept it.
As I said this also would make some integration tests easier or even e2e backend tests. While it is very sensible to test against an actual running ory kratos service, I don't need to test login. That's not the job of my backend. My backend just needs to verify logged in user. So I would like to avoid any complex setup to get data of a logged in user in the first place.
Of course for my frontend the story is different. There I actually have the login fields and it makes totally sense to tests them there. And even for parts of my frontend, where I don't need it, it's much easier to recieve a valid cookie, because my frontend contains the functionality for it in contrast to my backend.
I hope I clarified why I think this feature is useful π