Reverse scrubbing? #1345
Unanswered
JulianRooze
asked this question in
Q&A
Replies: 1 comment 3 replies
-
@JulianRooze not sure about "reverse scrubbing" that sounds difficult to implement. But you should be able to easily scrub the id using |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I just got introduced to this great library and I have a question regarding scrubbing:
When I saw scrubbing was an option, I thought the workflow for a new test was:
*.verified
file yet.*.received
file, and if I like it I copy it to*.verified
*.verified
that differs between calls (like IDs) with placeholders myself*.received
file that are covered by placeholders are ignoredBut this isn't how it actually works turns out (unless I'm missing something) 🙃
From what I understand, scrubbing works primarily on cleaning the
received
file, by intercepting the serialization. I think I understand why it works the way it does, because then comparison is mostly just a string comparison exercise between old and new, but is there perhaps also potential here for a reverse scrubbing workflow, where thereceived
file is left 'dirty' and matched against a manually scrubbedverified
file and anything that is covered by a placeholder is ignored?For our use case, the existing scrubbing functionality is hard to get right as our objects look like this (for example):
So the ID property differs every call, so must be scrubbed. However, the TypeID property is always the same and is something we want to verify. Initially I figured I would check if something looked like an ID and could be parsed as a
long
, but that would include TypeID here and ultimately I don't think we have a reliable way to programmatically ignore/scrub the right members and not ignore the ones we don't want to ignore, so we would have to do it manually (which is fine).What I would like to be able to do is manually edit the
verified
file to look something like this:And at comparison time, any members in the
received
file that are a matched on a placeholder value are ignored.Is this something that would be feasible to add, or is this perhaps already supported somehow, or even a better way to do what I want?
Beta Was this translation helpful? Give feedback.
All reactions