@Override public void match(Match match) { if (match instanceof StepDefinitionMatch) { this.match = (StepDefinitionMatch) match; Step step = extractStep(this.match); synchronized (gherkinSteps) { while (gherkinSteps.peek() != null && !isEqualSteps(step, gherkinSteps.peek())) { fireCanceledStep(gherkinSteps.remove()); } if (isEqualSteps(step, gherkinSteps.peek())) { gherkinSteps.remove(); } } String name = this.getStepName(step); ALLURE_LIFECYCLE.fire(new StepStartedEvent(name).withTitle(name)); createDataTableAttachment(step.getRows()); } }
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; }