?????????????????????胁????????IOS?渭?????????????????????械??????xcode?????OCUnit??GHUnit???????????GHUnit????????OCUnit??GHUnit?????????????
????1????????
????2?????????????????????????????
????3???????????
????4????????????
????5???????????????UI??Command Line??
?????????????锟�?http://gabriel.github.io/gh-unit/
????GitHub????????https://github.com/gabriel/gh-unit
???????????????????????????
??????????????
????1??xcode??????Command Line???????simulator
????2?????????????????http://www.apkbus.com/android-465-1.html?蟹???????
????3??????GHUnit????????Example/MyTestable-iOS?????GHUnitiOS.framework
??????????????
????1.??????????????? GHUnitTest ??Empty Application??????????? Include Unit Tests?? Use Core Data
????2.????渭? test target????????? Add Target????????????Test ?? Empty Application?????楹�????GHUnitTest??????????? Include Unit Tests ?? Use Core Data
????3.?? Test??? GHUnitIOS Framework??????????械? Frameworks????? Add Files to...??????? GHUnitIOS.framework??targets ????Test
????4.???? Test?? Build Settings???? Other Linker Flags ?????????? flag?? -ObjC ?? -all_load
????5.??? Test?渭? AppDelegate.h ?? AppDelegate.m ??????????????GHUnitTest??
????6.????????? Test>iPhone 6.1Simulator?????????校????????????效?????????????斜?写?魏?????????????斜?????
??????????写???????
????1.?? Test ?????????? Objective C class???????????GHTestCase??????写??????????????????????AccessTest.m???????????

 

#import "Test-Prefix.pch"
@interface AccessTest : GHTestCase
@end
@implementation AccessTest
- (void)setUpClass{
GHTestLog(@"Test Starts");
}
- (void)tearDownClass{
GHTestLog(@"Test ends");
}
-(void)tearDown{
[NSThread sleepForTimeInterval:1];
}
- (void)testOne{
GHTestLog(@"app starts first");
}
-(void)testTwo{    [
GHTestLog(@"app starts sencond");
}
@end