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
6
votes
3 answers

Run unittests with a specific locale (en_US or none)

Is there a way to force a specific locale when running unittests? Eg. always use en_US or force no locale, so that none of the .lproj files are loaded. My unittest is sensitive to the currently selected language in the Settings app (in the iOS…
neoneye
  • 44,507
  • 23
  • 155
  • 143
6
votes
1 answer

Dynamic "test host" or bundle loader for iOS Unit Testing?

How do I make the test host/bundle loader dynamic based on the current scheme? Right now the value is set to: $(BUILT_PRODUCTS_DIR)/MyApp1.app/MyApp1 The problem is I have 4 apps in the workspace and I would like to use the same unit testing suite…
Luke The Obscure
  • 1,504
  • 2
  • 20
  • 35
5
votes
1 answer

Header files not found

I'm adding unit tests (SenTest) to my existing XCode 4.2 project. XCode is complaining that it can't find the required Box2D header files. For instance, Box2D/Dynamics/b2Fixture.h file not found The Box2D source files are added to my project…
user371320
  • 1,388
  • 12
  • 23
5
votes
1 answer

Why is SenTestingKit causing my app to crash?

I've created a map-based app for the iPhone, and recently submitted it to the store. I had no trouble running the app on the device or simulator. However, the store rejected it because it crashed on launch. The crash logs complain that the…
Joel Koroniak
  • 63
  • 1
  • 6
5
votes
3 answers

Where are my core data entities?

I have a pre-existing project to which I've added Core Data models. I added the Core Data framework, added a data model with entities, and included it in my app's target, along with some generated NSManagedObject classes. It compiles nicely, and now…
theory
  • 8,210
  • 8
  • 50
  • 115
5
votes
1 answer

ld: building for iOS Simulator, but linking against dylib built for MacOSX file

So I'm having a bit of an issue, Apple has rejected my app for the past 3 times. And they've always left me with this error. Incident Identifier: 0F8AC4C8-57A6-4E1E-BE2B-0A93E6A85564 CrashReporter Key: …
Jessica
  • 2,337
  • 2
  • 11
  • 14
5
votes
2 answers

Error when running unit tests in Xcode 5.0

When I tried creating a unit test file in xcode 5.0, I get the following error: The test bundle at /.../Tests.octest could not be loaded because it is built for a different architecture than the currently-running test rig (which is running as…
Kermit the Frog
  • 3,629
  • 6
  • 29
  • 38
5
votes
1 answer

Unit Tests are always "successful" after adding OCMock

I would like to use OCMock in my Cocoa project's unit tests. I have downloaded the latest version of OCMock (2.0.1) and copied the OCMock.framework into my project's directory. In Xcode, I have added the framework to the unit test target's link…
waldrumpus
  • 2,460
  • 14
  • 39
5
votes
3 answers

SenTesting stop test after first STAssert fails

Is there a way to stop execution of an iOS unit test once the first STAssert fails? For example if I have multiple STAsserts: STAssertTrue([myobject succeeded], @"failed"); STAssertNotNil(foo,@"bar"); I would love it if Xcode simply stopped…
Msencenb
  • 5,407
  • 11
  • 48
  • 81
4
votes
3 answers

Xcode keyboard shortcut: jump to test file?

Is there an Xcode keyboard shortcut to jump from MyObject.m to MyObjectTests.m, and vice versa? If so, what is it?
ma11hew28
  • 106,283
  • 107
  • 420
  • 616
4
votes
3 answers

Link framework against App and Test Target

I have a custom Framework I use within my normal App target as well as the corresponding UnitTest target. Turns out that confuses the runtime in such way that it is unable to choose the correct implementation since it has multiple…
user816328
4
votes
2 answers

Xcode CI bot errors during unit testing (Unexpected TestSuiteWillFinish)

We recently set up some Xcode bots with an iOS app to automatically build and test an app I'm working on. If I do just build and analyze, the build process works fine. If I set it to run tests, it ends up with a variable amount of errors that end…
thegrinner
  • 9,633
  • 5
  • 39
  • 64
4
votes
1 answer

Unit test without leaving Xcode

Is it possible to run unit tests without the auto-application-switch to the simulator? It gets quite annoying, especially if you're in fullscreen and you end up thrown a "whole desktop" away from the console.
Johannes Lund
  • 1,839
  • 2
  • 18
  • 32
3
votes
1 answer

How to write a test case?

In my application, I have two text fields for entering User-name and Password. I need to write test case for checking Password field is not empty. I Set Up the testing environment and I know how to call methods from testing class, but I don't know…
rakeshNS
  • 4,077
  • 4
  • 25
  • 40
3
votes
2 answers

Any way to run code in SenTest only on a success?

In my Mac Cocoa unit tests, I would like to output some files as part of the testing process, and delete them when the test is done, but only when there are no failures. How can this be done (and/or what's the cleanest way to do so)?
Dov
  • 14,039
  • 12
  • 71
  • 151