Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Run plain integration/unit test projects too

  • Loading branch information...
commit ffe4f0e9656f83e279461ca937b9c845ab9e3874 1 parent 1d030a2
Lari Hotari lhotari authored

Showing 1 changed file with 16 additions and 1 deletion. Show diff stats Hide diff stats

  1. +16 1 build.xml
17 build.xml
@@ -183,7 +183,7 @@
183 183 fileset(dir:"${properties.checkoutDir}/${properties.projectName}/target/test-reports")
184 184 }
185 185 }
186   - else {
  186 + else if (new File(appDir, "webtest").exists()) {
187 187 // Install the WebTest plugin.
188 188 ant.grails(command:"install-plugin", args: "webtest", projectName:properties.projectName, resultID:grailsInvocationCounter++)
189 189 if (properties["testResult_${grailsInvocationCounter-1}"].toInteger() != 0) {
@@ -205,6 +205,21 @@
205 205 ant.copy(todir:"reports/${properties.projectName}") {
206 206 fileset(dir:"${properties.checkoutDir}/${properties.projectName}/target/test-reports")
207 207 }
  208 + } else {
  209 + // Run unit & integration tests.
  210 + ant.grails(command:"test-app", args: "", environment:"test", projectName:properties.projectName, resultID:grailsInvocationCounter++)
  211 + outcomes << "Integration/unit tests in application ${properties.projectName}: " +
  212 + ((properties["testResult_${grailsInvocationCounter-1}"].toInteger() != 0) ? "Failed" : "OK")
  213 +
  214 + if (properties["testResult_${grailsInvocationCounter-1}"].toInteger() != 0) {
  215 + failure = true
  216 + }
  217 +
  218 + // Copy reports
  219 + ant.mkdir(dir:"reports/${properties.projectName}")
  220 + ant.copy(todir:"reports/${properties.projectName}") {
  221 + fileset(dir:"${properties.checkoutDir}/${properties.projectName}/target/test-reports")
  222 + }
208 223 }
209 224 }
210 225

0 comments on commit ffe4f0e

Please sign in to comment.
Something went wrong with that request. Please try again.