2018-08-15 23:57:56 +08:00
|
|
|
description = 'Spring TestContext Framework'
|
2017-08-21 20:41:55 +08:00
|
|
|
|
2017-08-21 20:42:03 +08:00
|
|
|
dependencyManagement {
|
|
|
|
imports {
|
2018-08-15 23:43:23 +08:00
|
|
|
mavenBom "org.junit:junit-bom:${junit5Version}"
|
2017-08-21 20:42:03 +08:00
|
|
|
mavenBom "io.projectreactor:reactor-bom:${reactorVersion}"
|
|
|
|
mavenBom "io.netty:netty-bom:${nettyVersion}"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-08-21 20:41:55 +08:00
|
|
|
dependencies {
|
2018-08-15 23:57:56 +08:00
|
|
|
compile(project(':spring-core'))
|
|
|
|
optional(project(':spring-aop'))
|
|
|
|
optional(project(':spring-beans'))
|
|
|
|
optional(project(':spring-context'))
|
|
|
|
optional(project(':spring-jdbc'))
|
|
|
|
optional(project(':spring-orm'))
|
|
|
|
optional(project(':spring-tx'))
|
|
|
|
optional(project(':spring-web'))
|
|
|
|
optional(project(':spring-webflux'))
|
|
|
|
optional(project(':spring-webmvc'))
|
|
|
|
optional(project(':spring-websocket'))
|
|
|
|
optional('javax.activation:activation:1.1.1')
|
|
|
|
optional('javax.el:javax.el-api:3.0.1-b04')
|
|
|
|
optional('javax.inject:javax.inject:1')
|
|
|
|
optional('javax.servlet:javax.servlet-api:4.0.1')
|
|
|
|
optional('javax.servlet.jsp:javax.servlet.jsp-api:2.3.2-b02')
|
|
|
|
optional('javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api:1.2.1')
|
|
|
|
optional('javax.xml.bind:jaxb-api:2.3.0')
|
|
|
|
optional('javax.websocket:javax.websocket-api:1.1')
|
2018-08-15 23:43:23 +08:00
|
|
|
optional('junit:junit:4.12')
|
|
|
|
optional('org.junit.jupiter:junit-jupiter-api')
|
2018-08-15 23:57:56 +08:00
|
|
|
optional('org.testng:testng:6.14.3')
|
2017-08-21 20:41:55 +08:00
|
|
|
optional("org.aspectj:aspectjweaver:${aspectjVersion}")
|
|
|
|
optional("org.codehaus.groovy:groovy-all:${groovyVersion}")
|
2018-08-15 23:57:56 +08:00
|
|
|
optional('org.hamcrest:hamcrest-core:1.3')
|
|
|
|
optional('org.apache.taglibs:taglibs-standard-jstlel:1.2.5') {
|
|
|
|
exclude group: 'org.apache.taglibs', module: 'taglibs-standard-spec'
|
2017-09-24 23:18:21 +08:00
|
|
|
}
|
2018-08-15 23:57:56 +08:00
|
|
|
optional('net.sourceforge.htmlunit:htmlunit:2.32') {
|
|
|
|
exclude group: 'commons-logging', module: 'commons-logging'
|
2017-08-21 20:41:55 +08:00
|
|
|
}
|
2018-08-15 23:57:56 +08:00
|
|
|
optional('org.seleniumhq.selenium:htmlunit-driver:2.32.0') {
|
|
|
|
exclude group: 'commons-logging', module: 'commons-logging'
|
2017-09-07 18:16:53 +08:00
|
|
|
}
|
2018-08-15 23:57:56 +08:00
|
|
|
optional('org.seleniumhq.selenium:selenium-java:3.14.0') {
|
|
|
|
exclude group: 'commons-logging', module: 'commons-logging'
|
|
|
|
exclude group: 'io.netty', module: 'netty'
|
2017-08-21 20:41:55 +08:00
|
|
|
}
|
2018-08-15 23:57:56 +08:00
|
|
|
optional('org.xmlunit:xmlunit-matchers:2.6.0')
|
|
|
|
optional('org.skyscreamer:jsonassert:1.5.0')
|
|
|
|
optional('com.jayway.jsonpath:json-path:2.4.0')
|
2017-08-23 03:29:39 +08:00
|
|
|
optional("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}")
|
|
|
|
optional("org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion}")
|
2018-08-15 23:57:56 +08:00
|
|
|
optional('io.projectreactor:reactor-test')
|
|
|
|
testCompile(project(':spring-context-support'))
|
|
|
|
testCompile(project(':spring-oxm'))
|
|
|
|
testCompile('javax.annotation:javax.annotation-api:1.3.2')
|
|
|
|
testCompile('javax.cache:cache-api:1.1.0')
|
|
|
|
testCompile('javax.ejb:javax.ejb-api:3.2')
|
|
|
|
testCompile('javax.interceptor:javax.interceptor-api:1.2.2')
|
|
|
|
testCompile('javax.mail:javax.mail-api:1.6.1')
|
|
|
|
testCompile('org.hibernate:hibernate-core:5.2.17.Final')
|
|
|
|
testCompile('org.hibernate:hibernate-validator:6.0.12.Final')
|
2018-03-05 22:25:01 +08:00
|
|
|
// Enable use of the JUnit Platform Runner
|
2018-08-15 23:43:23 +08:00
|
|
|
testCompile('org.junit.platform:junit-platform-runner')
|
|
|
|
testCompile('org.junit.jupiter:junit-jupiter-params')
|
2017-08-21 20:41:55 +08:00
|
|
|
testCompile("com.fasterxml.jackson.core:jackson-databind:${jackson2Version}")
|
2018-08-15 23:57:56 +08:00
|
|
|
testCompile('com.thoughtworks.xstream:xstream:1.4.10')
|
|
|
|
testCompile('com.rometools:rome:1.11.0')
|
2017-08-21 20:41:55 +08:00
|
|
|
testCompile("org.apache.tiles:tiles-api:${tiles3Version}")
|
2018-06-11 21:33:05 +08:00
|
|
|
testCompile("org.apache.tiles:tiles-core:${tiles3Version}", withoutJclOverSlf4J)
|
|
|
|
testCompile("org.apache.tiles:tiles-servlet:${tiles3Version}", withoutJclOverSlf4J)
|
2017-08-21 20:41:55 +08:00
|
|
|
testCompile("org.hsqldb:hsqldb:${hsqldbVersion}")
|
2018-08-15 23:57:56 +08:00
|
|
|
testCompile('org.apache.httpcomponents:httpclient:4.5.6') {
|
|
|
|
exclude group: 'commons-logging', module: 'commons-logging'
|
2017-08-21 20:41:55 +08:00
|
|
|
}
|
2018-06-01 03:35:53 +08:00
|
|
|
testCompile('io.projectreactor.netty:reactor-netty')
|
2018-04-30 18:21:26 +08:00
|
|
|
testCompile('de.bechte.junit:junit-hierarchicalcontextrunner:4.12.1')
|
2017-08-21 20:41:55 +08:00
|
|
|
// Pull in the latest JUnit 5 Launcher API and the Vintage engine as well
|
|
|
|
// so that we can run JUnit 4 tests in IntelliJ IDEA.
|
2018-08-15 23:43:23 +08:00
|
|
|
testRuntime('org.junit.jupiter:junit-jupiter-engine')
|
|
|
|
testRuntime('org.junit.platform:junit-platform-launcher')
|
|
|
|
testRuntime('org.junit.vintage:junit-vintage-engine')
|
2018-08-15 23:57:56 +08:00
|
|
|
testRuntime('org.glassfish:javax.el:3.0.1-b08')
|
|
|
|
testRuntime('com.sun.xml.bind:jaxb-core:2.3.0.1')
|
|
|
|
testRuntime('com.sun.xml.bind:jaxb-impl:2.3.0.1')
|
2017-08-21 20:41:55 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
task testNG(type: Test) {
|
|
|
|
description = 'Runs TestNG tests.'
|
|
|
|
useTestNG()
|
|
|
|
scanForTestClasses = false
|
2018-08-15 23:57:56 +08:00
|
|
|
include(['**/testng/**/*Tests.class', '**/testng/**/*Test.class'])
|
2017-08-21 20:41:55 +08:00
|
|
|
// Show STD_OUT & STD_ERR of the test JVM(s) on the console:
|
|
|
|
// testLogging.showStandardStreams = true
|
|
|
|
// forkEvery 1
|
|
|
|
reports.junitXml.destination = file("$buildDir/test-results")
|
|
|
|
}
|
|
|
|
|
2018-04-04 21:43:44 +08:00
|
|
|
task testJUnitJupiter(type: Test) {
|
|
|
|
description = 'Runs JUnit Jupiter tests.'
|
|
|
|
useJUnitPlatform {
|
|
|
|
includeEngines 'junit-jupiter'
|
|
|
|
excludeTags 'failing-test-case'
|
|
|
|
}
|
|
|
|
filter {
|
2018-08-15 23:57:56 +08:00
|
|
|
includeTestsMatching 'org.springframework.test.context.junit.jupiter.*'
|
2018-04-04 21:43:44 +08:00
|
|
|
}
|
|
|
|
reports.junitXml.destination = file("$buildDir/test-results")
|
|
|
|
// Java Util Logging for the JUnit Platform.
|
|
|
|
// systemProperty('java.util.logging.manager', 'org.apache.logging.log4j.jul.LogManager')
|
|
|
|
}
|
|
|
|
|
2017-08-21 20:41:55 +08:00
|
|
|
test {
|
2018-04-30 18:21:26 +08:00
|
|
|
description = 'Runs JUnit 4 tests.'
|
2018-04-04 21:43:44 +08:00
|
|
|
dependsOn testJUnitJupiter, testNG
|
2017-08-21 20:41:55 +08:00
|
|
|
useJUnit()
|
|
|
|
scanForTestClasses = false
|
2018-04-04 21:43:44 +08:00
|
|
|
include(['**/*Tests.class', '**/*Test.class'])
|
|
|
|
exclude(['**/testng/**/*.*', '**/jupiter/**/*.*'])
|
2017-08-21 20:41:55 +08:00
|
|
|
reports.junitXml.destination = file("$buildDir/test-results")
|
|
|
|
}
|
|
|
|
|
|
|
|
task aggregateTestReports(type: TestReport) {
|
|
|
|
description = 'Aggregates JUnit and TestNG test reports.'
|
|
|
|
destinationDir = test.reports.html.destination
|
2018-04-04 21:43:44 +08:00
|
|
|
reportOn test, testJUnitJupiter, testNG
|
2017-08-21 20:41:55 +08:00
|
|
|
}
|
|
|
|
|
2017-09-23 17:28:19 +08:00
|
|
|
check.dependsOn aggregateTestReports
|