Schnittstelle TestResult


public interface TestResult
Describes a test result.
  • Verschachtelte Klassen - Übersicht

    Verschachtelte Klassen
    Modifizierer und Typ
    Schnittstelle
    Beschreibung
    static enum 
    The final status of a test.
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    If the test failed with assumption violation, this will contain the failure.
    long
    Returns the time when this test completed execution.
    If the test failed with an exception, this will be the exception.
    If the test failed with any exceptions, this will contain the exceptions.
    long
    Returns the number of failed atomic tests executed for this test.
    If the test failed with any exceptions, this will contain the exceptions and a description of the failure types.
    Returns the type of result.
    long
    Returns the number of skipped atomic tests executed for this test.
    long
    Returns the time when this test started execution.
    long
    Returns the number of successful atomic tests executed for this test.
    long
    Returns the total number of atomic tests executed for this test.
  • Methodendetails

    • getResultType

      TestResult.ResultType getResultType()
      Returns the type of result. Generally one wants it to be SUCCESS!
      Gibt zurück:
      The result type.
    • getException

      @Nullable Throwable getException()
      If the test failed with an exception, this will be the exception. Some test frameworks do not fail without an exception (JUnit), so in those cases this method will never return null.
      Gibt zurück:
      The exception, if any, logged for this test. If none, a null is returned.
    • getFailures

      @Incubating List<TestFailure> getFailures()
      If the test failed with any exceptions, this will contain the exceptions and a description of the failure types.
      Gibt zurück:
      The failures, if any, logged for this test. If none, an empty list is returned.
      Seit:
      7.6
      Siehe auch:
    • getExceptions

      List<Throwable> getExceptions()
      If the test failed with any exceptions, this will contain the exceptions. Some test frameworks do not fail without an exception (JUnit), so in those cases this method will never return an empty list.
      Gibt zurück:
      The exceptions, if any, logged for this test. If none, an empty list is returned.
    • getAssumptionFailure

      @Incubating TestFailure getAssumptionFailure()
      If the test failed with assumption violation, this will contain the failure.
      Gibt zurück:
      the failure, if any, logged for this test. If none, null is returned.
      Seit:
      8.14
    • getStartTime

      long getStartTime()
      Returns the time when this test started execution.
      Gibt zurück:
      The start time, in milliseconds since the epoch.
    • getEndTime

      long getEndTime()
      Returns the time when this test completed execution.
      Gibt zurück:
      The end t ime, in milliseconds since the epoch.
    • getTestCount

      long getTestCount()
      Returns the total number of atomic tests executed for this test. This will return 1 if this test is itself an atomic test.
      Gibt zurück:
      The number of tests, possibly 0
    • getSuccessfulTestCount

      long getSuccessfulTestCount()
      Returns the number of successful atomic tests executed for this test.
      Gibt zurück:
      The number of tests, possibly 0
    • getFailedTestCount

      long getFailedTestCount()
      Returns the number of failed atomic tests executed for this test.
      Gibt zurück:
      The number of tests, possibly 0
    • getSkippedTestCount

      long getSkippedTestCount()
      Returns the number of skipped atomic tests executed for this test.
      Gibt zurück:
      The number of tests, possibly 0