Add CI best practices to the readme #792
Replies: 2 comments
-
Since this isn't an issue with the library and more of a feature request, I am going to convert it to a discussion. |
Beta Was this translation helpful? Give feedback.
-
Since this is a discussion, I want to add one more CI strategy than the common record/verify used by most snapshot testing libraries. Some of the larger companies (Meta, AirBnb etc.) don't manually record screenshots into the repository. Instead, on the CI jobs they record screenshots, and upload screenshots to an internal service that manages the screenshots, and just notify the Pull Request when screenshots changes. This reduces the friction (no manual recording), reduces training required (you don't need to know how to record screenshots), reduces flakiness (since it's running on CI devices and not on developer laptops), and makes it easier to build tooling for image comparisons. If you're looking for such a tooling, you can use an open source tool such as Vizzy or Screenshotbot. I built Screenshotbot, so I'm biased towards that. |
Beta Was this translation helpful? Give feedback.
-
Please add CI best practices to the Readme file.
I've used different snapshotting tools in the past, where the workflow was to generate the images, then copy it to a certain location, usually a scheme agreed upon by the developer team and specify those file locations in the tests.
Swift SnapshotTesting does this automatically using the
___Snapshots___
folder but there's no mention of this in the readme, nor any mention how to customize this if you want to go with a custom folder structure.I believe it would make life easier for many of us, so we don't have to read the source or search for issues.
Beta Was this translation helpful? Give feedback.
All reactions