Package dev.galasa.framework
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 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, andfalse
otherwise.
-
isFailed
boolean isFailed()Indicates if the method failed.- Returns:
true
if the method failed, andfalse
otherwise.
-
getFailureReason
Throwable getFailureReason()Returns the exception that caused the method to fail, if applicable.- Returns:
- the
Throwable
that caused the failure, ornull
if the method passed or did not throw an exception.
-