README.md in snapshot-1.0.1 vs README.md in snapshot-1.0.2
- old
+ new
@@ -32,11 +32,11 @@
[![License](http://img.shields.io/badge/license-MIT-green.svg?style=flat)](https://github.com/KrauseFx/snapshot/blob/master/LICENSE)
[![Gem](https://img.shields.io/gem/v/snapshot.svg?style=flat)](http://rubygems.org/gems/snapshot)
###### Automate taking localized screenshots of your iOS app on every device
-You have to manually create 20 (languages) x 5 (devices) x 5 (screenshots) = **500 screenshots**.
+You have to manually create 20 (languages) x 6 (devices) x 5 (screenshots) = **600 screenshots**.
It's hard to get everything right!
- New screenshots with every (design) update
- No loading indicators
@@ -160,10 +160,14 @@
Your screenshots will be stored in the `./screenshots/` folder by default (or `./fastlane/screenshots` if you're using [fastlane](https://fastlane.tools))
If any error occurs while running the snapshot script on a device, that device will not have any screenshots, and `snapshot` will continue with the next device or language. To stop the flow after the first error, run
+```sh
+snapshot --stop_after_first_error
+```
+
Also by default, `snapshot` will open the HTML after all is done. This can be skipped with the following command
```sh
snapshot --stop_after_first_error --skip_open_summary
@@ -226,10 +230,10 @@
# How does it work?
The easiest solution would be to just render the UIWindow into a file. That's not possible because UI Tests don't run on a main thread. So `snapshot` uses a different approach:
-When you run unit tests in Xcode, the reporter generates a plist file, documenting all events that occured during the tests ([More Information](http://michele.io/test-logs-in-xcode)). Additionally, Xcode generates screenshots before, duing and after each of these events. There seems to be no way to manually trigger a screenshot event. The screenshots and the plist files are stored in the DerivedData directory, which `snapshot` stores in a temporary folder.
+When you run unit tests in Xcode, the reporter generates a plist file, documenting all events that occured during the tests ([More Information](http://michele.io/test-logs-in-xcode)). Additionally, Xcode generates screenshots before, during and after each of these events. There seems to be no way to manually trigger a screenshot event. The screenshots and the plist files are stored in the DerivedData directory, which `snapshot` stores in a temporary folder.
When the user calls `snapshot(...)` in the UI Tests (Swift or Objective C) the script actually just does a swipe gesture outside of the screen bounds which doesn't make any sense. It has no effect to the application and is not something you would do in your tests. The goal was to find *some* event that a user would never trigger, so that we know it's from `snapshot`.
`snapshot` then iterates through all test events and check where we did this weird gesture. Once `snapshot` has all events triggered by `snapshot` it collects a ordered list of all the file names of the actual screenshots of the application.