【发布时间】:2012-10-25 10:43:11
【问题描述】:
我正在编写 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
那么,有没有办法在正在运行的应用程序上执行测试?
【问题讨论】:
标签: testing cocos2d-iphone functional-testing ocunit