나는 Cocos2d 응용 프로그램을 작성하고 기능 테스트를 작성하는 방법을 찾고 있습니다.기능 테스트 cocos2d 응용 프로그램
정말 필요한 것은 시뮬레이터에서 응용 프로그램을 실행하고 내 장면에 특정 노드가 있는지 확인하는 것입니다. 이 같은 것
@implementation MenuTest
- (void) setUp
{
// Launch app on the simulator
}
- (void) tearDown
{
// Shut simulator down
}
- (void) testMenuContainsExitItem
{
CCScene *scene = [[CCDirector sharedDirector] runningScene];
CCNode *exit = [scene getChildByTag:EXIT_ITEM];
STAssertNotNil(exit, @"No exit item found");
}
@end
실행중인 앱에서 테스트를 실행할 수있는 방법이 있습니까?
노드에 태그를 설정할 수 있다는 것을 알고 있습니다. 그렇다면'onEnter' 메소드 내에서 OCUnit 테스트를 어떻게 실행합니까? – lambdas