fastlane-old / snapshot

Automate taking localized screenshots of your iOS app on every device
https://fastlane.tools
1.96k stars 141 forks source link

launch arguments text file persists after run #442

Closed brentdur closed 8 years ago

brentdur commented 8 years ago

I'm not sure if there's anything preventing the launch-args file (/tmp/snapshot-launch_arguments.txt) from being deleted after snapshot finishes. But if the file was created at the beginning of tests and removed at the end (much like /tmp/snapshot_derived) then the existence of the file could be use as the condition for whether FASTLANE_SNAPSHOT is set in the setupSnapshot method. (#404)

Doing this would also prevent setupSnapshot from setting launch args that were used for running snapshot from being set when the tests are run outside of snapshot. Right now, if I set launch arguments to run with snapshot, and then run the tests from Xcode, setupSnapshot sets those launch arguments again when the developer may not want them to persist. So I feel like having this file removed when snapshot finishes would solve both of these problems

KrauseFx commented 8 years ago

setupSnapshot should only be called from within UI Tests, it should never be loaded from your actual source code

brentdur commented 8 years ago

But if UI Tests are run from Xcode rather then from the snapshot cli, setupSnapshot is still executed, meaning the launch args are still set (including FASTLANE_SNAPSHOT)

fastlane-bot commented 8 years ago

This issue was migrated to https://github.com/fastlane/fastlane/issues/1641. Please post all further comments there.

fastlane is now a mono repo, you can read more about the change in our blog post. All tools are now available in the fastlane main repo :rocket: