title: How do I get detailed logging when I run a single test in Gradle?
body: <p>I'm trying to find out why a single test is failing in my build, so I know I need to run gradle with the tests flag like so:</p>
  
  <pre><code>./gradlew test --tests com.myname.myproject.mypackage.MyTestClass.myTestMethod
  </code></pre>
  
  <p>However I wanted to see some trace logs so I had more detailed information on what my test was doing. I know that the options for seeing more detailed logs are --stacktrace, --info, and --debug. So normally, to see more detailed logging on all tests, I'd use the following:</p>
  
  <pre><code>`./gradlew test --debug` or `./gradlew test -d`
  </code></pre>
  
  <p>In this case, <strong><em>I'd like to only see debug logs for myTestMethod</em></strong>, but none of my attempts are working. I always get debug logs for ALL of the tests; it's running ALL of the tests instead of the single one I specify. I've tried the following combinations, all to no avail:</p>
  
  <p><strong>With --debug</strong></p>
  
  <p>Appended at the end:
  <code>./gradlew test --tests com.myname.myproject.mypackage.MyTestClass.myTestMethod --debug</code></p>
  
  <p>Appended at the end with quotes around the tests param: <code>./gradlew test --tests "com.myname.myproject.mypackage.MyTestClass.myTestMethod" --debug</code></p>
  
  <p>Appended before tests flag: <code>./gradlew test --debug --tests com.myname.myproject.mypackage.MyTestClass.myTestMethod</code></p>
  
  <p>Appended before tests flag with tests param in quotes: <code>./gradlew test --debug --tests "com.myname.myproject.mypackage.MyTestClass.myTestMethod"</code></p>
  
  <p><strong>With -d</strong></p>
  
  <p>Appended at the end:
  <code>./gradlew test --tests com.myname.myproject.mypackage.MyTestClass.myTestMethod -d</code></p>
  
  <p>Appended at the end with quotes around the tests param: <code>./gradlew test --tests "com.myname.myproject.mypackage.MyTestClass.myTestMethod" -d</code></p>
  
  <p>Appended before tests flag: <code>./gradlew test -d --tests com.myname.myproject.mypackage.MyTestClass.myTestMethod</code></p>
  
  <p>Appended before tests flag with tests param in quotes: <code>./gradlew test -d --tests "com.myname.myproject.mypackage.MyTestClass.myTestMethod"</code></p>
  
  <p><strong><em>Is there something I'm doing wrong?</em></strong> </p>
  
  <p><em>Gradle version used in wrapper:</em> 2.14.1</p>
  
  <p><em>Note:</em> I'm also setting up some environment variables before the command, specifically, spring boot profiles. I'm thinking that shouldn't affect anything as it's not part of the gradle command, but I figured I'd state so just in case. So in reality, all of the commands I'm running look more like this: <code>SPRING_PROFILES_ACTIVE=profile1,profile2 ./gradlew test ...</code></p>