Is there a library to first record and then replay HTTP responses in tests?

As asked in title, I am looking for a library that doesn’t rely on me manually storing fixtures before being able to use them after. I am aware of exvcr and that’s not it.

I vaguely remember seeing one such library but I can’t for the life of me find it.

Anyone?

Probably ExVCR, inspired by VCR…

Nope, not that, but as it often happens – you find the answer shortly after asking:

https://hexdocs.pm/tesla_replay/Tesla.Middleware.Replay.html

Not sure it will do the job (repo is archived) but that’s the one I was looking for. Will check exvcr again, maybe it improved in the meantime.

Ok, glad You found useful package