public class Result
extends java.lang.Object
implements java.io.Serializable
Result collects and summarizes information from running multiple tests.
All tests are counted -- additional information is collected from tests that fail.| Modifier and Type | Class and Description |
|---|---|
private class |
Result.Listener |
private static class |
Result.SerializedForm
Represents the serialized output of
Result. |
| Modifier and Type | Field and Description |
|---|---|
private java.util.concurrent.atomic.AtomicInteger |
assumptionFailureCount |
private java.util.concurrent.atomic.AtomicInteger |
count |
private java.util.concurrent.CopyOnWriteArrayList<Failure> |
failures |
private java.util.concurrent.atomic.AtomicInteger |
ignoreCount |
private java.util.concurrent.atomic.AtomicLong |
runTime |
private Result.SerializedForm |
serializedForm
Only set during deserialization process.
|
private static java.io.ObjectStreamField[] |
serialPersistentFields |
private static long |
serialVersionUID |
private java.util.concurrent.atomic.AtomicLong |
startTime |
| Modifier | Constructor and Description |
|---|---|
|
Result() |
private |
Result(Result.SerializedForm serializedForm) |
| Modifier and Type | Method and Description |
|---|---|
RunListener |
createListener()
Internal use only.
|
int |
getAssumptionFailureCount()
Returns the number of tests skipped because of an assumption failure
|
int |
getFailureCount()
Returns the number of tests that failed during the run
|
java.util.List<Failure> |
getFailures()
Returns the
Failures describing tests that failed and the problems they encountered |
int |
getIgnoreCount() |
int |
getRunCount()
Returns the number of tests run
|
long |
getRunTime()
Returns the number of milliseconds it took to run the entire suite to run
|
private void |
readObject(java.io.ObjectInputStream s) |
private java.lang.Object |
readResolve() |
boolean |
wasSuccessful() |
private void |
writeObject(java.io.ObjectOutputStream s) |
private static final long serialVersionUID
private static final java.io.ObjectStreamField[] serialPersistentFields
private final java.util.concurrent.atomic.AtomicInteger count
private final java.util.concurrent.atomic.AtomicInteger ignoreCount
private final java.util.concurrent.atomic.AtomicInteger assumptionFailureCount
private final java.util.concurrent.CopyOnWriteArrayList<Failure> failures
private final java.util.concurrent.atomic.AtomicLong runTime
private final java.util.concurrent.atomic.AtomicLong startTime
private Result.SerializedForm serializedForm
public Result()
private Result(Result.SerializedForm serializedForm)
public int getRunCount()
public int getFailureCount()
public long getRunTime()
public java.util.List<Failure> getFailures()
Failures describing tests that failed and the problems they encounteredpublic int getIgnoreCount()
public int getAssumptionFailureCount()
java.lang.UnsupportedOperationException - if the result was serialized in a version before JUnit 4.13public boolean wasSuccessful()
true if all tests succeededprivate void writeObject(java.io.ObjectOutputStream s)
throws java.io.IOException
java.io.IOExceptionprivate void readObject(java.io.ObjectInputStream s)
throws java.lang.ClassNotFoundException,
java.io.IOException
java.lang.ClassNotFoundExceptionjava.io.IOExceptionprivate java.lang.Object readResolve()
public RunListener createListener()