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
0
votes
2 answers

OCMock: mocked protocol isn't stopped correctly

I have a test case using OCMock which does the following: CAAOAuth2AuthenticationManager *oAuth2AuthManager = [[CAAOAuth2AuthenticationManager alloc] init]; id authDelegate = [OCMockObject mockForProtocol:@protocol(CAAAuthenticationDelegate)]; id…
Denis Loh
  • 2,194
  • 2
  • 24
  • 38
0
votes
2 answers

SenTestingKit setUp and tearDown overrides get called twice

I am using KIF to test our iOS app. I am trying to make some tests that will go before and after my whole test sweet. I made a SenTestSuite category and overrode -setUp and -tearDown: -(void)setUp { [tester loginCurrentVersion]; …
SirRupertIII
  • 12,324
  • 20
  • 72
  • 121
0
votes
2 answers

How to set the order sentestkit-test runs?

I am using SenTestKit to test an iOS app. I've split tests into methods which run For example: In @interface simpleGameTests : SenTestCase With tests: - (void)testFindingFacebookFriends - (void)testRegisterUsernameFromForm - (void)testStartGame It…
bogen
  • 9,954
  • 9
  • 50
  • 89
0
votes
0 answers

How to access UIViewController delegate methods in SenTestCase implementation with blocks?

I am writing some automated tests that will test some actions happening inside my root UIViewController. As of now I'm using SenTestCase. I am using storyboards also. How can I do this? And how can I easily listen for delegate methods on the view…
bogen
  • 9,954
  • 9
  • 50
  • 89
0
votes
0 answers

STAssertEquals: null pointer and NULL gives type mismatch error

What is wrong, here I am doing? ptr == NULL is true, This is also ok, STAssertTrue(ptr == NULL, @"ptr is null"); //succeeded But, STAssertEquals(ptr, NULL, @""); is giving error, "Type mismatch --- ". - (void) testNilEncoding { NSString *…
karim
  • 15,408
  • 7
  • 58
  • 96
0
votes
0 answers

Extending an objc unit test class runs the superclass's tests again

I am writing Objective-C unit tests in Xcode. I would like to extend my base class so I can reuse my setUp/tearDown methods. I created a header and put the imports there, since Xcode defaults to making just an implementation file. Extending the base…
owenfi
  • 2,471
  • 1
  • 24
  • 37
0
votes
1 answer

RestKit Testing mapping issue

I am using Restkit 0.20.3 and trying to setup a simple test scenario: I have a simple model that contains a static method to return its mapping: @interface TKTag : NSObject @property (nonatomic) int _id; @property (strong, nonatomic) NSString…
Gustavo Barbosa
  • 1,340
  • 1
  • 17
  • 27
0
votes
1 answer

Failing OCUnit tests don't take me to the failing line when I click the error in XCode

I've got a large iOS project set up with OCUnit tests, some of which are imported from a dependent project, and some of which are local. When I have a failing test in the dependent project, I can click the error, and be transported to the line…
joseph.hainline
  • 24,829
  • 18
  • 53
  • 70
0
votes
1 answer

IOS Unit tests throw exception if overriding drawRect in a UIView

I am writing an app that involves me overriding the drawRect function in UIViews to draw different shapes into the App. I normally unit test all of my apps using the inbuilt SenTestingKit. As soon as I include any contextRefCG drawing stuff,…
Marryat
  • 535
  • 3
  • 11
0
votes
1 answer

Can we add dependency in between unit test class1 to unit test class2 iOS

I have started writing Unit Test cases for my existing application for testing functional flow. I am using OCUnit (SentestingKit.framework). App is client-server based app. There are five tabs in my app after login screen. My problem is I want to…
Ameer
  • 705
  • 8
  • 18
0
votes
1 answer

Understanding SenTestingKit Log Output

I am trying fully understand the final console output generated from my unit tests: Test Suite 'Multiple Selected Tests' finished at 2013-02-21 22:54:57 +0000. Executed 6 tests, with 0 failures (0 unexpected) in 0.034 (0.052) seconds most of it…
Mike D
  • 4,938
  • 6
  • 43
  • 99
0
votes
1 answer

EXC_BREAKPOINT using UITableViewCell's textLabel's text in a test target

I have a test target where I am testing a table view data source.I want to test that the cell's textLabel returned by tableView:cellForRowAtIndexPath: contains the text I expect, but when I set the textLabel's text I get a EXC_BREAKPOINT…
e1985
  • 6,239
  • 1
  • 24
  • 39
0
votes
1 answer

STFail in block

When running tests using SenTestingKit, they don't fail correctly inside a block, e.g. operation = [AFJSONRequestOperation JSONRequestOperationWithRequest:request success:^(NSURLRequest…
Snowcrash
  • 80,579
  • 89
  • 266
  • 376
0
votes
1 answer

Getting iPhone Documents Directory in TestCases

I'm running test cases which uses sqlite database to test my code on iPhone simulator using default SenTestingkit, when i try to get the home directory using either of the following ways NSArray *paths =…
Mahmoud Adam
  • 5,772
  • 5
  • 41
  • 62
0
votes
1 answer

Xcode 4.3.3 missing SenTestingKet.framework causes Undefined symbols "_OBJC_METACLASS_$_SenTestCase"

On my MAC mini osx-snow-leopard xcode4.1 my project can run SenTestingKit.framework tests. Got a MACBook Pro with osx-lion 10.7.4 with xcode4.3. For the same project I cannot run unit tests because SenTestingKit.framework is not to be found. I…
Andy in Boulder
  • 441
  • 1
  • 4
  • 7