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 class
TestResult.Status
The 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 void
addDescription(String description)
static TestResult
failed(Throwable cause)
static TestResult
flatten(Collection<TestResult> results)
String
getDescription()
long
getEnd()
Get the end time.ExceptionProxy
getExceptionProxy()
long
getStart()
Get the start time.TestResult.Status
getStatus()
Get the status of this testThrowable
getThrowable()
If the test failed, the exception that was thrown.static TestResult
passed()
static TestResult
passed(String description)
void
setDescription(String description)
Deprecated.TestResult
setEnd(long end)
Set the end time of the test.TestResult
setStart(long start)
Set the start time of the test.TestResult
setStatus(TestResult.Status status)
Deprecated.TestResult
setThrowable(Throwable throwable)
static TestResult
skipped()
static TestResult
skipped(String description)
static TestResult
skipped(Throwable cause)
String
toString()
-
-
-
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()
-
-