Questions tagged [sentestingkit]

SenTestingKit is Apple's install of OCUnit on Mac OS X 10.4.

It is installed as SenTestingKit.framework.

It is used by making a new target - a "Unit Test Bundle" - in an XCode project.

96 questions
1
vote
3 answers

Where does OCUnit store NSUserDefaults?

I read the question Easy way to see saved NSUserDefaults? I found the .plist file for the app, but where's the one for the testing bundle?
ma11hew28
  • 121,420
  • 116
  • 450
  • 651
1
vote
1 answer

KIF in a project with a static library

I am planning to use KIF in the following setup: 1. My own static library 2. Many 'shell' apps that use the static library. These apps provide the content and configuration, but they all use the common library to load the content based not the…
Zsolt
  • 3,648
  • 3
  • 32
  • 47
1
vote
1 answer

SenTestCase isn't failing when an exception is thrown

I have the following test: Header: #import @interface MyTest : SenTestCase - (void)testFoo; @end Implementation: @implementation MyTest - (void)testFoo { NSString* foo = nil; NSDictionary* bar = @{@"bar":…
gregschlom
  • 4,825
  • 4
  • 28
  • 23
1
vote
2 answers

STAssertEquals reports equal strings as being different

I was trying to write a unit test for a library. A method from library returns string and I wanted to make sure it returns right string. But somewhat STAssertEquals macro in SenTestKit saw it as different value even though it was same. You can see…
REALFREE
  • 4,378
  • 7
  • 40
  • 73
1
vote
1 answer

How can i add SenTestCase to a cordova or phonegap project?

when I try to add a test target in an ios project generated via phonegap I get a linker error. It seems like the cordova project inside my project is not able to be found (i think) and so it is throwing an error when i run tests. I have spent a…
cowley05
  • 123
  • 1
  • 1
  • 10
1
vote
0 answers

Getting XCode to report a test case failure in a calling class

If I write a helper method for test case: - (void)testCallsHelper { [self helper]; // Can I get Xcode to highlight the failure here? } - (void)helper { STFail(@"Fail"); // Xcode highlights failure here } This would be handy because it's…
Ben Flynn
  • 18,524
  • 20
  • 97
  • 142
1
vote
3 answers

Variable destroyed in unit test

all: I've the following unit tests class (implementation file shown): @implementation SampleTests { A* c; NSString* token; } - (void)setUp { [super setUp]; // Set-up code here. c = [[A alloc] init]; } - (void)tearDown { //…
neutrino
  • 2,297
  • 4
  • 20
  • 28
1
vote
0 answers

SenTestingKit in Xcode

Hi I've got this caution message, I didn't have it before: ld: warning: ignoring file /Applications/Xcode.app/Contents/Developer/Library/Frameworks/SenTestingKit.framework/SenTestingKit, missing required architecture armv7 in file…
Icarox
  • 63
  • 10
1
vote
0 answers

Customizing SenTest/OCUnit

From time to time, I have the impulse to modify some aspects of the Mac/iOS unit testing framework. I wouldn't want to sacrifice its nice integration with XCode, but at times I find myself hankering to change some details: Send messages to a…
Mark Bernstein
  • 2,090
  • 18
  • 23
1
vote
1 answer

Test NSNotification delivery

I'm trying to make sure the NSNotification gets sent after reportIssue is called. I get this error: error: -[APHIssueComposerTests testPopulatedIssueIsReceived] : OCMockObject[APHIssueComposerTests]: expected method was not invoked:…
Rose Perrone
  • 61,572
  • 58
  • 208
  • 243
1
vote
2 answers

EXC_BAD_ACCESS in objc_msgSend while "Instrument Program Flow" is enabled

I've spent a few days trying to track down this issue with no luck so far. I am trying to measure test coverage in my project, a Mac OS application developed in Objective-C with Xcode, and this means enabling "Instrument Program Flow" and "Generate…
danpalmer
  • 2,163
  • 4
  • 24
  • 41
1
vote
0 answers

cocos2d unit testing. Undefined symbol

trying to convince myself of the benefits of unit testing and TDD I decided to include tests with my latest Cocos2D project. Getting the initial boiler-plate test up and running works fine, but alas, I have not been able to go very far after this.…
1
vote
0 answers

Core-data with SenTestCase class : unexpected error

I am working on an application which stores and retrieves data from sqlite db, using core data. For this I have created a separate class which acts like a data link layer - LocalDBController Below is the implementation of one of its methods-…
Devarshi
  • 16,440
  • 13
  • 72
  • 125
1
vote
1 answer

Assertion in Helper Class Ignored

I have a test case and a helper class. In the helper class I want to use asserts too like here: MainTests.h #import @interface MainTests : SenTestCase @end MainTests.m #import "MainTests.h" #import…
fabb
  • 11,660
  • 13
  • 67
  • 111
1
vote
2 answers

Use OCMock to verify if a method is invoked

Im a beginner to OCMock and I need to verify if a method is invoked from another class. The following is my code. //Creating the OCMockObject id mockProductRequest = [OCMockObject mockForClass:[ProductRequest class]]; [[mockProductRequest expect]…
Jani
  • 1,400
  • 17
  • 36