IOS6.1单元测试持续集成实践
|
#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
|
|
int main(int argc, char *argv[])
{
int retval;
@autoreleasepool {
if(getenv("GHUNIT_CLT")){
retval = [GHTestRunner run];
}else{
retval = UIApplicationMain(argc, argv, nil, @"GHUnitIOSAppDelegate");
}
}
return retval;
}
|
| instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate appName -e UIASCRIPT absolute_path_to_the_test_file |


