4

when run the target for test cases nothing is happening instead it is showing warning message

warning: Skipping tests; the iPhoneSimulator platform does not currently support application-hosted tests (TEST_HOST set).

i am using xcode 3.2.5 and iOS4.2 ..........

Abizern
  • 146,289
  • 39
  • 203
  • 257
iOSPawan
  • 2,884
  • 2
  • 25
  • 50

2 Answers2

1

I believe you can't run unit tests on the Simulator, you need to run them on the device itself.

Edited to add

Times have changed!

Abizern
  • 146,289
  • 39
  • 203
  • 257
  • u sure i did not find that instruction in iphone documentation. – iOSPawan Dec 24 '10 at 10:06
  • 1
    Logic tests run on the simulator but application tests run on the device https://developer.apple.com/library/ios/documentation/Xcode/Conceptual/iphone_development/135-Unit_Testing_Applications/unit_testing_applications.html – Abizern Dec 24 '10 at 11:55
  • Also http://cocoawithlove.com/2009/12/sample-iphone-application-with-complete.html – Abizern Dec 24 '10 at 11:57
1

Original answer from Dec. 29, 2010:

Ignore Apple's distinction between "Logic tests" and "Application tests". Use GTM instead. You'll have one testing target that works on either the simulator or the device, and can be debugged without additional setup.

New answer:

Xcode's built-in unit testing has come a long way since then. I've switched from GTM back to OCUnit. See http://qualitycoding.org/xcode-unit-testing/

Jon Reid
  • 20,545
  • 2
  • 64
  • 95