Re: SenTestingKit / SenTestCase not working on iPhone
Re: SenTestingKit / SenTestCase not working on iPhone
- Subject: Re: SenTestingKit / SenTestCase not working on iPhone
- From: Paul Summermatter <email@hidden>
- Date: Mon, 30 Nov 2009 09:17:52 -0500
Michael,
It's been some time since we set this up, so I'm a little fuzzy on
the details, but we definitely have unit tests working with our iPhone
3.1 app. I just ran the tests a few hours ago. The tests work on
both Leopard and Snow Leopard. I'm on Xcode 3.1.4, but other members
of my team have upgraded to the latest and greatest, and the unit
tests run for them as well. I'm forever getting lost in the Xcode
info panels, and I cannot for the life of me find where the heck the
OCUnit or SenTesting kit framework is imported. I'm sorry I cannot be
of more help.
Regards,
Paul
On Nov 29, 2009, at 8:17 PM, Michael A. Crawford wrote:
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
_______________________________________________
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