【发布时间】:2015-01-02 07:59:28
【问题描述】:
我正在使用 Xcode 6 开发 iOS 应用程序,并尝试在 Xcode 中运行测试套件。我可以运行测试,但看不到 NSLog 语句的输出位置。它们不在输出面板中。
如何找到输出?
@interface ISTest : XCTestCase
@end
@implement ISTest
- (void) setUp {
[super setUp];
}
- (void) tearDown {
[super tearDown];
}
- (void) testExample {
NSLog(@"Where does this go???");
}
- (void) testPerformanceExample {
[self measureBlock^{
}];
}
@end
【问题讨论】:
-
所有日志语句都应该出现在调试区域。你能发布一个示例测试用例吗?
-
@JAL 调试区在哪里?
-
调试区域是 Xcode 中的下部视图,当您遇到断点时,它会显示控制台和范围内的变量。通过单击 Xcode 右上角底部带有蓝色矩形的方形按钮,确保此视图已打开。
-
不知怎的,我现在可以在 All Output 中看到输出了……不知道之前发生了什么……谢谢。
-
我在下面添加了我的答案。如果对您有帮助,请随时将其标记为已接受。
标签: ios xcode unit-testing output