I am new to unit testing in iOS and need to write unit test for an iOS 7 application. I see that XCTest is there to write unit test with the help of test navigator and assistant editor. Since "unit testing" means we are testing a piece of code [which can be a single method or a group of related methods ] . How can we write unit test for UI ? Let say we do have a settings screen at start of application which is having some set of options that user needs to select and then it will be saved to NSUserDefaults for later use. My question: How we use XCTest to: 1. Show UI [user interface is in storyboard ] so as to be able to verify the various UI elements on it including some custom drawn UI working.
May be I am a little confused over using XCTest for UI's unit testing so it would be great if anyone can clarify on above.
I have also seen apple's UIAutomation but how can we integrate it into our test target ?