在Xcode 5中使用XCTest运行测试时,有没有办法禁用一些额外的控制台消息?每次运行测试时,Xcode都会打印出一些关于我没有运行的测试的无用行:
Test Suite 'xxxxViewTests' started at 2014-01-13 17:10:48 +0000
Test Suite 'xxxxViewTests' finished at 2014-01-13 17:10:48 +0000.
Executed 0 tests, with 0 failures (0 unexpected) in 0.000 (0.000) seconds
Test Suite 'yyyyyyViewTests' started at 2014-01-13 17:10:48 +0000
Test Suite 'yyyyyyViewTests' finished at 2014-01-13 17:10:48 +0000.
Executed 0 tests, with 0 failures (0 unexpected) in 0.000 (0.000) seconds
Test Suite 'zzzzzzzViewTests' started at 2014-01-13 17:10:48 +0000
Test Suite 'zzzzzzzViewTests' finished at 2014-01-13 17:10:48 +0000.
Executed 0 tests, with 0 failures (0 unexpected) in 0.000 (0.000) seconds
Test Suite 'xyxyViewTests' started at 2014-01-13 17:10:48 +0000
Test Suite 'xyxyViewTests' finished at 2014-01-13 17:10:48 +0000.
Executed 0 tests, with 0 failures (0 unexpected) in 0.000 (0.000) seconds
Test Suite 'xzxzxzScreenTests' started at 2014-01-13 17:10:48 +0000
Test Suite 'xzxzxzScreenTests' finished at 2014-01-13 17:10:48 +0000.
Executed 0 tests, with 0 failures (0 unexpected) in 0.000 (0.000) seconds
Test Suite 'yzyzyzyzyzTests' started at 2014-01-13 17:10:48 +0000
Test Suite 'yzyzyzyzyzTests' finished at 2014-01-13 17:10:48 +0000.
Executed 0 tests, with 0 failures (0 unexpected) in 0.000 (0.000) seconds
....
Run Code Online (Sandbox Code Playgroud)
编辑您的项目方案并取消选中您不想运行的测试类。选择Product>Scheme...>EditScheme...菜单项,在左栏中选择Test ,取消选中不相关的测试类:

确保稍后需要时再次启用它们。如果取消选中所有测试类,则将禁用“产品”>“测试”菜单项(及其 Cmd-U 快捷方式)。
| 归档时间: |
|
| 查看次数: |
1118 次 |
| 最近记录: |