Class AggregatedSuiteResultEvent
- java.lang.Object
-
- com.carrotsearch.ant.tasks.junit4.events.aggregated.AggregatedSuiteResultEvent
-
- All Implemented Interfaces:
AggregatedResultEvent
public class AggregatedSuiteResultEvent extends java.lang.Object implements AggregatedResultEvent
-
-
Field Summary
Fields Modifier and Type Field Description private org.junit.runner.Description
description
private java.util.List<IEvent>
eventStream
private long
executionTime
private ForkedJvmInfo
slave
private AggregatedSuiteStartedEvent
startEvent
private long
startTimestamp
private java.util.List<FailureMirror>
suiteFailures
private java.util.List<AggregatedTestResultEvent>
tests
-
Constructor Summary
Constructors Constructor Description AggregatedSuiteResultEvent(AggregatedSuiteStartedEvent startEvent, ForkedJvmInfo id, org.junit.runner.Description description, java.util.List<FailureMirror> suiteFailures, java.util.List<AggregatedTestResultEvent> tests, java.util.List<IEvent> eventStream, long startTimestamp, long executionTime)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
flush(EventType evt, JsonWriter w, WriterOutputStream wos, java.io.StringWriter out)
void
flushBoth(JsonWriter w, java.io.StringWriter out, java.io.StringWriter err, WriterOutputStream stdout, WriterOutputStream stderr)
org.junit.runner.Description
getDescription()
int
getErrorCount()
The number of tests that haveTestStatus.ERROR
and include the suite-level errors.java.util.List<IEvent>
getEventStream()
long
getExecutionTime()
Execution time in milliseconds.int
getFailureCount()
The number of tests that haveTestStatus.FAILURE
and include assertion violations at suite level.java.util.List<FailureMirror>
getFailures()
int
getIgnoredCount()
Return the number of ignored or assumption-ignored tests.ForkedJvmInfo
getSlave()
AggregatedSuiteStartedEvent
getStartEvent()
long
getStartTimestamp()
Execution start timestamp (on the slave).java.util.List<AggregatedTestResultEvent>
getTests()
boolean
isSuccessful()
void
serialize(JsonWriter w, boolean outputStreams)
private void
serialize(JsonWriter w, FailureMirror e)
private void
serialize(JsonWriter w, java.text.SimpleDateFormat sdf, AggregatedTestResultEvent e)
private void
serializeEvents(JsonWriter w, boolean outputStreams)
-
-
-
Field Detail
-
slave
private final transient ForkedJvmInfo slave
-
executionTime
private final long executionTime
-
startTimestamp
private final long startTimestamp
-
description
private final org.junit.runner.Description description
-
tests
private final java.util.List<AggregatedTestResultEvent> tests
-
suiteFailures
private final java.util.List<FailureMirror> suiteFailures
-
eventStream
private final java.util.List<IEvent> eventStream
-
startEvent
private final AggregatedSuiteStartedEvent startEvent
-
-
Constructor Detail
-
AggregatedSuiteResultEvent
public AggregatedSuiteResultEvent(AggregatedSuiteStartedEvent startEvent, ForkedJvmInfo id, org.junit.runner.Description description, java.util.List<FailureMirror> suiteFailures, java.util.List<AggregatedTestResultEvent> tests, java.util.List<IEvent> eventStream, long startTimestamp, long executionTime)
-
-
Method Detail
-
getStartEvent
public AggregatedSuiteStartedEvent getStartEvent()
-
getTests
public java.util.List<AggregatedTestResultEvent> getTests()
-
getFailures
public java.util.List<FailureMirror> getFailures()
- Specified by:
getFailures
in interfaceAggregatedResultEvent
-
isSuccessful
public boolean isSuccessful()
- Specified by:
isSuccessful
in interfaceAggregatedResultEvent
-
getEventStream
public java.util.List<IEvent> getEventStream()
- Specified by:
getEventStream
in interfaceAggregatedResultEvent
-
getSlave
public ForkedJvmInfo getSlave()
- Specified by:
getSlave
in interfaceAggregatedResultEvent
-
getDescription
public org.junit.runner.Description getDescription()
- Specified by:
getDescription
in interfaceAggregatedResultEvent
-
getExecutionTime
public long getExecutionTime()
Execution time in milliseconds.- Specified by:
getExecutionTime
in interfaceAggregatedResultEvent
-
getStartTimestamp
public long getStartTimestamp()
Execution start timestamp (on the slave).- Specified by:
getStartTimestamp
in interfaceAggregatedResultEvent
-
getFailureCount
public int getFailureCount()
The number of tests that haveTestStatus.FAILURE
and include assertion violations at suite level.
-
getErrorCount
public int getErrorCount()
The number of tests that haveTestStatus.ERROR
and include the suite-level errors.
-
getIgnoredCount
public int getIgnoredCount()
Return the number of ignored or assumption-ignored tests.
-
serialize
public void serialize(JsonWriter w, boolean outputStreams) throws java.io.IOException
- Throws:
java.io.IOException
-
serialize
private void serialize(JsonWriter w, java.text.SimpleDateFormat sdf, AggregatedTestResultEvent e) throws java.io.IOException
- Throws:
java.io.IOException
-
serialize
private void serialize(JsonWriter w, FailureMirror e) throws java.io.IOException
- Throws:
java.io.IOException
-
serializeEvents
private void serializeEvents(JsonWriter w, boolean outputStreams) throws java.io.IOException
- Throws:
java.io.IOException
-
flushBoth
public void flushBoth(JsonWriter w, java.io.StringWriter out, java.io.StringWriter err, WriterOutputStream stdout, WriterOutputStream stderr) throws java.io.IOException
- Throws:
java.io.IOException
-
flush
private void flush(EventType evt, JsonWriter w, WriterOutputStream wos, java.io.StringWriter out) throws java.io.IOException
- Throws:
java.io.IOException
-
-