• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Testing iOS app code without launching the app
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Testing iOS app code without launching the app
      • From: Joar Wingfors <email@hidden>
  • Prev by Date: Re: Train Wreck using xcodebuild in Xcode 6.0.1
  • Next by Date: Re: Testing iOS app code without launching the app
  • Previous by thread: Re: [Solved] Train Wreck using xcodebuild in Xcode 6
  • Next by thread: Re: Testing iOS app code without launching the app
  • Index(es):
    • Date
    • Thread