3

I want to write tests for an iOS 8 app. The app starts in the simulator before the tests are run and it loads all possibly existing preferences and keychain items. As it's impossible to correctly test the app, when there always could be leftover preferences from earlier tests or manual usage of the simulator, I would like to reset the app every time before the tests are executed. How could I do this?

Peacemoon
  • 3,198
  • 4
  • 32
  • 56
viirus
  • 1,037
  • 1
  • 11
  • 21
  • 5
    possible duplicate of [How do I reset the application data after each test with Xcode 7 UI Testing?](http://stackoverflow.com/questions/32351149/how-do-i-reset-the-application-data-after-each-test-with-xcode-7-ui-testing) – durron597 Sep 11 '15 at 15:46
  • Why not use ```tearDown``` to clean after each test? – user996142 Sep 11 '15 at 16:26
  • This question has multiple solutions which may be of help. http://stackoverflow.com/questions/33107731/is-there-a-way-to-reset-the-app-between-tests-in-swift-xctest-ui-in-xcode-7 – Billy Boyo Sep 08 '16 at 16:20

0 Answers0