Is there a way to run XCTests without actually launching my app? The app’s startup logic is interfering with my test scenario.
@drance I break the vast majority of tests off into more isolated subsystems, and then only a few "sloppy" tests or UI tests go in the host.
-
-
@danielpunkass Cocoa likes to call NSUserDefaults, which doesn’t like it when there’s no main .app bundle with an identifier. - View other replies
-
@mjtsai@danielpunkass NSUserDefaults doesn't like it when there's no bundle ID. A bundle ID can be given to unbundle apps. - View other replies
-
-
@danielpunkass My code doesn’t depend on those, but framework code does. Tried swizzling to break dependencies but ran into trouble. - View other replies
-
@mjtsai Hmph. Well if you got as far as trying to swizzle then I trust there are difficult obstacles to overcome.
-
-
-
@danielpunkass That’s what I’d like to do, but I found that a lot of NSAttributedString stuff will crash if it’s not running inside an app. -
@mjtsai My test-runner has a -a flag that does -[NSApplication sharedApplication], *seems* to take care of most issues.@danielpunkass -
@mpweiher@danielpunkass Interesting. I had tried NSApplicationLoad(), which didn’t help. Will try this. Thanks.
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
Matt Drance
Daniel Jalkut
Michael Tsai
Rosyna Keller
Marcel Weiher