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
3
votes
1 answer

Loading an NSPersistentDocument from a unit test

I'm attempting to write an integration test using the OCUnit/SenTest Framework which I feel relatively comfortable with. The test is regarding the loading of an NSPersistentDocument-subclass which relies on a CoreData Managed Object Model which is…
user229564
3
votes
1 answer

iPhone automated: Setting order of tests in OCUnit or FoneMonkey

I'm using FoneMonkey for automation, which utilizes OCUnit (SenTestingKit) for programmatically writing test cases. Does anyone know if there's a way to define the order in which test scripts are run? And within each script, is there a way to…
LiCha
  • 41
  • 1
3
votes
1 answer

Xcode completion inside STAssert*() macros

I've started using Xcode4's SenTest unit testing facilities. It's been working pretty well, but ... Xcode isn't offering code completion suggestions inside STAssert*() macros. I like to write simple expressions right into the assert, to save…
Mike Clark
  • 10,027
  • 3
  • 40
  • 54
3
votes
4 answers

iOS App crashes on Apple approval process but not for me

I have been trying to update an iOS client app now for the past 2 weeks, unfortunately it has been rejected twice as Apple say that it crashes on iOS7. Apple have sent me the following crash report. Incident Identifier:…
3
votes
0 answers

Segmentation fault: 11 running Xcode unit tests using xctool

I'm trying to use xctool to run my Xcode unit tests from a Jenkins server for CI purposes. When I run my tests via: xctool -project MyApp.xcodeproj -scheme MyApp test -sdk iphonesimulator I get the following…
chinabuffet
  • 5,278
  • 9
  • 40
  • 64
2
votes
1 answer

Can I run my iPhone unit tests programmatically?

Our iPhone app uses the built-in SenTestingKit for unit tests, and KIF for functional tests. We're using Zapp for CI, which runs the functional tests but not the unit tests. As a stopgap, I'd like to add a functional test scenario which runs the…
Simon
  • 25,468
  • 44
  • 152
  • 266
2
votes
1 answer

How to test if a block gets invoked

I have a unit test for a method that should call either a completion block or a failed block. Now I know for every case which one should be called so I use STFail in the block that should not be invoked. How can I now test that the block that should…
Besi
  • 22,579
  • 24
  • 131
  • 223
2
votes
1 answer

OCUnit: How to change the prefix of test-case methods?

Instead of the prefix test, I want to use spec because I prefer BDD vocabulary. E.g., instead of: - (void)testExample I want to call it: - (void)specExample How can I do this?
ma11hew28
  • 121,420
  • 116
  • 450
  • 651
2
votes
2 answers

What is the equivalent to a test fixture setup method in SenTestCase?

Like most unit testing frameworks, SenTestCase has setUp and tearDown methods you can override to run code before and after each test. In NUnit, I'm used to having a fixure setup and fixture teardown method I can override, too, that will let me run…
Sandy
  • 1,968
  • 14
  • 25
2
votes
2 answers

iOS: xcode 5, migrate project from xctest to senTestingKit

I have Xcode 5.0.2. I created new project. New project already has test target which is based on XCTest framework. But XCTest is not working with iOS 6.1. But I want to test my project on iOS 6.1, for this i believe I should migrate to…
Jim
  • 8,874
  • 16
  • 68
  • 125
2
votes
1 answer

OCMock test not getting compiled with XCTest

Has anyone tried using OCMock test framework with XCTest framework? We were using OCMock test framework with SenTest framework and ever since we migrate from SenTest to XCTest, OCMock tests stops compiling. I know, XCTest does not have in-built…
Abhinav
  • 37,684
  • 43
  • 191
  • 309
2
votes
2 answers

Is there a way to easily run a specific group of tests or a single test in xcode?

Is there a way to run a single test in isolation, or a group of tests? I find that when I am trying to debug a particular test, it's really annoying because previous test cases may trigger that same break point-- So I typically comment out all my…
patrick
  • 9,290
  • 13
  • 61
  • 112
2
votes
0 answers

Running ios ocunit logic tests through command line fails to access keychain

I am trying to run my logic tests (OCUnit) using command line. but it fails with errors. Command used xcodebuild -sdk iphonesimulator4.3 -configuration Debug -project XYZ.xcodeproj -target XYZ build Error *** Terminating app due to uncaught…
Kani
  • 25
  • 5
2
votes
3 answers

iOS tests succeeding, but not running

I have a couple of SenTestCase subclasses (Logic tests) in by test target, with STFail macros in the test methods. I added the test target through Xcode, when I first created the project (checked "Include Unit Tests"). When I run my tests, I get a…
elsurudo
  • 3,579
  • 2
  • 31
  • 48
2
votes
1 answer

NSManagedObjectModel initialized with mergedModelFromBundles:nil not finding model in SenTestCase

I am trying to use CoreData in a SenTestCase. The problem is the NSManagedObjectModel which is not found. I have tried to initialize it with a URL by searching for the mom file in the application bundle but I could not find it. That is why I…
bas
  • 465
  • 5
  • 13