public class FailureAnalysis extends Object
Any exception that extends StepFailureException and has a cause that meets the above criteria is classed as above. All other exceptions are an ERROR
You can specify your own exceptions that will cause a failure by using the serenity.fail.on property. You can also specify those that will cause an error using serenity.error.on.
| Constructor and Description |
|---|
FailureAnalysis() |
FailureAnalysis(EnvironmentVariables environmentVariables) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
reportAsCompromised(Class<?> testFailureCause) |
boolean |
reportAsError(Class<?> testFailureCause) |
boolean |
reportAsFailure(Class<?> testFailureCause) |
boolean |
reportAsPending(Class<?> testFailureCause) |
boolean |
reportAsSkipped(Class<?> testFailureCause) |
TestResult |
resultFor(Class testFailureCause) |
TestResult |
resultFor(StepFailure stepFailure) |
TestResult |
resultFor(Throwable testFailureCause) |
public FailureAnalysis()
public FailureAnalysis(EnvironmentVariables environmentVariables)
public TestResult resultFor(Class testFailureCause)
public boolean reportAsFailure(Class<?> testFailureCause)
public boolean reportAsCompromised(Class<?> testFailureCause)
public boolean reportAsPending(Class<?> testFailureCause)
public boolean reportAsSkipped(Class<?> testFailureCause)
public boolean reportAsError(Class<?> testFailureCause)
public TestResult resultFor(Throwable testFailureCause)
public TestResult resultFor(StepFailure stepFailure)
Copyright © 2023. All rights reserved.