@Override public void endOfScenarioLifeCycle(Scenario scenario) { synchronized (gherkinSteps) { while (gherkinSteps.peek() != null) { fireCanceledStep(gherkinSteps.remove()); } } ALLURE_LIFECYCLE.fire(new TestCaseFinishedEvent()); }
public void fire(TestCaseFinishedEvent event) { TestCaseResult testCase = testCaseStorage.get(); event.process(testCase); Step root = stepStorage.pollLast(); if (Status.PASSED.equals(testCase.getStatus())) { new RemoveAttachmentsEvent(AllureReportConfig.newInstance().getRemoveAttachments()).process(root); } testCase.getSteps().addAll(root.getSteps()); testCase.getAttachments().addAll(root.getAttachments()); stepStorage.remove(); testCaseStorage.remove(); }
/** * Process TestCaseFinishedEvent. Add steps and attachments from * top step from stepStorage to current testCase, then remove testCase * and step from stores. Also remove attachments matches removeAttachments * config. * * @param event to process */ public void fire(TestCaseFinishedEvent event) { TestCaseResult testCase = testCaseStorage.get(); event.process(testCase); Step root = stepStorage.pollLast(); if (Status.PASSED.equals(testCase.getStatus())) { new RemoveAttachmentsEvent(AllureConfig.newInstance().getRemoveAttachments()).process(root); } testCase.getSteps().addAll(root.getSteps()); testCase.getAttachments().addAll(root.getAttachments()); stepStorage.remove(); testCaseStorage.remove(); notifier.fire(event); }
private void fireFinishTest() { getLifecycle().fire(new TestCaseFinishedEvent()); }
public void finishFakeTestCase() { getLifecycle().fire(new TestCaseFinishedEvent()); }
@Override public void testFinished(Description description) throws IllegalAccessException { if (description.isSuite()) { testSuiteFinished(getSuiteUid(description)); } else { getLifecycle().fire(new TestCaseFinishedEvent()); } }