Skip to content

Commit

Permalink
#6 - Test name printing on console running gradle is cryptic
Browse files Browse the repository at this point in the history
Finally a workaround!
  • Loading branch information
Duncan McGregor committed Nov 11, 2019
1 parent fbb1d0e commit e70983f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions core/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@

import com.jfrog.bintray.gradle.BintrayExtension
import org.gradle.api.internal.tasks.testing.TestDescriptorInternal
import org.jetbrains.kotlin.gradle.dsl.KotlinJvmCompile


Expand Down Expand Up @@ -45,6 +46,11 @@ tasks {
withType<Test> {
useJUnitPlatform {
includeEngines("junit-jupiter", "junit-vintage")
afterTest(KotlinClosure2<TestDescriptor, TestResult, Any>({ descriptor, result ->
// work around a bug in Gradle versions before 6.1, see https://github.com/junit-team/junit5/issues/2041
val test = descriptor as TestDescriptorInternal
println("${test.className} [${test.classDisplayName}] > ${test.name} [${test.displayName}]: ${result.resultType}")
}))
}
}

Expand Down

0 comments on commit e70983f

Please sign in to comment.