dest.setFullName(String.format("%s.%s", testClass, testMethod)); final Status status = convert(source.getStatus()); dest.setStatus(status); dest.setTime(Time.create(source.getStart(), source.getStop()));
private TestStatus getStatus(TestCaseResult testCaseResult) { switch (testCaseResult.getStatus()) { case FAILED: return TestStatus.FAILED; case BROKEN: return TestStatus.FAILED; case PASSED: return TestStatus.PASSED; default: return TestStatus.NOT_EXECUTED; } }
theStatus = this.getStatus(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "status", theStatus), currentHashCode, theStatus);
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); }
dest.setFullName(String.format("%s.%s", testClass, testMethod)); final Status status = convert(source.getStatus()); dest.setStatus(status); dest.setTime(Time.create(source.getStart(), source.getStop()));