spring-test.gradle 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. description = "Spring TestContext Framework"
  2. apply plugin: "kotlin"
  3. dependencies {
  4. compile(project(":spring-core"))
  5. optional(project(":spring-aop"))
  6. optional(project(":spring-beans"))
  7. optional(project(":spring-context"))
  8. optional(project(":spring-jdbc"))
  9. optional(project(":spring-orm"))
  10. optional(project(":spring-tx"))
  11. optional(project(":spring-web"))
  12. optional(project(":spring-webflux"))
  13. optional(project(":spring-webmvc"))
  14. optional(project(":spring-websocket"))
  15. optional("javax.activation:javax.activation-api")
  16. optional("javax.el:javax.el-api")
  17. optional("javax.inject:javax.inject")
  18. optional("javax.servlet:javax.servlet-api")
  19. optional("javax.servlet.jsp:javax.servlet.jsp-api")
  20. optional("javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api")
  21. optional("javax.xml.bind:jaxb-api")
  22. optional("javax.websocket:javax.websocket-api")
  23. optional("junit:junit")
  24. optional("org.junit.jupiter:junit-jupiter-api")
  25. optional("org.testng:testng")
  26. optional("org.aspectj:aspectjweaver")
  27. optional("org.codehaus.groovy:groovy")
  28. optional("org.hamcrest:hamcrest")
  29. optional("org.apache.taglibs:taglibs-standard-jstlel")
  30. optional("net.sourceforge.htmlunit:htmlunit")
  31. optional("org.seleniumhq.selenium:htmlunit-driver")
  32. optional("org.seleniumhq.selenium:selenium-java")
  33. optional("org.xmlunit:xmlunit-matchers")
  34. optional("org.skyscreamer:jsonassert")
  35. optional("com.jayway.jsonpath:json-path")
  36. optional("org.jetbrains.kotlin:kotlin-reflect")
  37. optional("org.jetbrains.kotlin:kotlin-stdlib")
  38. optional("io.projectreactor:reactor-test")
  39. optional("org.jetbrains.kotlinx:kotlinx-coroutines-core")
  40. optional("org.jetbrains.kotlinx:kotlinx-coroutines-reactor")
  41. testCompile(project(":spring-context-support"))
  42. testCompile(project(":spring-oxm"))
  43. testCompile(testFixtures(project(":spring-beans")))
  44. testCompile(testFixtures(project(":spring-context")))
  45. testCompile(testFixtures(project(":spring-core")))
  46. testCompile(testFixtures(project(":spring-tx")))
  47. testCompile(testFixtures(project(":spring-web")))
  48. testCompile("javax.annotation:javax.annotation-api")
  49. testCompile("javax.cache:cache-api")
  50. testCompile("javax.ejb:javax.ejb-api")
  51. testCompile("javax.interceptor:javax.interceptor-api")
  52. testCompile("javax.mail:javax.mail-api")
  53. testCompile("org.hibernate:hibernate-core")
  54. testCompile("org.hibernate:hibernate-validator")
  55. testCompile("javax.validation:validation-api")
  56. testCompile("org.junit.platform:junit-platform-runner") {
  57. exclude group: "junit", module: "junit"
  58. }
  59. testCompile("org.junit.platform:junit-platform-testkit")
  60. testCompile("com.fasterxml.jackson.core:jackson-databind")
  61. testCompile("com.thoughtworks.xstream:xstream")
  62. testCompile("com.rometools:rome")
  63. testCompile("org.apache.tiles:tiles-api")
  64. testCompile("org.apache.tiles:tiles-core")
  65. testCompile("org.apache.tiles:tiles-servlet")
  66. testCompile("org.hsqldb:hsqldb")
  67. testCompile("org.apache.httpcomponents:httpclient")
  68. testCompile("io.projectreactor.netty:reactor-netty")
  69. testCompile("de.bechte.junit:junit-hierarchicalcontextrunner")
  70. testRuntime("org.junit.vintage:junit-vintage-engine") {
  71. exclude group: "junit", module: "junit"
  72. }
  73. testRuntime("org.glassfish:javax.el")
  74. testRuntime("com.sun.xml.bind:jaxb-core")
  75. testRuntime("com.sun.xml.bind:jaxb-impl")
  76. }
  77. task junit(type: Test) {
  78. description = "Runs JUnit 4 and JUnit Jupiter tests."
  79. useJUnitPlatform {
  80. excludeTags "failing-test-case"
  81. }
  82. include(["**/*Tests.class", "**/*Test.class"])
  83. exclude(["**/testng/**/*.*"])
  84. systemProperty("testGroups", project.properties.get("testGroups"))
  85. // Java Util Logging for the JUnit Platform.
  86. // systemProperty("java.util.logging.manager", "org.apache.logging.log4j.jul.LogManager")
  87. }
  88. task testNG(type: Test) {
  89. description = "Runs TestNG tests."
  90. useTestNG()
  91. include(["**/testng/**/*Tests.class", "**/testng/**/*Test.class"])
  92. systemProperty("testGroups", project.properties.get("testGroups"))
  93. // Show STD_OUT & STD_ERR of the test JVM(s) on the console:
  94. // testLogging.showStandardStreams = true
  95. // forkEvery 1
  96. }
  97. test {
  98. description = "Runs all tests."
  99. dependsOn junit, testNG
  100. exclude(["**/*.*"])
  101. }
  102. task aggregateTestReports(type: TestReport) {
  103. description = "Aggregates JUnit and TestNG test reports."
  104. destinationDir = test.reports.html.destination
  105. reportOn junit, testNG
  106. }
  107. check.dependsOn aggregateTestReports