Package org.gradle.api.tasks.testing
Interface TestEventReporter
- All Superinterfaces:
AutoCloseable
- All Known Subinterfaces:
GroupTestEventReporter
Reports test events.
- Since:
- 8.12
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Close the generator.default void
Emit a failure event for the test.default void
Emit a failure event for the test.void
Emit a failure event for the test.void
output
(Instant logTime, TestOutputEvent.Destination destination, String output) Emit an output event for the test.void
Emit a skipped event for the test.void
Emit a start event for the test.void
Emit a successful completion event for the test.
-
Method Details
-
started
Emit a start event for the test. Can only be called once, and must be followed by a call tosucceeded(Instant)
,skipped(Instant)
,failed(Instant)
, orfailed(Instant, String)
.- Parameters:
startTime
- the time the test started- Since:
- 8.12
-
output
Emit an output event for the test. May be called multiple times. May not be called beforestarted(Instant)
.- Parameters:
logTime
- the time the output was logged, must be between the start and end times of the testdestination
- the destination of the outputoutput
- some output from the test- Since:
- 8.12
-
succeeded
Emit a successful completion event for the test. May not be called beforestarted(Instant)
.- Parameters:
endTime
- the time the test completed- Since:
- 8.12
-
skipped
Emit a skipped event for the test. May not be called beforestarted(Instant)
.- Parameters:
endTime
- the time the test completed- Since:
- 8.12
-
failed
Emit a failure event for the test. May not be called beforestarted(Instant)
.- Parameters:
endTime
- the time the test completed- Since:
- 8.12
-
failed
Emit a failure event for the test. May not be called beforestarted(Instant)
.- Parameters:
endTime
- the time the test completedmessage
- the failure message- Since:
- 8.12
-
failed
Emit a failure event for the test. May not be called beforestarted(Instant)
.- Parameters:
endTime
- the time the test completedmessage
- the failure messageadditionalContent
- additional content for the failure, like a stacktrace- Since:
- 8.12
-
close
void close()Close the generator. No further events can be emitted after this.- Specified by:
close
in interfaceAutoCloseable
- Since:
- 8.12
-