2

Recently migrated from JUnit4 to JUnit5. As per the current gradle settings I no longer see HTML reports getting generated. Have googled but could find a way to generate these reports. Has anyone tried to generate HTML reports of test under JUnit5?

When I run the test under JUnit5, I see a binary folder with files

output.bin
output.bin.idx
results.bin

And hence resultant html report is not generated.

gradle.build code that helps club results from the test task in all subprojects

task testReport(type: TestReport) {
  destinationDir = file("$buildDir/reports/allTests")
  reportOn subprojects*.test

  doLast {
      println "Test reports for all test complete $env"
  }
}

If there is need for more code to share, please let me know.

java_dude
  • 4,038
  • 9
  • 36
  • 61
  • please share more details: post-build step you're using (html publisher / junit / xunit). pipeline? regular build? & etc... – Vano May 01 '17 at 13:09
  • Possible duplicate of [How to create an HTML report for JUnit 5 tests?](http://stackoverflow.com/questions/39444908/how-to-create-an-html-report-for-junit-5-tests) – Sam Brannen May 01 '17 at 16:19
  • @sam-brannen Nope. Thats completely different. It uses Ant. – java_dude May 01 '17 at 17:14
  • @Vano Added code to show how HTML report is getting generated. – java_dude May 01 '17 at 17:34
  • @java_dude I actually was not asking a question. The "?" was added automatically by Stack Overflow when I attempted to close this issue as a _duplicate_. So I apologize if you were confused by the "?". – Sam Brannen May 04 '17 at 15:26
  • In my attempt to close the issue, I was actually emphatically stating that it is a duplicate. My answer on the linked issue explains everything. So I suggest that you go back and read my response in detail. – Sam Brannen May 04 '17 at 15:27
  • 1
    The linked issue is not about Ant. The only thing about Ant is the fact that you can use Ant as an interim solution for generating HTML reports until the Gradle team officially takes over development of the JUnit Platform Gradle plugin. – Sam Brannen May 04 '17 at 15:29
  • Working on resolving this. – java_dude May 05 '17 at 13:45
  • I aren't have much experience in gradle, Hope this related answer helps your question. Please refer to https://stackoverflow.com/a/39455463/3044557 – Isuru Dewasurendra Jan 15 '20 at 10:54

0 Answers0