Shilpa Kk
Shilpa Kk

Reputation: 15

Junit 5 test cases are not executing in gradle 4.4

My junit 5 test cases are not executing. Can anyone suggest some solution? Gradle version is 4.4

Upvotes: 0

Views: 136

Answers (1)

Bjørn Vester
Bjørn Vester

Reputation: 7598

You will need Gradle 4.6 or later to get support for JUnit 5.

Once you upgrade Gradle, be sure to configure it for JUnit 5. See the user guide for details. For example:

// build.gradle (Groovy DSL)
test {
    useJUnitPlatform()
}
dependencies {
    testImplementation 'org.junit.jupiter:junit-jupiter-api:5.6.0'
    testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'
}

Upvotes: 1

Related Questions