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.Descriptiondescriptionprivate java.util.List<IEvent>eventStreamprivate longexecutionTimeprivate ForkedJvmInfoslaveprivate AggregatedSuiteStartedEventstartEventprivate longstartTimestampprivate java.util.List<FailureMirror>suiteFailuresprivate 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 voidflush(EventType evt, JsonWriter w, WriterOutputStream wos, java.io.StringWriter out)voidflushBoth(JsonWriter w, java.io.StringWriter out, java.io.StringWriter err, WriterOutputStream stdout, WriterOutputStream stderr)org.junit.runner.DescriptiongetDescription()intgetErrorCount()The number of tests that haveTestStatus.ERRORand include the suite-level errors.java.util.List<IEvent>getEventStream()longgetExecutionTime()Execution time in milliseconds.intgetFailureCount()The number of tests that haveTestStatus.FAILUREand include assertion violations at suite level.java.util.List<FailureMirror>getFailures()intgetIgnoredCount()Return the number of ignored or assumption-ignored tests.ForkedJvmInfogetSlave()AggregatedSuiteStartedEventgetStartEvent()longgetStartTimestamp()Execution start timestamp (on the slave).java.util.List<AggregatedTestResultEvent>getTests()booleanisSuccessful()voidserialize(JsonWriter w, boolean outputStreams)private voidserialize(JsonWriter w, FailureMirror e)private voidserialize(JsonWriter w, java.text.SimpleDateFormat sdf, AggregatedTestResultEvent e)private voidserializeEvents(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:
getFailuresin interfaceAggregatedResultEvent
-
isSuccessful
public boolean isSuccessful()
- Specified by:
isSuccessfulin interfaceAggregatedResultEvent
-
getEventStream
public java.util.List<IEvent> getEventStream()
- Specified by:
getEventStreamin interfaceAggregatedResultEvent
-
getSlave
public ForkedJvmInfo getSlave()
- Specified by:
getSlavein interfaceAggregatedResultEvent
-
getDescription
public org.junit.runner.Description getDescription()
- Specified by:
getDescriptionin interfaceAggregatedResultEvent
-
getExecutionTime
public long getExecutionTime()
Execution time in milliseconds.- Specified by:
getExecutionTimein interfaceAggregatedResultEvent
-
getStartTimestamp
public long getStartTimestamp()
Execution start timestamp (on the slave).- Specified by:
getStartTimestampin interfaceAggregatedResultEvent
-
getFailureCount
public int getFailureCount()
The number of tests that haveTestStatus.FAILUREand include assertion violations at suite level.
-
getErrorCount
public int getErrorCount()
The number of tests that haveTestStatus.ERRORand 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
-
-