paparazzi
paparazzi copied to clipboard
Feature Request: Warn and/or remove stale images
My images
directory was full of snapshots for tests that I have either renamed or deleted entirely. It would be helpful if Paparazzi could keep this directory clean by either warning me of golden images with no matching test, or outright deleting them for me.
It might make sense for this be a part of the record
step: Delete all existing images first, since the recording will regenerate all of them. Any that were previously present (and were from a deleted or renamed test) would then not be regenerated, as expected.
I think this feature is hard to do right. E.g., We are not running all tests when we write new screenshot tests or after we change a view and need new golden masters. We only run the screenshot tests we need. Otherwise, it will take a while ;)
We only run the screenshot tests we need.
Usually we do the same, except on CI. It would kinda suck to have a CI job fail because of unused test images. A separate cleanup
task that could be run periodically would decouple your concerns I think.
@BenedictP interested to know how you manage running only the screenshot test you need? is there a specific gradle command? assuming you do per feature module?