title: Getting XML / HTML test results for android gradle junit test run
body: <p>I'm having a hard time finding xml / html test results after running my tests through gradle either with <code>./gradlew test</code> or <code>./gradlew testDebug</code>. When I run either of those I wind up with an html file that shows 0 tests and no xml file at all.</p>
  
  <p>According to the <a href="https://developer.android.com/studio/test/command-line" rel="nofollow noreferrer">android docs</a> XML test results should be in <code>path_to_your_project/module_name/build/test-results/</code> but the test-results folder only has <code>.bin</code> files in it (<code>results.bin</code>, etc). I also tried searching with <code>find app/build -type f -name "*.xml"</code> but only found Android related XML files (manifest, merge files, etc).</p>
  
  <p>Output from <code>./gradlew --version</code></p>
  
  <pre><code>------------------------------------------------------------
  Gradle 5.1.1
  ------------------------------------------------------------
  
  Build time:   2019-01-10 23:05:02 UTC
  Revision:     3c9abb645fb83932c44e8610642393ad62116807
  
  Kotlin DSL:   1.1.1
  Kotlin:       1.3.11
  Groovy:       2.5.4
  Ant:          Apache Ant(TM) version 1.9.13 compiled on July 10 2018
  JVM:          1.8.0_212 (Oracle Corporation 25.212-b03)
  OS:           Linux 4.15.0-50-generic amd64
  </code></pre>
  
  <p>I want to get test results to publish to jenkins. I have the same issue if I run on my local MBP as well. I have not modified any of the gradle test configurations but the link above seems to suggest I shouldn't need to.</p>
  
  <p>I also tried specifying my test directory with</p>
  
  <pre><code>android {
      ...
      sourceSets {
          androidTest {
              java.srcDirs = ['src/test/java']
          }
      }
  }
  </code></pre>