Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hide XCTest Console Messages

Tags:

xcode5

xctest

Is there any way to disable some of the extra console messages when running tests using XCTest in Xcode 5? Every time I run tests Xcode will print out a number of useless lines about tests I'm not running:

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
....
like image 361
psobko Avatar asked Jan 13 '14 17:01

psobko


1 Answers

Edit your project scheme and uncheck the test classes you don't want to run. Choose the Product > Scheme... > Edit Scheme... menu item, select Test in the left column, and uncheck the irrelevant test classes:

enter image description here

Make sure you enable them again when you need them later. If you uncheck all of your test classes, the Product > Test menu item (and its Cmd-U shortcut) will be disabled.

like image 164
bneely Avatar answered Oct 13 '22 10:10

bneely