Index: /home/eu/Projects/workspace/grails/scripts/TestApp.groovy =================================================================== --- /home/eu/Projects/workspace/grails/scripts/TestApp.groovy (revision 6739) +++ /home/eu/Projects/workspace/grails/scripts/TestApp.groovy (working copy) @@ -111,10 +111,14 @@ packageTests() try { - if(!integrationOnly) + event("StartAllTests", ["Starting test-app"]) + if(!integrationOnly) { runUnitTests() - if(!unitOnly) + } + if(!unitOnly) { runIntegrationTests() + } + event("FinishAllTests", ["Finishing test-app"]) produceReports() } catch (Exception ex) { @@ -269,6 +273,9 @@ def suite = new TestSuite() populateTestSuite(suite, testFiles, classLoader, appCtx, "test/unit/") if (suite.testCount() > 0) { + + event("StartUnitTests", ["Starting unit tests"]) + int testCases = suite.countTestCases() println "-------------------------------------------------------" println "Running ${testCases} Unit Test${testCases > 1 ? 's' : ''}..." @@ -286,6 +293,7 @@ } def end = new Date() + event("FinishUnitTests", ["Unit Tests Completed in ${end.time - start.time}ms"]) event("StatusUpdate", ["Unit Tests Completed in ${end.time - start.time}ms"]) println "-------------------------------------------------------" } @@ -335,6 +343,9 @@ interceptor?.init() def start = new Date() + + event("StartIntegrationTests", ["Starting integration tests"]) + def savedOut = System.out runTests(suite, result) {test, invocation -> name = test.name[0..-6] @@ -378,6 +389,8 @@ RequestContextHolder.setRequestAttributes(null); } def end = new Date() + + event("FinishIntegrationTests", ["Integration Tests Completed in ${end.time - start.time}ms"]) println "Integration Tests Completed in ${end.time - start.time}ms" println "-------------------------------------------------------"