|
|
|
@ -73,43 +73,24 @@ dependencies {
@@ -73,43 +73,24 @@ dependencies {
|
|
|
|
|
testRuntimeOnly("org.junit.vintage:junit-vintage-engine") { |
|
|
|
|
exclude group: "junit", module: "junit" |
|
|
|
|
} |
|
|
|
|
testRuntimeOnly("org.junit.support:testng-engine") |
|
|
|
|
testRuntimeOnly("org.glassfish:jakarta.el") |
|
|
|
|
testRuntimeOnly("com.sun.xml.bind:jaxb-core") |
|
|
|
|
testRuntimeOnly("com.sun.xml.bind:jaxb-impl") |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
task junit(type: Test) { |
|
|
|
|
description = "Runs JUnit 4 and JUnit Jupiter tests." |
|
|
|
|
test { |
|
|
|
|
description = "Runs JUnit 4, JUnit Jupiter, and TestNG tests." |
|
|
|
|
useJUnitPlatform { |
|
|
|
|
includeEngines "junit-vintage", "junit-jupiter", "testng" |
|
|
|
|
excludeTags "failing-test-case" |
|
|
|
|
} |
|
|
|
|
// We use `include` instead of `filter.includeTestsMatching`, since |
|
|
|
|
// the latter results in some tests being executed/reported |
|
|
|
|
// multiple times. |
|
|
|
|
include(["**/*Tests.class", "**/*Test.class"]) |
|
|
|
|
exclude(["**/testng/**/*.*"]) |
|
|
|
|
filter.excludeTestsMatching("*TestCase") |
|
|
|
|
systemProperty("testGroups", project.properties.get("testGroups")) |
|
|
|
|
// Java Util Logging for the JUnit Platform. |
|
|
|
|
// systemProperty("java.util.logging.manager", "org.apache.logging.log4j.jul.LogManager") |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
task testNG(type: Test) { |
|
|
|
|
description = "Runs TestNG tests." |
|
|
|
|
useTestNG() |
|
|
|
|
include(["**/testng/**/*Tests.class", "**/testng/**/*Test.class"]) |
|
|
|
|
systemProperty("testGroups", project.properties.get("testGroups")) |
|
|
|
|
// Show STD_OUT & STD_ERR of the test JVM(s) on the console: |
|
|
|
|
// testLogging.showStandardStreams = true |
|
|
|
|
// forkEvery 1 |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
test { |
|
|
|
|
description = "Runs all tests." |
|
|
|
|
dependsOn junit, testNG |
|
|
|
|
exclude(["**/*.*"]) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
task aggregateTestReports(type: TestReport) { |
|
|
|
|
description = "Aggregates JUnit and TestNG test reports." |
|
|
|
|
destinationDir = test.reports.html.outputLocation.get().getAsFile() |
|
|
|
|
reportOn junit, testNG |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
check.dependsOn aggregateTestReports |
|
|
|
|