-
-
Notifications
You must be signed in to change notification settings - Fork 508
Description
Is your feature request related to a problem? Please describe.
Is there a way to create impersonate emails, phone numbers and names from the server response once the cassette file is stored, or before the file is stored?
I'm working on a setup in which VCR is configured to hit a production API, not ours, read only, to get the data for testing and store it in a file. It's useful as the data stored is matching the production API, thus real data based tests. Although some of the is personal identifying data and it's not the best for GDPR.
Currently I can manually remove and alter that data in the cassette file before committing to the VCS, but there was already some such data committed to VCS and it's in the history. It's a private repo, although it's better not to mess with GDPR.
Describe the solution you'd like
Automatically convert the data in the response body of the requests, for all VCR cassettes in the test suite, to dummy data, for field types "email", "phone" and maybe "custom" based on a regex; to have the configuration available in "VCR.configure"
Describe alternatives you've considered
Manually impersonate the data after VCR stores the files, before commiting to VCS
Additional context