apply plugin: 'jacoco' dependencies { testCompile "org.junit.jupiter:junit-jupiter-api:${junitVersion}" testRuntime "org.junit.jupiter:junit-jupiter-engine:${junitVersion}" testCompile "org.junit.jupiter:junit-jupiter-params:${junitVersion}" testCompile "org.hamcrest:hamcrest:${hamcrestVersion}" } test { useJUnitPlatform { excludeTags 'slow' } } task slowTest(type: Test) { useJUnitPlatform() } jacocoTestReport { dependsOn test reports { xml.enabled true } } test.finalizedBy(jacocoTestReport)