Xcode 6.3 (6D570): Xcode generated projects cannot be unit tested from the command line

Originator:dan
Number:rdar://20523874 Date Originated:13-Apr-2015 10:11 PM GMT
Status:Open Resolved:
Product:Developer Tools Product Version:
Classification: Reproducible:Always
 
Summary:
Building and running Unit Tests for an Xcode Project that uses a target for it’s tests isn’t possible.
The only reliable way I can make projects run tests from the command line is to use a scheme for tests, although this isn't setup by default.

Steps to Reproduce:
  1. Create a new Xcode Project (I'm using an empty Cocoa application)
  2. Open Terminal.app
  3. cd into the same directory as the xcode project
  4. run `xcodebuild test` - it will detect the project and fail to run the tests
  5. Fine, lets be more explicit: run `xcodebuild -project $project_name -target ${project_name}Tests test` -- still fails
  6. Ok, what about specifying configuration? `xcodebuild -project $project_name -target ${project_name}Tests -configuration Debug test` -- still fails

Expected Results:
It should run the tests

Actual Results:
It failed with "test action is unsupported"

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!