This Question is Possibly Answered

1 "correct" answer available (4 pts) 2 "helpful" answers available (2 pts)
1 Replies Last post: Feb 26, 2013 4:33 PM by Anton Makeev  
Chris Hatton Newbie 7 posts since
Aug 2, 2012
Currently Being Moderated

Feb 22, 2013 1:41 AM

Running OCUnit test case in Simulator

Hello. I am writing OCUnit tests for an existing project.

 

It's going ok, but I have become stuck running a test which uses NSURLConnection to test server communication.

The runtime environment is just not firing the NSURLConnection at all (delegate methods are never called).

 

I think this is because the tests are not running in an iOS context on Simulator (tests run but Simulator is not invoked). I think I need to edit the 'Test Host' for the Project Test Target to get it to run the test for Simulator instead, but it's not clear what is the expected value for 'Test Host' should be, in project settings:

Screen Shot 2013-02-21 at 21.27.09.png

Can anyone advise?  How can I get my NSURLConnection reliant test to run?  The ASynchronicity is not a problem; I have NSCondition locks to handle this, the NSURLConnection just never starts.

 

Thanks.

Anton Makeev JetBrains 1,083 posts since
Dec 19, 2006
Currently Being Moderated
Feb 26, 2013 4:33 PM in response to: Chris Hatton
Re: Running OCUnit test case in Simulator

Chris,

please see http://youtrack.jetbrains.com/issue/OC-6476 for the workaround.

More Like This

  • Retrieving data ...