Skip to content
This repository has been archived by the owner on Jan 17, 2019. It is now read-only.

My tests require photos in the Camera Roll but this is empty #28

Open
pellyco opened this issue Mar 13, 2017 · 3 comments
Open

My tests require photos in the Camera Roll but this is empty #28

pellyco opened this issue Mar 13, 2017 · 3 comments

Comments

@pellyco
Copy link

pellyco commented Mar 13, 2017

Some of my tests have a requirement to attach photos. For this we have a number of photos stored in the Camera Roll. We then can attach a photo in our app. However, we delete the simulator each time (starting fresh each time we found to be more reliable) and there are no photos in the Media folder of the device type so when we go to add a photo as an attachment in our app the tests fail. Would it be possible for the media folder to be pre-populated with a sample photo? I have looked at adding something like:
xcrun simctl addmedia {UUID} ./Automation/Media/*.jpg or
xcrun simctl addmedia booted .
/Automation/Media/*.jpg
Any suggestions on the best approach ? Thank you for any help.

@plu
Copy link
Owner

plu commented Mar 13, 2017

I think xcrun simctl is the easiest way to approach this.

There's also support for that in FBSimulatorControl - so you could fork pxctest and add the functionality directly there. Maybe you can figure out a generic way of implementing this, so we can merge it back upstream here?

@pellyco
Copy link
Author

pellyco commented Mar 13, 2017

Thanks - yes I will look at making any solution generic so we can merge it back upstream.

@davetobin
Copy link
Contributor

@plu @pellyco I've noticed that when the devices are booted headlessly they include the default photos so maybe the same setup can be added to the standard boot?

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

No branches or pull requests

3 participants