private void fireTestCaseCancel(ITestResult iTestResult) { Throwable skipMessage = new Throwable() { private static final long serialVersionUID = 1L; @Override public String getMessage() { return "Skipped due to dependency on other skipped or failed test methods"; } }; getLifecycle().fire(new TestCaseCanceledEvent().withThrowable(skipMessage)); }
@Override public void onTestFailedButWithinSuccessPercentage(ITestResult iTestResult) { Throwable throwable = iTestResult.getThrowable(); getLifecycle().fire(new TestCaseCanceledEvent().withThrowable(throwable)); fireFinishTest(); }
public void fireTestCaseFailure(Throwable throwable) { if (throwable instanceof AssumptionViolatedException) { getLifecycle().fire(new TestCaseCanceledEvent().withThrowable(throwable)); } else { getLifecycle().fire(new TestCaseFailureEvent().withThrowable(throwable)); } }