|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object junit.framework.TestSuite groovy.util.GroovyTestSuite grails.test.GrailsAwareGroovyTestSuite
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
Field Summary | |
---|---|
protected boolean |
registerContextClassLoader
|
Constructor Summary | |
GrailsAwareGroovyTestSuite()
Constructor. |
Method Summary | |
---|---|
java.lang.Class
|
compile(java.lang.String fileName)
|
protected void
|
customizeBuildSettings(BuildSettings settings)
|
protected void
|
customizeClassInjectors(java.util.List classInjectors)
|
protected void
|
customizeClassLoader(GrailsAwareClassLoader classLoader)
|
protected void
|
customizeGrailsResources(java.util.List grailsResources)
|
protected java.io.File
|
findBaseDir()
|
protected java.io.File
|
findGrailsHome()
|
static void
|
main(java.lang.String[] args)
|
static junit.framework.Test
|
suite()
|
Methods inherited from class groovy.util.GroovyTestSuite | |
---|---|
groovy.util.GroovyTestSuite#main([Ljava.lang.String;), groovy.util.GroovyTestSuite#compile(java.lang.String), groovy.util.GroovyTestSuite#suite(), groovy.util.GroovyTestSuite#loadTestSuite(), groovy.util.GroovyTestSuite#run(junit.framework.TestResult), groovy.util.GroovyTestSuite#toString(), groovy.util.GroovyTestSuite#getName(), groovy.util.GroovyTestSuite#setName(java.lang.String), groovy.util.GroovyTestSuite#warning(java.lang.String), groovy.util.GroovyTestSuite#tests(), groovy.util.GroovyTestSuite#addTest(junit.framework.Test), groovy.util.GroovyTestSuite#countTestCases(), groovy.util.GroovyTestSuite#runTest(junit.framework.Test, junit.framework.TestResult), groovy.util.GroovyTestSuite#testCount(), groovy.util.GroovyTestSuite#createTest(java.lang.Class, java.lang.String), groovy.util.GroovyTestSuite#addTestSuite(java.lang.Class), groovy.util.GroovyTestSuite#getTestConstructor(java.lang.Class), groovy.util.GroovyTestSuite#testAt(int), groovy.util.GroovyTestSuite#wait(), groovy.util.GroovyTestSuite#wait(long), groovy.util.GroovyTestSuite#wait(long, int), groovy.util.GroovyTestSuite#equals(java.lang.Object), groovy.util.GroovyTestSuite#hashCode(), groovy.util.GroovyTestSuite#getClass(), groovy.util.GroovyTestSuite#notify(), groovy.util.GroovyTestSuite#notifyAll() |
Methods inherited from class junit.framework.TestSuite | |
---|---|
junit.framework.TestSuite#run(junit.framework.TestResult), junit.framework.TestSuite#toString(), junit.framework.TestSuite#getName(), junit.framework.TestSuite#setName(java.lang.String), junit.framework.TestSuite#warning(java.lang.String), junit.framework.TestSuite#tests(), junit.framework.TestSuite#addTest(junit.framework.Test), junit.framework.TestSuite#countTestCases(), junit.framework.TestSuite#runTest(junit.framework.Test, junit.framework.TestResult), junit.framework.TestSuite#testCount(), junit.framework.TestSuite#createTest(java.lang.Class, java.lang.String), junit.framework.TestSuite#addTestSuite(java.lang.Class), junit.framework.TestSuite#getTestConstructor(java.lang.Class), junit.framework.TestSuite#testAt(int), junit.framework.TestSuite#wait(), junit.framework.TestSuite#wait(long), junit.framework.TestSuite#wait(long, int), junit.framework.TestSuite#equals(java.lang.Object), junit.framework.TestSuite#hashCode(), junit.framework.TestSuite#getClass(), junit.framework.TestSuite#notify(), junit.framework.TestSuite#notifyAll() |
Field Detail |
---|
protected boolean registerContextClassLoader
Constructor Detail |
---|
public GrailsAwareGroovyTestSuite()
Method Detail |
---|
@Override public java.lang.Class compile(java.lang.String fileName)
protected void customizeBuildSettings(@SuppressWarnings("unused") BuildSettings settings)
protected void customizeClassInjectors(@SuppressWarnings("unused") java.util.List classInjectors)
protected void customizeClassLoader(@SuppressWarnings("unused") GrailsAwareClassLoader classLoader)
protected void customizeGrailsResources(@SuppressWarnings("unused") java.util.List grailsResources)
protected java.io.File findBaseDir()
protected java.io.File findGrailsHome()
public static void main(java.lang.String[] args)
public static junit.framework.Test suite()
Groovy Documentation