airbnb / okreplay

📼 Record and replay OkHttp network interaction in your tests.
Apache License 2.0
781 stars 71 forks source link

Requests indexation #112

Open NoNews opened 3 years ago

NoNews commented 3 years ago

Hi, firstly, thank you so much for a good library!

OkReplay covers all our needs, but there is one more feature which could be useful: Request indexation.

For instance, we have request a, which we execute and record. During the test run, we may have the the same request a, which returns other response, but all requests params are the same.

In that case, looks like, it wouldn't be recorded, and during replay only first response would be substituted for all requests with the same match. (Please correct me if I wrong)

Subsequent mode can't be used in that case, as we may have 100 requests at the same time and we don't have a guarantee that they are subsequent.

Do you have any plans about it? If not, would you accept the contribution?

Thank you!