• 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
Re: Can't test my framework from its target, only from its app?!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can't test my framework from its target, only from its app?!


  • Subject: Re: Can't test my framework from its target, only from its app?!
  • From: Daryle Walker <email@hidden>
  • Date: Tue, 03 May 2016 21:07:34 -0400

Now I can run test cases under my framework. However, doing so briefly launches my app. How can I turn that off? (I mentioned that old framework-only project. That case must have launched some sort of default Xcode-internal app for app-less frameworks. I guess I want to use that instead of my unfinished app.)

— 
Daryle Walker
Mac, Internet, and Video Game Junkie
darylew AT mac DOT com 

On May 3, 2016, at 4:50 AM, Kevin Meaney <email@hidden> wrote:

I would look in the test phase of the scheme editor for your framework scheme you want to test.

What you will be looking for when you click on test in Test (I know it is confusing) and then in the info panel look to see what test targets are included in the lists titled tests. If you have no targets there then you have no tests to run.

Kevin

On 3 May 2016, at 01:02, Daryle Walker <email@hidden> wrote:

Started a standard NSDocument-based (OS X) app in Xcode. Using Swift, along with regular and UI tests, but not Core Data.  The template code compiles just fine.  Added a Swift framework target, including regular tests, to the same project.  Xcode automatically added the framework as a dependency for the app, although the later doesn’t use anything from the former right now.

Added enough code to the framework to add a test case to its unit tests.  Xcode gives me an option to build, but not to test (greyed out).  Before giving up, I try the app’s tests.  Not only does it run its regular and UI tests, but the test for the framework too!

The project file has 6 groups on the side, under my app’s project file.  They’re folders for the app, the app’s regular unit tests, the app’s UI tests, the framework, the framework’s unit tests, and the products.  The project folder has 2 entries in black for the app and framework, and 3 entries in red for their unit tests.

A few months ago, I had a framework-only project that ran its unit tests just fine.  What can I tweak so my current framework’s unit tests can be run separately from the app’s tests?  It’s probably either in the build and/or scheme settings.

 _______________________________________________
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

References: 
 >Can't test my framework from its target, only from its app?! (From: Daryle Walker <email@hidden>)
 >Re: Can't test my framework from its target, only from its app?! (From: Kevin Meaney <email@hidden>)

  • Prev by Date: Apple Developer Reference Library Safari Pluginw
  • Next by Date: Building an iOS Framework - should its framework/library links be Required or Optional?
  • Previous by thread: Re: Can't test my framework from its target, only from its app?!
  • Next by thread: Apple Developer Reference Library Safari Pluginw
  • Index(es):
    • Date
    • Thread