diff --git a/build.gradle b/build.gradle index 6a11155..d48a3bd 100644 --- a/build.gradle +++ b/build.gradle @@ -37,6 +37,11 @@ dependencies { check.dependsOn.clear() test { + useJUnitPlatform() + testLogging { events "passed", "skipped", "failed" } + testLogging.showStandardStreams = true; testLogging.showExceptions = true + maxParallelForks 1 + dependsOn cleanTest dependsOn ':runtime:component:mantle-usl:test' include '**/PopCommerceSuite.class' @@ -46,9 +51,6 @@ test { systemProperty 'moqui.init.static', 'true' maxHeapSize = "512M" - // show standard out and standard error of the test JVM(s) on the console - testLogging.showStandardStreams = true; testLogging.showExceptions = true; - classpath += files(sourceSets.main.output.classesDirs) // filter out classpath entries that don't exist (gradle adds a bunch of these), or ElasticSearch JarHell will blow up classpath = classpath.filter { it.exists() } diff --git a/src/test/groovy/PopCommerceSuite.groovy b/src/test/groovy/PopCommerceSuite.groovy index c233b35..b148113 100644 --- a/src/test/groovy/PopCommerceSuite.groovy +++ b/src/test/groovy/PopCommerceSuite.groovy @@ -13,16 +13,16 @@ */ -import org.junit.AfterClass -import org.junit.runner.RunWith -import org.junit.runners.Suite +import org.junit.jupiter.api.AfterAll +import org.junit.platform.suite.api.SelectClasses +import org.junit.platform.suite.api.Suite import org.moqui.Moqui -@RunWith(Suite.class) -@Suite.SuiteClasses([ PopcAdminScreenTests.class, PopCommerceScreenTests.class ]) +@Suite +@SelectClasses([ PopcAdminScreenTests.class, PopCommerceScreenTests.class ]) class PopCommerceSuite { - @AfterClass - public static void destroyMoqui() { + @AfterAll + static void destroyMoqui() { Moqui.destroyActiveExecutionContextFactory(); } }