Skip to content
This repository has been archived by the owner on Aug 19, 2020. It is now read-only.

Commit

Permalink
add example configuration for the JUnit5 test execution
Browse files Browse the repository at this point in the history
Signed-off-by: Alphonse Bendt <[email protected]>
  • Loading branch information
abendt committed Jan 23, 2019
1 parent afe080f commit 206b9d1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 4 additions & 2 deletions samples/buildSrc-test-junit5/buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ dependencies {
testRuntime("org.junit.jupiter:junit-jupiter-engine:5.3.2")
}

tasks.test {
useJUnitPlatform()
tasks.withType<Test>().configureEach {
useJUnitPlatform {
includeTags("fooTag")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ package greeting

import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Assertions.assertEquals
import org.junit.jupiter.api.Tag

class GreeterTest {
@Test
@Tag("fooTag")
fun canSayHelloTo() {
assertEquals("Hello Gradle", sayHelloTo("Gradle"))
}
Expand Down

0 comments on commit 206b9d1

Please sign in to comment.