@AfterReturning(pointcut = "anyMethod() && withStepAnnotation()", returning = "result") public void stepStop(JoinPoint joinPoint, Object result) { ALLURE.fire(new StepFinishedEvent()); }
/** * Process StepFinishedEvent. Change last added to stepStorage step * and add it as child of previous step. * * @param event to process */ public void fire(StepFinishedEvent event) { Step step = stepStorage.adopt(); event.process(step); notifier.fire(event); }
@Override public void step(String s, Object... args) { try { LIFECYCLE.fire(new StepStartedEvent(format(s, args).replace(".", ","))); super.step(s, args); LIFECYCLE.fire(new StepFinishedEvent()); } catch (Exception ex) { throw exception("Log Step with Allure issue: " + ex.getMessage()); } } }
public void fire(StepFinishedEvent event) { Step step = stepStorage.pollLast(); event.process(step); stepStorage.getLast().getSteps().add(step); }
LIFECYCLE.fire(new StepStartedEvent(s)); logger.step(s); LIFECYCLE.fire(new StepFinishedEvent()); }); JDISettings.initFromProperties();
LIFECYCLE.fire(new StepStartedEvent(s)); logger.step(s); LIFECYCLE.fire(new StepFinishedEvent()); }); JDISettings.initFromProperties();
@AfterThrowing(pointcut = "anyMethod() && withStepAnnotation()", throwing = "e") public void stepFailed(JoinPoint joinPoint, Throwable e) { ALLURE.fire(new StepFailureEvent().withThrowable(e)); ALLURE.fire(new StepFinishedEvent()); }
@Override public void result(Result result) { if (match != null) { if (FAILED.equals(result.getStatus())) { this.excuteFailureCallback(); ALLURE_LIFECYCLE.fire(new StepFailureEvent().withThrowable(getError(result))); ALLURE_LIFECYCLE.fire(new TestCaseFailureEvent().withThrowable(getError(result))); currentStatus = FAILED; } else if (SKIPPED.equals(result.getStatus())) { ALLURE_LIFECYCLE.fire(new StepCanceledEvent()); if (PASSED.equals(currentStatus)) { //not to change FAILED status to CANCELED in the report ALLURE_LIFECYCLE.fire(new TestCasePendingEvent()); currentStatus = SKIPPED; } } ALLURE_LIFECYCLE.fire(new StepFinishedEvent()); match = null; } }
private void fireCanceledStep(Step unimplementedStep) { String name = getStepName(unimplementedStep); ALLURE_LIFECYCLE.fire(new StepStartedEvent(name).withTitle(name)); ALLURE_LIFECYCLE.fire(new StepCanceledEvent()); ALLURE_LIFECYCLE.fire(new StepFinishedEvent()); //not to change FAILED status to CANCELED in the report ALLURE_LIFECYCLE.fire(new TestCasePendingEvent() { @Override protected String getMessage() { return "Unimplemented steps were found"; } }); currentStatus = SKIPPED; }