Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add option to disable recording of identical requests #391

@Khartir

Description

@Khartir

It would be really nice to have the option to disable the recording of identical requests (#161). While this feature is definitely useful for some people it unfortunately breaks my use case.

I have some tests that make two (different) requests to the same API. That API requires authorization, which requires another request to get a token. When recording the requests the following happens:

  1. Get the auth token and cache it
  2. Do the first request
  3. Get the cached auth token
  4. Do the second request

This works fine. The issue occurs when we run this test at a later time. The auth token has an expire time, which is of course part of the recorded response. So when we run the test the following happens:

  1. Get the auth token and cache it
  2. Do the first request
  3. Try to get the cached auth token, notice it is no longer vaild
  4. Try to get the auth token and fail because the request index does not match

I currently work around this by removing the index from the saved request, which works but is not ideal.

In my use case I don't need the option to record multiple identical requests so a simple option to disable the index-check would work.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions