Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How are you guys generating your screenshots? #213

Closed
cloudface opened this issue Aug 2, 2017 · 4 comments
Closed

How are you guys generating your screenshots? #213

cloudface opened this issue Aug 2, 2017 · 4 comments

Comments

@cloudface
Copy link

Hello

I saw that you guys have a lot of screenshots on various devices in various orientations and in multiple languages. I also saw that you guys are not using fast lane's snapshot to do this. How are you guys generating these screenshots? I'm looking for a way to do that and with fast lane's snapshot I'm forced to use the UI Automation framework which makes it a bit tricky to mock underlying dependencies of my app to produce the desired states which I want to screenshot. Thanks for your input!

Kind regards
Chris

@stephencelis
Copy link
Contributor

stephencelis commented Aug 2, 2017

We use FBSnapshotTestCase to generate our screen shots, which will actually fail the test suite if a screenshot doesn't match the historical version!

An example use: DashboardViewControllerTests.swift#L41-L52

We use a single app environment to manage global mutable state (like locale, language, current time, api client, etc.), which allows us to push and pop changes quickly and easily. More info on that can be seen in this talk: https://academy.realm.io/posts/try-swift-brandon-williams-writing-testable-code/

@cloudface
Copy link
Author

Thank you for the quick reply! We use carthage in our project to manage our dependencies and FBSnapshotTestCase doesn't support it (only Cocoapods). How are you guys dealing with your dependencies? I see you have a makefile but I couldn't make out what kind of build system you guys are using.

@stephencelis
Copy link
Contributor

We use git submodules and drag the associated project files into our main project (see Makefile#L45-L47). We have very few dependencies (and half of them internal), so manually managing submodules hasn't been an issue!

@cloudface
Copy link
Author

Gitsubmodules is an interesting way to do it, thanks for the tip! I will look into that. Thanks again for the help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants