k6pkce

implement (callback) server with k6


I would like to test PKCE flow in K6 without real web application. Instead, I need a fake application that would act as a web application. Is it possible to do it with K6 somehow? any library that I can use with k6?

I'm starting my test in a form of k8s job so maybe in the worst case I could just spin off a container with callback server.


Solution

  • k6 only simulates clients (outgoing requests), it is not able to simulate an HTTP server (incoming requests).

    But if you need a server application to implement the full flow, it doesn't make a lot of sense to perform the test without the application. I would suggest creating a small dummy service and then executing your k6 script against that dummy service. The dummy service can then redirect the clients to your auth server.