R
R
rst6302021-11-28 14:45:24
PHP
rst630, 2021-11-28 14:45:24

Recording requests / responses to api for further testing of the call / response chain, what can be done?

There is a laravel backend in which there are many listener daemons of different sockets that react to incoming data in one way or another - by sending requests to another api.

Despite the most detailed logging, it is sometimes difficult to understand what happened and why. It is not possible to wait for the next similar case - you need to emulate the entire chain of events in a test environment and make changes.

So I thought about the easiest way to write down all requests, answers and then give them in the same sequence in a test environment.

It is clear that I can dump it all myself, then lock it in phpunit, but it's too long and tedious to mock hundreds of answers every time.

I'm looking for a solution like a proxy - which proxies requests to a real api, simultaneously records a request / response, and then, when it is switched to emulation mode, gives the recorded response chain.

Mockwire does something similar, but too complicated. Can you tell me if there are any other options?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question