title: Googletest: How to run tests asynchronously?
body: <p>Given a large project with thousands of tests, some of which take multiple minutes to complete. When executed sequentially, the whole set of test takes more than an hour to finish. The testing time could be reduced by executing tests in parallel. </p>
  
  <p>As far as I know there are no means to do that directly from googletest/mock, like a <code>--async</code> option. Or am I wrong?</p>
  
  <p>One solution is to determine the tests which can run in parallel and write a script that starts each in a separate job, i.e.</p>
  
  <pre><code>./test --gtest_filter=TestSet.test1 &amp;
  ./test --gtest_filter=TestSet.test2 &amp;
  ...
  </code></pre>
  
  <p>But this would require additional maintenance effort and introduce another "layer" between the test code and its execution. I'd like a more convenient solution. For example, one could suffix the TEST and TEST_F macros and introduce TEST_ASYNC, TEST_F_ASYNC. Tests defined with TEST_ASYNC would then be executed by independent threads, starting at the same time. </p>
  
  <p>How can this be achieved? Or is there another solution?</p>