@Override public void ignorable(String title) { StepEventBus.getEventBus().updateCurrentStepTitle(normalized(title)); StepEventBus.getEventBus().stepIgnored(); }
public void successful(String title) { StepEventBus.getEventBus().updateCurrentStepTitle(normalized(title)); StepEventBus.getEventBus().stepFinished(); }
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)); } }
public void ignorable(String title) { StepEventBus.getEventBus().updateCurrentStepTitle(normalized(title)); StepEventBus.getEventBus().stepIgnored(); }
private void handleTestStepStarted(TestStepStarted event) { if (event.testStep instanceof PickleTestStep) { TestSourcesModel.AstNode astNode = testSources.getAstNode(currentFeaturePath(), event.testStep.getStepLine()); if (astNode != null) { Step step = (Step) astNode.node; if (!addingScenarioOutlineSteps) { stepQueue.add(step); testStepQueue.add(event.testStep); } Step currentStep = stepQueue.peek(); String stepTitle = stepTitleFrom(currentStep, event.testStep); getStepEventBus(currentFeaturePath()).stepStarted(ExecutedStepDescription.withTitle(stepTitle)); getStepEventBus(currentFeaturePath()).updateCurrentStepTitle(normalized(stepTitle)); } } }
@Override public void successful(String title) { if (annotatedResultTakesPriority()) { processAnnotatedResult(); } else { StepEventBus.getEventBus().updateCurrentStepTitle(normalized(title)); StepEventBus.getEventBus().stepFinished(); } }
private void handleTestStepStarted(TestStepStarted event) { if (event.testStep instanceof PickleTestStep) { TestSourcesModel.AstNode astNode = testSources.getAstNode(currentFeaturePath(), event.testStep.getStepLine()); if (astNode != null) { Step step = (Step) astNode.node; if (!addingScenarioOutlineSteps) { stepQueue.add(step); testStepQueue.add(event.testStep); } Step currentStep = stepQueue.peek(); String stepTitle = stepTitleFrom(currentStep, event.testStep); getStepEventBus(currentFeaturePath()).stepStarted(ExecutedStepDescription.withTitle(stepTitle)); getStepEventBus(currentFeaturePath()).updateCurrentStepTitle(normalized(stepTitle)); } } }
private void startNewStep(String scenarioTitle) { if (givenStoryMonitor.isInGivenStory() && StepEventBus.getEventBus().areStepsRunning()) { StepEventBus.getEventBus().updateCurrentStepTitle(scenarioTitle); } else { StepEventBus.getEventBus().stepStarted(ExecutedStepDescription.withTitle(scenarioTitle)); } }
@Override public void failed(String stepTitle, Throwable cause) { if (!StepEventBus.getEventBus().testSuiteHasStarted()) { declareOutOfSuiteFailure(); } if (!errorOrFailureRecordedForStep(cause.getCause())) { StepEventBus.getEventBus().updateCurrentStepTitle(stepTitle); Throwable rootCause = new RootCauseAnalyzer(cause.getCause()).getRootCause().toException(); if (isAssumptionFailure(rootCause)) { StepEventBus.getEventBus().assumptionViolated(rootCause.getMessage()); } else { StepEventBus.getEventBus().stepFailed(new StepFailure(ExecutedStepDescription.withTitle(normalized(stepTitle)), rootCause)); } } }
private void failed(String stepTitle, Throwable cause) { if (!errorOrFailureRecordedForStep(stepTitle, cause)) { if (!isEmpty(stepTitle)) { getStepEventBus(currentFeaturePath()).updateCurrentStepTitle(stepTitle); } Throwable rootCause = new RootCauseAnalyzer(cause).getRootCause().toException(); if (isAssumptionFailure(rootCause)) { getStepEventBus(currentFeaturePath()).assumptionViolated(rootCause.getMessage()); } else { getStepEventBus(currentFeaturePath()).stepFailed(new StepFailure(ExecutedStepDescription.withTitle(normalized(currentStepTitle())), rootCause)); } } }
private void failed(String stepTitle, Throwable cause) { if (!errorOrFailureRecordedForStep(stepTitle, cause)) { if (!isEmpty(stepTitle)) { getStepEventBus(currentFeaturePath()).updateCurrentStepTitle(stepTitle); } Throwable rootCause = new RootCauseAnalyzer(cause).getRootCause().toException(); if (isAssumptionFailure(rootCause)) { getStepEventBus(currentFeaturePath()).assumptionViolated(rootCause.getMessage()); } else { getStepEventBus(currentFeaturePath()).stepFailed(new StepFailure(ExecutedStepDescription.withTitle(normalized(currentStepTitle())), rootCause)); } } }