Snapshot Testing Tutorial for SwiftUI: Getting Started | raywenderlich.com

Learn how to test your SwiftUI iOS views in a simple and fast way using snapshot testing.


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/24426963-snapshot-testing-tutorial-for-swiftui-getting-started

I am beginner and my question is probably very easy to answer

When I tried to run the test for first time appears an error that I don’t know how to solve

failed - You don’t have permission to save the file “BookRowViewTests” in the folder “Snapshots”.

Have I to create a folder call “Snapshots”?
Where?

Thanks a lot

No. You do not have to create any folder. It is supposed to be created by the SnapshotTesting framework itself.
Typically it would be in a path like: /RaysLibrary_Materials/final/RaysLibraryTests/__Snapshots__
If you haven’t tried this, I’d suggest you check the permission on the above path by Right Click - Get Info - Sharing and Permissions.
~ You should have ‘Read & Write’ permission for your username. Update it if otherwise.
Also, a similar issue seems to be reported on their GitHub page here - File Save Permissions Error · Issue #193 · pointfreeco/swift-snapshot-testing · GitHub. Do check this out. Hope it helps!