public void stepFinished() { stepDone(); getResultTally().logExecutedTest(); for (StepListener stepListener : getAllListeners()) { stepListener.stepFinished(); } }
public void stepIgnored() { stepDone(); getResultTally().logIgnoredTest(); for (StepListener stepListener : getAllListeners()) { stepListener.stepIgnored(); } }
public void lastStepFailed(final StepFailure failure) { getResultTally().logFailure(failure); for (StepListener stepListener : getAllListeners()) { stepListener.stepFailed(failure); } stepFailed = true; }
private void notifyOfStepFailure(final Object object, final Method method, final Object[] args, final Throwable cause) throws Throwable { ExecutedStepDescription description = ExecutedStepDescription.of(testStepClass, getTestNameFrom(method, args), args) .withDisplayedFields(fieldValuesIn(object)); StepFailure failure = new StepFailure(description, cause); StepEventBus.getEventBus().stepFailed(failure); if (shouldThrowExceptionImmediately()) { throw cause; } }
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; } }
private void notifyStepStarted(final Object object, final Method method, final Object[] args) { ExecutedStepDescription description = ExecutedStepDescription.of(testStepClass, getTestNameFrom(method, args), args) .withDisplayedFields(fieldValuesIn(object)); StepEventBus.getEventBus().stepStarted(description); }
public void assumptionViolated(String message) { testIgnored(); suspendTest(); stepDone(); getResultTally().logIgnoredTest(); for (StepListener stepListener : getAllListeners()) { stepListener.assumptionViolated(message); } assumptionViolated = true; assumptionViolatedMessage = message; }
public Object intercept(Object obj, Method method, Object[] args, MethodProxy proxy) throws Throwable { DataDrivenStep.startDataDrivenStep(); Object lastResult = null; for (Object steps : instantiatedSteps) { lastResult = runMethodAndIgnoreExceptions(steps, proxy, method, args); // StepEventBus.getEventBus().exampleFinished(); StepEventBus.getEventBus().clearStepFailures(); } DataDrivenStep.endDataDrivenStep(); return lastResult; }
private void notifySkippedStepStarted(final Object object, final Method method, final Object[] args) { ExecutedStepDescription description = ExecutedStepDescription.of(testStepClass, getTestNameFrom(method, args), args) .withDisplayedFields(fieldValuesIn(object)); StepEventBus.getEventBus().skippedStepStarted(description); }
public void stepPending(String message) { testPending(); stepDone(); getResultTally().logIgnoredTest(); for (StepListener stepListener : getAllListeners()) { if (message != null) { stepListener.stepPending(message); } else { stepListener.stepPending(); } } }
/** * Start the execution of a test step. */ public void stepStarted(final ExecutedStepDescription stepDescription, boolean isPrecondition) { pushStep(stepDescription.getName()); for (StepListener stepListener : getAllListeners()) { stepListener.stepStarted(stepDescription); } if (isPrecondition) { baseStepListener.currentStepIsAPrecondition(); } }
private static void instantiateAnyUnitiaializedSteps(Object testCaseOrSteps, StepFactory stepFactory, StepsAnnotatedField stepsField) { if (!stepsField.isInstantiated(testCaseOrSteps)) { Class<?> scenarioStepsClass = stepsField.getFieldClass(); Object steps = stepFactory.getStepLibraryFor(scenarioStepsClass); stepsField.setValue(testCaseOrSteps, steps); injectNestedScenarioStepsInto(steps, stepFactory, scenarioStepsClass); } }
/** * Record a step that is not scheduled to be executed (e.g. a skipped or ignored step). */ public void skippedStepStarted(final ExecutedStepDescription executedStepDescription) { pushStep(executedStepDescription.getName()); for (StepListener stepListener : getAllListeners()) { stepListener.skippedStepStarted(executedStepDescription); } }
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 stepPending(String message) { testPending(); stepDone(); getResultTally().logIgnoredTest(); for (StepListener stepListener : getAllListeners()) { if (message != null) { stepListener.stepPending(message); } else { stepListener.stepPending(); } } }
public void stepFailed(final StepFailure failure) { stepDone(); getResultTally().logFailure(failure); for (StepListener stepListener : getAllListeners()) { stepListener.stepFailed(failure); } stepFailed = true; }
public void stepFinished() { stepDone(); getResultTally().logExecutedTest(); for (StepListener stepListener : getAllListeners()) { stepListener.stepFinished(); } }
/** * Start the execution of a test step. */ public void stepStarted(final ExecutedStepDescription stepDescription) { pushStep(stepDescription.getName()); for (StepListener stepListener : getAllListeners()) { stepListener.stepStarted(stepDescription); } }
public void lastStepFailed(final StepFailure failure) { getResultTally().logFailure(failure); for (StepListener stepListener : getAllListeners()) { stepListener.stepFailed(failure); } stepFailed = true; }
public void lastStepFailed(final StepFailure failure) { getResultTally().logFailure(failure); for (StepListener stepListener : getAllListeners()) { stepListener.stepFailed(failure); } stepFailed = true; }