1

I have a large suite of automated tests for my app. I would like to add tests for my wrappers around ABAddressBook and ALAssetsLibrary. However, if these tests run on a simulator that has never accessed either the address book or an asset library in the past, then a request for permission is made to the user.

I'd like to know if anyone has had success bypassing this request in an automated test suite of theirs?

Awesome-o
  • 2,002
  • 1
  • 26
  • 38
  • I know this is old, but I´m having exactly the same problem, and would appreciate any idea on this. If ABAddressBook was open source, it would be possible to use it as stub inside your project (which would be rather overkill). But otherwise, I don´t see any chance to use something like Travis on a project containing tests that include address book – TAKeanice Mar 21 '15 at 19:18
  • This seems to be a workable answer http://stackoverflow.com/a/28473742/1979235 – Awesome-o Mar 22 '15 at 18:19
  • Looks promising, I will test this! Anyway, do you know any solution on why UI Automation does not work, which is a part of the problem which i describe here: http://stackoverflow.com/questions/29197619/ios-ui-automation-testing-in-travis-ci ? – TAKeanice Mar 22 '15 at 20:07

1 Answers1

1

This answer is working, as Awesome-o said: https://stackoverflow.com/a/28473742/1979235 (with some modifications, which I will comment on there)

Community
  • 1
  • 1
TAKeanice
  • 511
  • 3
  • 14