Parameterized snapshot testing #686
cameroncooke
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all, been using swift-snapshot-testing for a good while and love it, but one thing I've always wanted in combination with this tool is an easy way to snapshot all the many variations of a given view, so I created ParameterizedTesting
You can get it here:
https://github.com/cameroncooke/SwiftParameterizedTesting
Often with a simple parameterized test, you create a single test with input data and all the value combinations are tested in one go. If there are any regressions the test name that failed doesn't really help you narrow down the error especially if the tests are running remotely say on CI. My library solves this by creating dynamic run-time tests for each combination of values being tested. If your test data is two arrays of 5 values, then the library will generate 25 tests that will automagically appear in Xcode's Test Navigator.
I would love to get feedback and hope it's as useful for others as it is for me.
Beta Was this translation helpful? Give feedback.
All reactions