Questions tagged [ocunit]

OCUnit is a unit testing framework for the Objective-C language and included with Apple's Xcode IDE since Xcode 2.1.

OCUnit is a unit testing framework for the Objective-C language and included with Apple's Xcode IDE since Xcode 2.1.

It was created by Sen:te and modeled after the original Smalltalk unit testing framework. In design and use it is similar to classical JUnit, but taking advantage of Objective-C's runtime features to automatically locate tests to run.

263 questions
0
votes
1 answer

How do I link my executable to my test bundle when debugging test using otest?

I'm using kind of a hybrid of Chris Hanson's excellent Xcode unit testing guide. My program is a (command-line) application (which precludes using the executable itself to run the tests), but I need to be able to debug my unit tests. So what I have…
Redwood
  • 66,744
  • 41
  • 126
  • 187
0
votes
1 answer

iOS – How to run OCUnit tests every time I run my application in simulator

How do I configure so that OCUnit tests are running every time I choose to run my application on the simulator in Xcode? (Xcode 4.5.1) My app runs the test fine if I go through Cmd+U` but not when I choose to run my application. I then get this…
Peter Warbo
  • 11,136
  • 14
  • 98
  • 193
0
votes
2 answers

STAssertEqualObjects not working with NSString using OCUnit in Xcode

Can't figure out whats going on here . . . I've got a simple unit test thats designed to test a parser. Test case looks like this: [parser didStartElement:@"mobileresponse" attributes:[NSDictionary dictionaryWithObject:@"http://www.espn.com/"…
Sean Danzeiser
  • 9,141
  • 12
  • 52
  • 90
0
votes
1 answer

why is this OCUnit test failing?

It's stepping into the ViewDidLoad of the main view controller, and hitting the line calling get all tweets, but I put a breakpoint in the getAllTweets of both the base and derived to see if it just wasn't hitting the derived like I…
Mark W
  • 3,879
  • 2
  • 37
  • 53
0
votes
0 answers

OCUnit in XCode 4, problems accessing class to test

I added a Cocoa Touch testing bundle to my existing iPhone application, the default test seems to run (fail!) just fine, but when I try to add my class from my project to the test target I am not able access the class from that file. I added the…
Sune Trudslev
  • 964
  • 6
  • 11
0
votes
1 answer

Is it possible to OCMock a class call in a static method?

Am just getting started with OCMock so bear with me - I have been looking through the documentation and loads of examples but am yet to find a definitive answer - is it possible to mock out an init call within a static method, for example: +…
ChrisH
  • 285
  • 3
  • 13
0
votes
1 answer

Unit test for comparing return string from server

I am trying to learn unit tests. Following is my first ever written unit test for comparing string returned from the server. I am sure it's not perfect the way I handled the internet connection's availability and nsnotification. Test…
Paresh Masani
  • 7,474
  • 12
  • 73
  • 139
0
votes
1 answer

Kiwi testing on iOS for Asynchronous with delegates

I am trying to work with kiwi testing for an asynchronous component. I have read the kiwi wiki notes (http://www.kiwi-lib.info/mocks_and_stubs.html) and the one on asynchronous, and the example they have had a block for the request. Now, I have a…
Doz
  • 7,009
  • 12
  • 61
  • 69
1 2 3
17
18