How to capture k6 requests with Fiddler?

Hello,

I can’t seem to find any information anywhere on how to capture k6 requests with Fiddler. How would one do that?

Hi, welcome to the forum!

I haven’t used Fiddler, but if it’s anything like tcpdump or Wireshark, you should be able to see traffic generated by k6 in the same way as other HTTP traffic. There’s nothing special about the k6 packets, and you should be able to filter them out by the remote host address or port used in your test.

Keep in mind that in order to decrypt HTTPS packets you’ll need to export the custom root certificate into your system.

Good luck!

Thanks for the reply imiric, but sadly Fiddler works differently and does not pick up k6 requests without additional configuration.

Luckily, today I got the problem figured out with the help of my colleagues. For Fiddler to pick up the requests one would have to set up some environment variables. I personally used these two commands in the same PowerShell window I run k6 in:
set-item Env:HTTP_PROXY http://127.0.0.1:8888
set-item Env:HTTPS_PROXY http://127.0.0.1:8888

2 Likes