Publishes test related events to the Grails build system.
Modifiers | Name | Description |
---|---|---|
protected GrailsBuildEventListener |
buildEventListener |
Constructor and description |
---|
GrailsTestEventPublisher
(GrailsBuildEventListener buildEventListener) @param event the "event" closure from the Grails build system |
Type | Name and description |
---|---|
void |
testCaseEnd(java.lang.String name, java.lang.String out = null, java.lang.String err = null) Signifies the end of a "unit" of tests. |
void |
testCaseStart(java.lang.String name) Signifies the start of a "unit" of tests. |
void |
testEnd(java.lang.String name) Signifies that a test has ended. |
void |
testFailure(java.lang.String name, java.lang.Throwable failure, boolean isError = false) Signifies that a test did not complete successfully. |
void |
testFailure(java.lang.String name, java.lang.String failure = null, boolean isError = false) Signifies that a test did not complete successfully. |
void |
testStart(java.lang.String name) Signifies the start of an individual test, inside a parent "unit". |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
event
- the "event" closure from the Grails build system Signifies the end of a "unit" of tests. (e.g. A JUnit TestCase).
Must be called after testEnd(java.lang.String) with the same name as
the most recent call to testCaseStart(java.lang.String).
Publishes the event TestCaseEnd
with name
as the parameter.
name
- a logical name for the test "unit" Signifies the start of a "unit" of tests. (e.g. A JUnit TestCase).
Must be called first, or after testCaseEnd(String,String,String).
Publishes the event TestCaseStart
with name
as the parameter.
name
- a logical name for the test "unit" Signifies that a test has ended.
Must be called after testStart(java.lang.String) with the same name,
or testStart(java.lang.String, java.lang.String, boolean) or testStart(java.lang.String, java.lang.Throwable, boolean)
with the same name.
Publishes the event TestEnd
with name
as the parameter.
name
- a logical name for the testfailure
- a description of the failureisError
- true if this failure was due to an indirect error,
false if this failure was a direct assertion failure or incorrect assumption Signifies that a test did not complete successfully.
Must be called after testStart(java.lang.String) with the same name
.
Publishes the event TestFailure
with name
, failure
and isError
as the parameters.
name
- a logical name for the testfailure
- the throwable raised from the failureisError
- true if this failure was due to an indirect error,
false if this failure was a direct assertion failure or incorrect assumption Signifies that a test did not complete successfully.
Must be called after testStart(java.lang.String) with the same name.
Publishes the event TestFailure
with name
, failure
and isError
as the parameters.
name
- a logical name for the testfailure
- a description of the failureisError
- true if this failure was due to an indirect error,
false if this failure was a direct assertion failure or incorrect assumption Signifies the start of an individual test, inside a parent "unit".
Must be called after testCaseStart(java.lang.String) or after testEnd(java.lang.String).
Publishes the event TestStart
with name
as the parameter.
name
- a logical name for the test