public void stepFailed(StepFailure failure) { if (loggingLevelIsAtLeast(LoggingLevel.VERBOSE)) { String errorMessage = (failure.getException() != null) ? failure.getException().toString() : failure.getMessage(); String failureType = analysis.resultFor(failure.getException()).name(); getLogger().info(red("STEP {}: {}"), failureType, errorMessage); } }
public TestResult resultFor(StepFailure stepFailure) { if (stepFailure.getExceptionClass() == null) { return FAILURE; } else { return resultFor(stepFailure.getExceptionClass()); } }
public <T> void reportStepFailureFor(Consequence<T> consequence, Throwable e) { ExecutedStepDescription consequenceDescription = ExecutedStepDescription.withTitle(consequence.toString()); StepEventBus.getEventBus().stepFailed(new StepFailure(consequenceDescription, e)); }
public String getMessage() { return getException().getMessage(); } }
public void stepFailed(StepFailure failure) { if (loggingLevelIsAtLeast(getLoggingLevel().VERBOSE)) { getLogger().info("STEP FAILED: " + failure.getMessage()); } }
public void reportStepFailureFor(Performable todo, Throwable e) { ExecutedStepDescription taskDescription = ExecutedStepDescription.of(todo.getClass(),"attemptsTo"); StepEventBus.getEventBus().stepFailed(new StepFailure(taskDescription, e)); }
public TestResult resultFor(StepFailure stepFailure) { if (stepFailure.getException() == null) { return FAILURE; } else { return resultFor(stepFailure.getException()); } }
public void stepFailed(StepFailure failure) { if (loggingLevelIsAtLeast(getLoggingLevel().VERBOSE)) { getLogger().info("STEP FAILED: " + failure.getMessage()); } }
public void reportStepFailureFor(Performable todo, Throwable e) { ExecutedStepDescription taskDescription = ExecutedStepDescription.of(todo.getClass(),"attemptsTo"); StepEventBus.getEventBus().stepFailed(new StepFailure(taskDescription, e)); }
private void recordFailureDetailsInFailingTestStep(final StepFailure failure) { if (currentStepExists()) { getCurrentStep().failedWith(new StepFailureException(failure.getMessage(), failure.getException())); } }
public void lastStepFailedWith(StepFailure failure) { lastStepFailedWith(failure.getException()); }
public TestResult resultFor(StepFailure stepFailure) { if (stepFailure.getExceptionClass() == null) { return FAILURE; } else { return resultFor(stepFailure.getExceptionClass()); } }
public <T> void reportStepFailureFor(Consequence<T> consequence, Throwable e) { ExecutedStepDescription consequenceDescription = ExecutedStepDescription.withTitle(consequence.toString()); StepEventBus.getEventBus().stepFailed(new StepFailure(consequenceDescription, e)); }
private void recordFailureDetailsInFailingTestStep(final StepFailure failure) { if (currentStepExists()) { getCurrentStep().failedWith(new StepFailureException(failure.getMessage(), failure.getException())); } }
public void lastStepFailedWith(StepFailure failure) { lastStepFailedWith(failure.getException()); }
public void failed(String stepTitle, Throwable cause) { Throwable rootCause = cause.getCause() != null ? cause.getCause() : cause; StepEventBus.getEventBus().updateCurrentStepTitle(stepTitle); if (isAssumptionFailure(rootCause)) { StepEventBus.getEventBus().assumptionViolated(rootCause.getMessage()); } else { StepEventBus.getEventBus().stepFailed(new StepFailure(ExecutedStepDescription.withTitle(normalized(stepTitle)), rootCause)); } }
private void recordFailureDetails(final StepFailure failure) { if (currentStepExists()) { getCurrentStep().failedWith(new StepFailureException(failure.getMessage(), failure.getException())); } if (shouldTagErrors()) { addTagFor(getCurrentTestOutcome()); } lastFailingExample = currentExample; }
public void lastStepFailedWith(StepFailure failure) { lastStepFailedWith(failure.getException()); }
private void notifyOfStepFailure(final Method method, final Object[] args, final Throwable cause) throws Throwable { ExecutedStepDescription description = ExecutedStepDescription.of(testStepClass, getTestNameFrom(method, args)); StepFailure failure = new StepFailure(description, cause); StepEventBus.getEventBus().stepFailed(failure); if (shouldThrowExceptionImmediately()) { throw cause; } }
public void stepFailed(StepFailure failure) { takeEndOfStepScreenshotFor(FAILURE); getCurrentTestOutcome().determineTestFailureCause(failure.getException()); recordFailureDetailsInFailingTestStep(failure); currentStepDone(failureAnalysis.resultFor(failure)); }