title: How can intelliJ run gradle task as test
body: <p>I have a gradle project with "unit test" and "integration tests" tasks defined as follows:</p>
  
  <pre><code>test {
    include '**/*Test.class'
  }
  
  task integrationTest(type: Test) {
    include '**/*IT.class'
  }
  </code></pre>
  
  <p>I created a run configuration in IntelliJ to run all unit tests like image shows:</p>
  
  <p><a href="https://i.stack.imgur.com/wtIne.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wtIne.png" alt="Run configuration of gradle &#39;test&#39; task in intelliJ"></a></p>
  
  <p>And did the same with the task 'integrationTest':</p>
  
  <p><a href="https://i.stack.imgur.com/sdk0J.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sdk0J.png" alt="Run configuration of gradle &#39;test&#39; task in intelliJ"></a></p>
  
  <p>IntelliJ 'understands' the test task and run it showing graphical results, like in this image:</p>
  
  <p><a href="https://i.stack.imgur.com/rreBV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rreBV.png" alt="IntelliJ showing the results of gradle test task"></a></p>
  
  <p>The same doesn't happen when it runs the 'integrationTest' task. The results are shown in text, like when I run the task by command line.</p>