Package org.jboss.arquillian.test.spi
Class TestResult
- java.lang.Object
-
- org.jboss.arquillian.test.spi.TestResult
-
- All Implemented Interfaces:
Serializable
public final class TestResult extends Object implements Serializable
A test result which may be serialized for communicate between client and server- Author:
- Pete Muir, Aslak Knutsen
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTestResult.StatusThe test status
-
Constructor Summary
Constructors Constructor Description TestResult()Deprecated.TestResult(TestResult.Status status)Deprecated.TestResult(TestResult.Status status, String description)Deprecated.TestResult(TestResult.Status status, Throwable throwable)Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddDescription(String description)static TestResultfailed(Throwable cause)static TestResultflatten(Collection<TestResult> results)StringgetDescription()longgetEnd()Get the end time.ExceptionProxygetExceptionProxy()longgetStart()Get the start time.TestResult.StatusgetStatus()Get the status of this testThrowablegetThrowable()If the test failed, the exception that was thrown.static TestResultpassed()static TestResultpassed(String description)voidsetDescription(String description)Deprecated.TestResultsetEnd(long end)Set the end time of the test.TestResultsetStart(long start)Set the start time of the test.TestResultsetStatus(TestResult.Status status)Deprecated.TestResultsetThrowable(Throwable throwable)static TestResultskipped()static TestResultskipped(String description)static TestResultskipped(Throwable cause)StringtoString()
-
-
-
Constructor Detail
-
TestResult
@Deprecated public TestResult(TestResult.Status status, String description)
Deprecated.
-
TestResult
@Deprecated public TestResult()
Deprecated.Create a empty result.
Start time is set to Current Milliseconds.
-
TestResult
@Deprecated public TestResult(TestResult.Status status)
Deprecated.Create a new TestResult.
Start time is set to Current Milliseconds.- Parameters:
status- The result status.
-
TestResult
@Deprecated public TestResult(TestResult.Status status, Throwable throwable)
Deprecated.Create a new TestResult.
Start time is set to Current Milliseconds.- Parameters:
status- The result status.throwable- thrown exception if any
-
-
Method Detail
-
passed
public static TestResult passed()
-
passed
public static TestResult passed(String description)
-
skipped
public static TestResult skipped(Throwable cause)
-
skipped
public static TestResult skipped(String description)
-
skipped
public static TestResult skipped()
-
failed
public static TestResult failed(Throwable cause)
-
flatten
public static TestResult flatten(Collection<TestResult> results)
-
getStatus
public TestResult.Status getStatus()
Get the status of this test
-
setStatus
@Deprecated public TestResult setStatus(TestResult.Status status)
Deprecated.
-
getDescription
public String getDescription()
-
setDescription
@Deprecated public void setDescription(String description)
Deprecated.
-
addDescription
public void addDescription(String description)
-
getThrowable
public Throwable getThrowable()
If the test failed, the exception that was thrown. It does not need to be the root cause.
-
setThrowable
public TestResult setThrowable(Throwable throwable)
-
getStart
public long getStart()
Get the start time.- Returns:
- Start time in milliseconds
-
setStart
public TestResult setStart(long start)
Set the start time of the test.- Parameters:
start- Start time in milliseconds
-
getEnd
public long getEnd()
Get the end time.- Returns:
- End time in milliseconds
-
setEnd
public TestResult setEnd(long end)
Set the end time of the test.- Parameters:
end- time in milliseconds
-
getExceptionProxy
public ExceptionProxy getExceptionProxy()
-
-