maiflai / gradle-scalatest

A plugin to enable the use of scalatest in a gradle Scala project.
The Unlicense
73 stars 35 forks source link

Equivalent of `-u build/test-reports` ? #90

Closed gabrieljones closed 3 years ago

gabrieljones commented 3 years ago

What is the equivalent of -u build/test-reports ? https://www.scalatest.org/user_guide/using_the_runner

And how do I specify it in build.gradle.kts?

maiflai commented 3 years ago

I think that the Gradle convention is to put the XML reports into a subdirectory named for the Task itself? This is helpful when you have multiple test tasks.

You control this using the standard Test DSL. I'm not sure of the Kotlin syntax but I expect it to be very similar.

test.reports.junitXml.destination(file('build/test-results'))
gabrieljones commented 3 years ago

How do I tell scalatest to spit out junit xml per the -u option?

maiflai commented 3 years ago

I think that's exactly what the above does?

gabrieljones commented 3 years ago

Ah my bad, I was confusing build/reports with build/test-results This page is what led me astray https://www.jenkins.io/doc/pipeline/tour/tests-and-artifacts/