Having an issue since updating to Xcode 4.5 when running my unit tests via command line.
The following is the output i’m seeing when i try to run my tests
Unknown Device Type. Using UIUserInterfaceIdiomPad based on screen size
Terminating since there is no workspace.
/Applications/Xcode.app/Contents/Developer/Tools/RunPlatformUnitTests.include:334: note: Passed tests for architecture 'i386' (GC OFF)
/Applications/Xcode.app/Contents/Developer/Tools/RunPlatformUnitTests.include:345: note: Completed tests for architectures 'i386'
Even though it does say the tests have passed and completed, I don’t think they have actually have been run.
I’m using the following command to run the tests:
xcodebuild -workspace MyApp.xcworkspace -scheme MyAppTests -sdk iphonesimulator -configuration Debug clean build TEST_AFTER_BUILD=YES
Has anyone run into the same problem and can offer a solution?
Just thought I should also share what I did for a solution to this issue. I followed the solution outlined in https://stackoverflow.com/a/10823483/666943 but converted the ruby script to shell. At the end I basically installed
ios-simvia homebrew and replace theRun Scriptin theBuild Phasesof my Test target with the following:To start the test now I pass in the argument
RUN_UNIT_TEST_WITH_IOS_SIM=YESe.g.