Given the following setup:
- A document-based OS X app written in Swift
- OS X El Capitan dev machine
- Xcode 7.x
- The new / upgraded XCTest framework
How can the document-based parts of the app be UI-tested with the XCTest framework?
Regular unit or UI tests not related to the document-based functionality are easy, but I cannot see how to do UI tests on the document-based bit, given that in UI tests we are forbidden from reaching into the app and, for example, mocking the NSDocument class.
One suggestion I've heard is to create fixture files / folders (depending on what your document-based app needs) in the test resources folder, and somehow get the test to open that. But is there any better solution?