ocunit Questions
3
I am wondering if you can link one Unit Testing bundle to multiple targets. So one can test all the application targets with one Testing bundle.
I have some shared code between all app targets but...
Linearity asked 28/11, 2012 at 7:59
4
It looks like Teamcity agent (TC version is 9.0 EAP) has issues with launching iOS Simulator via testing shell script.
I use Build Step: Command Line, which runs Custom Script and passes params to ...
Scolopendrid asked 20/11, 2014 at 9:10
4
Is there an Xcode keyboard shortcut to jump from MyObject.m to MyObjectTests.m, and vice versa? If so, what is it?
Photochemistry asked 17/8, 2011 at 20:10
5
Solved
I have a XCode4 / iOS project with a regular target and unit test target. Everything works fine, except when I try to #import one of my classes in my test class and try to use it. If I try to build...
Marbling asked 25/4, 2011 at 21:7
7
Solved
It is kinda easy to unit test IBOutlets, but how about IBActions? I was trying to find a way how to do it, but without any luck. Is there any way to unit test connection between IBAction in a View ...
5
Solved
I've created a project with a Core Data model in it. The application looks for the model file (.momd) and runs just fine.
Unfortunately, the unit test keeps returning null:
NSURL *dataModelURL = ...
Cinelli asked 14/4, 2011 at 12:5
7
When I'm running unit tests, I'd like to skip some code (e.g. I don't want [[UIApplication sharedApplication] openURL:..] to run). I'm looking for a runtime check if I'm currently running units tes...
Mochun asked 11/7, 2014 at 0:45
3
Solved
I am trying to write an block of code using OCMock's stub andDo method.
In this case UIImageView extension class is being tested. I want to check that the extension calls [self setImage:] with par...
3
Solved
OK, here's my code in my test class:
- (NSManagedObjectContext*)managedObjectContextWithConcurrencyType:(NSManagedObjectContextConcurrencyType)concurrencyType {
NSManagedObjectModel *mom = [NSMa...
2
Solved
I'm building a mapping model for my migration with a custom entity migration policy, and I'd really like to build some unit tests for this migration. The migration seems to work correctly when I ru...
Spoor asked 14/8, 2012 at 19:30
3
Solved
I've been following Apple's documentation on writing unit tests for the iPhone, and out of the box, the routine doesn't seem to work. I'm not sure I understand where the unit test is going to get t...
Anagnorisis asked 7/7, 2009 at 13:39
7
Solved
I'm trying out test driven development in a toy project. I can get the tests working for the public interface to my classes (although I'm still on the fence because I'm writing more testing code th...
Faith asked 8/7, 2009 at 14:46
4
Solved
When I test my app using OCUnit, it sets up the AppDelegate, window and rootViewController as usual before running the tests. My rootViewController then adds itself as an observer for some NSNotifi...
Semi asked 15/8, 2012 at 17:31
6
Solved
I've been following this blog post: Adding unit tests to existing project.
I'm getting this error however:
ld: file not found:
Build/Products/Debug-iphoneos/MyApp.app/MyApp
Command
/Develop...
Wallaroo asked 5/3, 2012 at 22:59
7
I want to run tests in Xcode 4 using OCUnit without launching the simulator. Please, don't try and convince me I am doing unit testing wrong or anything like that. I like to do TDD the traditional ...
Crook asked 1/9, 2011 at 18:24
5
Is it possible to use Jenkins with XCTest?
There's a ruby script (OCUnit2JUnit -- https://github.com/ciryon/OCUnit2JUnit) that parses OCUnit output and creates XML files that Jenkins can parse.
I...
Extrinsic asked 9/10, 2013 at 23:54
5
Solved
NSMutableArray *arr = [NSMutableArray array];
[arr addObject:@"1"];
[arr addObject:@"2"];
[arr addObject:@"3"];
// This statement is fine.
XCTAssertTrue(arr.count == 3, @"Wrong array size.");
// ...
Morn asked 4/10, 2013 at 9:42
2
Solved
Is there a way to "Test" current file in Xcode4?
That is if you are writting your 10th unit test, but rather than going TEST and having all unit tests run, you want to only trigger running those t...
2
Solved
I'm having difficulty testing some logic that uses notifications. I've read about enforcing that particular NSNotifications are sent, but that doesn't really address the problem I'm seeing.
[SomeO...
Anaplastic asked 1/6, 2011 at 17:47
3
Is there a way of ignoring a specific test case without commenting it out?
Some tests are written before the implementation exists, so before commiting any code I'd like to first flag these tests ...
Taylor asked 24/10, 2012 at 10:40
3
Solved
I'm using Unit Testing in XCode 4. I've been adding my application *.m files to the unit test target "compile sources" as I refer to them so the unit test will build/run.
Is there a better way her...
2
Solved
NOTE: Unit testing is a lot easier to setup nowadays. This tutorial is not really relevant for Xcode version 5 and above.
It took me quite some time but I finally managed to make it work for my pr...
Extant asked 14/2, 2011 at 7:13
4
Solved
I'm currently writing an image manipulation test for an iPad app. I have a resources folder inside my unit test target with a photo inside, however when I try to access it using [UIImage imageNamed...
Biggerstaff asked 22/12, 2011 at 10:59
3
Solved
How do you write first responder unit tests?
I'm trying to write a test to confirm that a method advances focus to the next text field. controller is a descendant of UIViewController. But this exp...
Ronna asked 21/5, 2011 at 1:43
2
Solved
When creating an UIWebView inside an unit test I get EXC_BAD_ACCESS:
-(void)test1 {
[[UIWebView alloc] initWithFrame:CGRectZero]; // EXC_BAD_ACCESS
}
Is there a special configuration to run uni...
Safranine asked 17/10, 2011 at 12:11
1 Next >
© 2022 - 2024 — McMap. All rights reserved.