grails.test
Class GrailsAwareGroovyTestSuite
java.lang.Object
junit.framework.TestSuite
groovy.util.GroovyTestSuite
grails.test.GrailsAwareGroovyTestSuite
- All Implemented Interfaces:
- junit.framework.Test
public class GrailsAwareGroovyTestSuite
- extends groovy.util.GroovyTestSuite
Adds support for running Grails JUnit Tests from Eclipse JUnit runner or even
from the command line.
Set GRAILS_HOME environment variable before running the test. Change the
working directory to the Grails application's root directory.
There are several extension points (protected template methods customize*) for customizing behaviour in a subclass.
You will have to copy&paste the suite() and main() methods to the subclass because they are static methods
Contributed by Lari Hotari
- Since:
- 1.1
- Author:
- Graeme Rocher, Lari Hotari
Fields inherited from class groovy.util.GroovyTestSuite |
file, loader |
Methods inherited from class groovy.util.GroovyTestSuite |
loadTestSuite |
Methods inherited from class junit.framework.TestSuite |
addTest, addTestSuite, countTestCases, createTest, getName, getTestConstructor, run, runTest, setName, testAt, testCount, tests, toString, warning |
registerContextClassLoader
protected boolean registerContextClassLoader
GrailsAwareGroovyTestSuite
public GrailsAwareGroovyTestSuite()
customizeClassLoader
protected void customizeClassLoader(GrailsAwareClassLoader gcl)
customizeClassInjectors
protected void customizeClassInjectors(List<ClassInjector> classInjectors)
customizeGrailsResources
protected void customizeGrailsResources(List<Resource> grailsResources)
findBaseDir
protected File findBaseDir()
findGrailsHome
protected File findGrailsHome()
customizeBuildSettings
protected void customizeBuildSettings(BuildSettings grailsSettings)
suite
public static junit.framework.Test suite()
main
public static void main(String[] args)
compile
public Class compile(String fileName)
throws Exception
- Overrides:
compile
in class groovy.util.GroovyTestSuite
- Throws:
Exception
Copyright (c) 2005-2009 The Grails project