Create new command line project
Add new test target by clicking ‘+’ sign in the white area under Targets (Foo)
And then selecting ‘Cocoa Testing Bundle’
Edit your project scheme
Select the ‘Test’ scheme
Hit the ‘+’ sign again, and select your test bundle.
Open logging window (Shift + Command + Y)
Command + U show now run all the tests.
Note: Whenever you add any new project files, you will need to include them in the test target (command line tool apps only).