私は 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
では、実行中のアプリでテストを実行する方法はありますか?