Interface ResultConstructor
-
- All Known Implementing Classes:
AbstractTestResultConstructor,CucumberTestResultConstructor,JUnitTestResultConstructor,TestNgTestResultConstructor
public interface ResultConstructorConstructs test case results from framework-specific data.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description TestResultconstructTestRunResult(TestResultWrapper testResultWrapper)Constructs test case result from wrapper containing framework-specific data.default StringextractStackTrace(TestResultWrapper holder)Extracts stack trace from JUnit extension context.default StringgetStackTrace(Throwable t)Converts throwable to stack trace string.default booleanisReportableException(Throwable throwable)Checks if exception should be reported (excludes test aborted exceptions).
-
-
-
Method Detail
-
constructTestRunResult
TestResult constructTestRunResult(TestResultWrapper testResultWrapper)
Constructs test case result from wrapper containing framework-specific data.- Parameters:
testResultWrapper- wrapper containing test metadata and framework data- Returns:
- constructed test case result
-
getStackTrace
default String getStackTrace(Throwable t)
Converts throwable to stack trace string.- Parameters:
t- throwable to convert- Returns:
- stack trace as string
-
extractStackTrace
default String extractStackTrace(TestResultWrapper holder)
Extracts stack trace from JUnit extension context.- Parameters:
holder- wrapper containing JUnit extension context- Returns:
- stack trace string or null if no reportable exception
-
isReportableException
default boolean isReportableException(Throwable throwable)
Checks if exception should be reported (excludes test aborted exceptions).- Parameters:
throwable- exception to check- Returns:
- true if exception should be reported
-
-