Describes the contract that a test type must support to be runnable by `grails test-app`.
Type | Name and description |
---|---|
void |
cleanup() Do any necessary tidy up. |
java.lang.String |
getName() A suitable display name for this test type. |
java.lang.String |
getRelativeSourcePath() The relative path from the configured test source directory to the particular directory that contains the tests for this test type. |
int |
prepare(GrailsTestTargetPattern[] testTargetPatterns, java.io.File compiledClassesDir, groovy.lang.Binding buildBinding) Perform any kind of initialisation, and return how many tests will be run. |
GrailsTestTypeResult |
run(GrailsTestEventPublisher eventPublisher) Runs the tests, appropriately calls eventPublisher and returns the test result. |
Do any necessary tidy up.
A suitable display name for this test type. Can be called at any time.
The relative path from the configured test source directory to the particular directory that contains the tests for this test type. The build will compile the source in directory returned by this if it is not null and exists.
null
if there is nothing to compile.Perform any kind of initialisation, and return how many tests will be run. If the value returned is less than 1, run(GrailsTestEventPublisher) will NOT be called.
compiledClassesDir
- where the source was compiled to, or null
if
getRelativeSourcePath() returned null
.buildBinding
- the binding from the build environmentRuns the tests, appropriately calls eventPublisher and returns the test result.