Interface ITestMethodResult

All Known Implementing Classes:
TestMethodResult

public interface ITestMethodResult
Represents the result of a single Galasa method execution.

An ITestMethodResult instance provides details about a method including the name, whether it passed or failed, and if it failed, the exception that caused the failure. A single test method result can be retrieved from a list of multiple test method results that have already run with ITestResultProvider#getTestMethodResults().

  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the exception that caused the method to fail, if applicable.
    Returns the name of a method associated with this result.
    boolean
    Indicates if the method failed.
    boolean
    Indicates if the method passed successfully.
  • Method Details

    • getMethodName

      String getMethodName()
      Returns the name of a method associated with this result.
      Returns:
      the method name.
    • isPassed

      boolean isPassed()
      Indicates if the method passed successfully.
      Returns:
      true if the method passed, and false otherwise.
    • isFailed

      boolean isFailed()
      Indicates if the method failed.
      Returns:
      true if the method failed, and false otherwise.
    • getFailureReason

      Throwable getFailureReason()
      Returns the exception that caused the method to fail, if applicable.
      Returns:
      the Throwable that caused the failure, or null if the method passed or did not throw an exception.