• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
SenTestingKit / SenTestCase not working on iPhone
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SenTestingKit / SenTestCase not working on iPhone


  • Subject: SenTestingKit / SenTestCase not working on iPhone
  • From: "Michael A. Crawford" <email@hidden>
  • Date: Sun, 29 Nov 2009 20:17:37 -0500

I'm trying to test a parser I created for a web service using OCUnit/SenTestingKit.  (They're the same thing, right?)  I've defined the test class, which I've abbreviated below.  On my first attempt the build failed because the SenTestingKit framework had not been added to the project.  I tried to add it but it wasn't in the default list of available project frameworks.  I had to hunt it down on the drive.  I found it at the following location: /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.1.sdk/Developer/Library/Frameworks/SenTestingKit.framework.

Once I added it to the project the project builds but the tests do not run.  What have I missed?  Anyone out there currently using this test framework?  I haven't used it since the 2.X SDK and back then it worked just fine.

#import <Foundation/Foundation.h>
#import <SenTestingKit/SenTestingKit.h>

#import "MPData.h"

@interface MPDataTest : SenTestCase
{
   MPData* mpData;
}
@end


@implementation MPDataTest

- (void)setUp
{
   static NSString * const kXMLTestString = @"<?xml version=\"1.0\"?><Response><time>12:32 PM</time><date>November 24, 2009</date><Error>NO_ERROR</Error></Response>";

   NSData* data = [kXMLTestString dataUsingEncoding:NSUTF8StringEncoding];
   mpData = [[MPDataTest alloc] initWithData:data];
}

- (void)tearDown
{
   [mpData release];
}

- (void)testCreateMPData
{
   STAssertNotNil(mpData, @"Alloc and initWithData for MPData instance failed");
   STAssertTrue(mpData.isValid, @"MPData failed validation");
}

- (void)testFail
{
   STFail(@"Yep, it works!");
}

@end

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: SenTestingKit / SenTestCase not working on iPhone
      • From: Paul Summermatter <email@hidden>
    • Re: SenTestingKit / SenTestCase not working on iPhone
      • From: Timothy Reaves <email@hidden>
  • Prev by Date: Why am I breaking into gdb?
  • Next by Date: Re: Why am I breaking into gdb?
  • Previous by thread: Re: Why am I breaking into gdb?
  • Next by thread: Re: SenTestingKit / SenTestCase not working on iPhone
  • Index(es):
    • Date
    • Thread