title: How do you run tests from the command line?
body: <p>To do this in-editor you open the automation tab, connect to the session and choose which tests to run.</p>
  
  <p>How do you do it from the command line?</p>
  
  <p>(NB. not compiling UnrealEngine/Engine/Build/BatchFiles/* comprehensively covers both building the application and compiling it. Specifically, given that you have code that is 100% happy to compile, how do you kick the test suite off)</p>
  
  <p>-- </p>
  
  <p>Here's some more info, from recent testing on 4.10:</p>
  
  <h3>Running tests from the editor:</h3>
  
  <pre><code>UE4Editor Project.uproject -ExecCmds="Automation RunTests MyTest"
  </code></pre>
  
  <p>Notice the absence of the <code>-Game</code> flag; this launches the Editor and runs the tests successfully in the editor console.</p>
  
  <h3>Running the game engine and using the 'popup log window':</h3>
  
  <pre><code>UE4Editor Project.uproject -Game -ExecCmds="Automation RunTests MyTest" -log
  </code></pre>
  
  <p>This runs the game in 'play' mode, pops up an editor window; however, the logs stop at:</p>
  
  <pre><code>LogAssetRegistry: FAssetRegistry took 0.0004 seconds to start up
  </code></pre>
  
  <p>...and the game never closes or executes the tests.</p>
  
  <h3>Running the game engine and logging to a file:</h3>
  
  <pre><code>UE4Editor Project.uproject -Game -ExecCmds="Automation RunTests MyTest" -log=Log.txt
  </code></pre>
  
  <p>This runs the game in 'play' mode, and then stops and never exists.</p>
  
  <p>It does not appear to run any tests or log to any files.</p>
  
  <p>The folder <code>Saved/Logs</code> does not exist after quitting the running game.</p>
  
  <h3>Running in the editor, test types, etc...</h3>
  
  <p>see: <a href="https://answers.unrealengine.com/questions/358821/hot-reload-does-not-re-compile-automation-tests.html" rel="noreferrer">https://answers.unrealengine.com/questions/358821/hot-reload-does-not-re-compile-automation-tests.html</a>,</p>
  
  <p>Hot reload is not supported for tests; so this isn't an option.</p>
  
  <p>There's also been some suggestion in various places that the test type (eg. <code>ATF_Game</code>, <code>ATF_Editor</code>) has some affect on if runs are or can be run; perhaps this is an issue to, but I've tried all kind of combinations with no success.</p>
  
  <p>-- </p>
  
  <p>I've tried all kinds of combinations of things trying to get this working, with no success so it's time for a bounty.</p>
  
  <p>I'll accept an answer which reliably:</p>
  
  <ul>
  <li>Executes a specific test from the command line</li>
  <li>Logs the output from that test to a file</li>
  </ul>