Package org.junit.runner
Class Result
java.lang.Object
org.junit.runner.Result
- All Implemented Interfaces:
Serializable
A
Result collects and summarizes information from running multiple tests.
All tests are counted -- additional information is collected from tests that fail.- Since:
- 4.0
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate classprivate static classRepresents the serialized output ofResult. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final AtomicIntegerprivate final AtomicIntegerprivate final CopyOnWriteArrayList<Failure> private final AtomicIntegerprivate final AtomicLongprivate Result.SerializedFormOnly set during deserialization process.private static final ObjectStreamField[]private static final longprivate final AtomicLong -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionInternal use only.intReturns the number of tests skipped because of an assumption failureintReturns the number of tests that failed during the runReturns theFailures describing tests that failed and the problems they encounteredintintReturns the number of tests runlongReturns the number of milliseconds it took to run the entire suite to runprivate voidprivate Objectbooleanprivate void
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
serialPersistentFields
-
count
-
ignoreCount
-
assumptionFailureCount
-
failures
-
runTime
-
startTime
-
serializedForm
Only set during deserialization process.
-
-
Constructor Details
-
Result
public Result() -
Result
-
-
Method Details
-
getRunCount
public int getRunCount()Returns the number of tests run -
getFailureCount
public int getFailureCount()Returns the number of tests that failed during the run -
getRunTime
public long getRunTime()Returns the number of milliseconds it took to run the entire suite to run -
getFailures
Returns theFailures describing tests that failed and the problems they encountered -
getIgnoreCount
public int getIgnoreCount()- Returns:
- the number of tests ignored during the run
-
getAssumptionFailureCount
public int getAssumptionFailureCount()Returns the number of tests skipped because of an assumption failure- Throws:
UnsupportedOperationException- if the result was serialized in a version before JUnit 4.13- Since:
- 4.13
-
wasSuccessful
public boolean wasSuccessful()- Returns:
trueif all tests succeeded
-
writeObject
- Throws:
IOException
-
readObject
- Throws:
ClassNotFoundExceptionIOException
-
readResolve
-
createListener
Internal use only.
-