Testing iOS app code without launching the app
Testing iOS app code without launching the app
- Subject: Testing iOS app code without launching the app
- From: Rick Mann <email@hidden>
- Date: Thu, 25 Sep 2014 18:21:18 -0700
I want to test some portions of my iOS app code, but I don't want to launch the app and have it run normally. I tried removing the "TestHost" setting, and my test case code is called, but I get a lot of complaint in the console:
2014-09-25 18:15:28.532 xctest[2000:65536] The test bundle at /Users/rmann/Library/Developer/Xcode/DerivedData/MyApp-auobiejrzuhkuqauzyhmxrwpscqz/Build/Products/Debug-iphonesimulator/MyApp Tests.xctest could not be loaded because a link error occurred. It is likely that dyld cannot locate a framework framework or library that the the test bundle was linked against, possibly because the framework or library had an incorrect install path at link time.
2014-09-25 18:15:28.533 xctest[2000:65536] Detailed error information: Error Domain=NSCocoaErrorDomain Code=3588 "The bundle “MyApp Tests.xctest” couldn’t be loaded." (dlopen(/Users/rmann/Library/Developer/Xcode/DerivedData/MyApp-auobiejrzuhkuqauzyhmxrwpscqz/Build/Products/Debug-iphonesimulator/MyApp Tests.xctest/MyApp Tests, 265): Symbol not found: _OBJC_CLASS_$_JobManager
Referenced from: /Users/rmann/Library/Developer/Xcode/DerivedData/MyApp-auobiejrzuhkuqauzyhmxrwpscqz/Build/Products/Debug-iphonesimulator/MyApp Tests.xctest/MyApp Tests
Expected in: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Xcode/Agents/xctest
in /Users/rmann/Library/Developer/Xcode/DerivedData/MyApp-auobiejrzuhkuqauzyhmxrwpscqz/Build/Products/Debug-iphonesimulator/MyApp Tests.xctest/MyApp Tests) UserInfo=0x7fe11aa050a0 {NSLocalizedFailureReason=The bundle couldn’t be loaded., NSLocalizedRecoverySuggestion=Try reinstalling the bundle., NSFilePath=/Users/rmann/Library/Developer/Xcode/DerivedData/MyApp-auobiejrzuhkuqauzyhmxrwpscqz/Build/Products/Debug-iphonesimulator/MyApp Tests.xctest/MyApp Tests, NSDebugDescription=dlopen(/Users/rmann/Library/Developer/Xcode/DerivedData/MyApp-auobiejrzuhkuqauzyhmxrwpscqz/Build/Products/Debug-iphonesimulator/MyApp Tests.xctest/MyApp Tests, 265): Symbol not found: _OBJC_CLASS_$_JobManager
Referenced from: /Users/rmann/Library/Developer/Xcode/DerivedData/MyApp-auobiejrzuhkuqauzyhmxrwpscqz/Build/Products/Debug-iphonesimulator/MyApp Tests.xctest/MyApp Tests
Expected in: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Xcode/Agents/xctest
in /Users/rmann/Library/Developer/Xcode/DerivedData/MyApp-auobiejrzuhkuqauzyhmxrwpscqz/Build/Products/Debug-iphonesimulator/MyApp Tests.xctest/MyApp Tests, NSBundlePath=/Users/rmann/Library/Developer/Xcode/DerivedData/MyApp-auobiejrzuhkuqauzyhmxrwpscqz/Build/Products/Debug-iphonesimulator/MyApp Tests.xctest, NSLocalizedDescription=The bundle “MyApp Tests.xctest” couldn’t be loaded.}
Program ended with exit code: 1
The XCTest docs talk about app-vs-library tests, but the bit about the bundle loading is buried in "Running Tests and Viewing Results", and none of it is clear on how to properly set up the two different kinds of tests.
How do I do this?
--
Rick Mann
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden