The default test runner that runs Grails tests. By default configured to run only unit tests. To run other kinds of tests (functional, integration etc.) additional TestPhaseConfigurer instances need to be registered with the #testFeatureDiscovery property
Modifiers | Name | Description |
---|---|---|
static java.lang.String |
TEST_PHASE_AND_TYPE_SEPARATOR |
|
static java.lang.String |
TEST_PHASE_WILDCARD |
|
static java.lang.String |
TEST_TYPE_WILDCARD |
Fields inherited from class | Fields |
---|---|
class BaseSettingsApi |
appClassName, buildEventListener, buildProps, buildSettings, configSlurper, enableProfile, grailsAppName, grailsHome, isInteractive, metadata, metadataFile, pluginSettings, pluginsHome, resolver |
Type | Name and description |
---|---|
groovy.util.AntBuilder |
ant |
boolean |
createTestReports |
java.io.File |
junitReportStyleDir |
java.util.List<java.lang.String> |
phasesToRun |
GrailsProjectPackager |
projectPackager |
GrailsProjectTestCompiler |
projectTestCompiler |
GrailsProjectWatcher |
projectWatcher |
boolean |
reRunTests |
java.util.List<java.lang.String> |
reportFormats |
java.util.Map<java.lang.String, java.util.List<java.lang.String>> |
targetPhasesAndTypes |
GrailsTestEventPublisher |
testEventPublisher |
groovy.lang.Binding |
testExecutionContext |
TestFeatureDiscoverySupport |
testFeatureDiscovery |
java.util.List<java.lang.String> |
testNames |
java.util.Map |
testOptions |
java.io.File |
testReportsDir |
java.io.File |
testSourceDir |
java.util.Collection<GrailsTestTargetPattern> |
testTargetPatterns |
boolean |
testsFailed |
Constructor and description |
---|
GrailsProjectTestRunner
(GrailsProjectPackager projectPackager) |
Type Params | Return Type | Name and description |
---|---|---|
|
java.lang.Object |
getFailedTests() |
|
void |
initialiseContext(groovy.lang.Binding context) |
|
protected java.util.List<java.lang.String> |
lookupTestPatterns() |
|
void |
processTests(GrailsTestType type) Compiles and runs all the tests of the given type and then generates the reports for them. |
|
boolean |
runAllTests(java.util.Map<java.lang.String, java.lang.String> argsMap, boolean triggerEvents = true) Run all tests in a Grails application |
|
boolean |
runAllTests(boolean triggerEvents = true) Run all tests in a Grails application |
|
void |
runTests(GrailsTestType type, java.io.File compiledClassesDir) |
Compiles and runs all the tests of the given type and then generates the reports for them.
type
- The type of the tests to compile (not the test phase!)
For example, "unit", "jsunit", "webtest", etc.Run all tests in a Grails application
argsMap
- test run parameterstriggerEvents
- Whether to trigger events on start and finish of the test run (optional)Run all tests in a Grails application
triggerEvents
- Whether to trigger events on start and finish of the test run (optional)Groovy Documentation