title: How do I run xctest from the command-line with Xcode 5?
body: <p>I found a command-line tool called "xctest" that apparently can run the unit tests in your project. This executable lives here: </p>
  
  <pre><code>/Applications/Xcode.app/Contents/Developer/usr/bin/xctest
  </code></pre>
  
  <p>When I try to run this executable on my xctest bundle, I'm using: </p>
  
  <pre><code>$ ./xctest /Users/myusername/Library/Developer/Xcode/DerivedData/MyApp-abcdefghijklmnop/Build/Products/Debug/MyAppTests.xctest
  </code></pre>
  
  <p>However, I get the following output: </p>
  
  <pre><code>Test Suite '(null)' started at 2013-11-14 21:16:45 +0000
  Test Suite '(null)' finished at 2013-11-14 21:16:45 +0000.
  Executed 0 tests, with 0 failures (0 unexpected) in 0.000 (0.001) seconds
  </code></pre>
  
  <p>There's no man page for xctest, as far as I can tell, but entering just ./xctest at the command-line yields: </p>
  
  <pre><code>Usage: xctest [--test Self | All | None | &lt;TestCaseClassName/testMethodName&gt;] &lt;path of unit to be tested&gt;
  </code></pre>
  
  <p>In particular, I'd like to be able to test just a particular method in a test class, which is why I'd like to use this xctest command. </p>
  
  <p>I do see that there is a way to run all the tests from the command line like: </p>
  
  <pre><code>$ xcodebuild test -scheme MyApp
  </code></pre>
  
  <p>This runs all the unit tests and works properly (I see my unit test results, unlike when using xctest). But I'm interested in being able to run a single test method from the command-line, such as: </p>
  
  <pre><code>$ ./xctest --test MyAppTests/testExample  /Users/myusername/Library/Developer/Xcode/DerivedData/MyApp-abcdefghijklmnop/Build/Products/Debug/MyAppTests.xctest
  </code></pre>