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:
  • Constructor Details

    • 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 Details

    • 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()
    • toString

      public String toString()
      Overrides:
      toString in class Object