Griffon 1.2.0

org.codehaus.griffon.test
[Groovy] Interface GriffonTestType


interface GriffonTestType

Describes the contract that a test type must support to be runnable by `griffon test-app`.


Method Summary
void cleanup()

Do any necessary tidy up.

String getName()

A suitable display name for this test type.

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(GriffonTestTargetPattern[] testTargetPatterns, File compiledClassesDir, Binding buildBinding)

Perform any kind of initialisation, and return how many tests will be run.

GriffonTestTypeResult run(GriffonTestEventPublisher eventPublisher)

Runs the tests, appropriately calls GriffonTestEventPublisher and returns the GriffonTestTypeResult.

 

Method Detail

cleanup

void cleanup()
Do any necessary tidy up.


getName

String getName()
A suitable display name for this test type. Can be called at any time.


getRelativeSourcePath

String getRelativeSourcePath()
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.
Returns:
the directory to compile relative to the build test directory, or null if there is nothing to compile.


prepare

int prepare(GriffonTestTargetPattern[] testTargetPatterns, File compiledClassesDir, Binding buildBinding)
Perform any kind of initialisation, and return how many tests will be run. If the value returned is less than 1, run(GriffonTestEventPublisher) will NOT be called.
Parameters:
compiledClassesDir - where the source was compiled to, or null if getRelativeSourcePath returned null.
buildBinding - the binding from the build environment
Returns:
the number of tests of this type.


run

GriffonTestTypeResult run(GriffonTestEventPublisher eventPublisher)
Runs the tests, appropriately calls GriffonTestEventPublisher and returns the GriffonTestTypeResult.


 

Groovy Documentation