@Override public List<TestAction> getTestAction(TestObject testObject) { if (build.getParent().getPublishersList().get(QuarantinableJUnitResultArchiver.class) == null) { // only display if QuarantinableJUnitResultArchiver chosen, to avoid // confusion System.out.println("not right publisher"); return Collections.emptyList(); } String id = testObject.getId(); QuarantineTestAction result = quarantines.get(id); if (result != null) { return Collections.<TestAction> singletonList(result); } if (testObject instanceof CaseResult) { return Collections.<TestAction> singletonList(new QuarantineTestAction(this, id)); } return Collections.emptyList(); }
@Override public List<? extends TestAction> getTestAction(TestObject testObject) { if (testObject instanceof CaseResult) { String caseResultId = testObject.getId(); if (testActionMap.containsKey(caseResultId)) { return Collections.singletonList(testActionMap.get(caseResultId)); } } return Collections.emptyList(); }
/** * Get action to display rerun information for each test case * * @param testObject the test object to get information for * @return action to display rerun information for the given test */ @Override public List<? extends TestAction> getTestAction(TestObject testObject) { ActionableFlakyTestObject flakyTestObject = testCaseFlakyInfoMap.get(testObject.getId()); if (flakyTestObject != null) { return Collections.singletonList(flakyTestObject.getTestAction()); } return Collections.emptyList(); }
@Override public List<? extends TestAction> getTestAction(TestObject testObject) { if (!(testObject instanceof CaseResult)) { // Add information only to test case result. // Not add to package result or class result. return Collections.emptyList(); } CaseResult caseResult = (CaseResult) testObject; String qualifiedClassName = caseResult.getClassName(); String testName = caseResult.getName(); return Collections.singletonList(new SahaginTestAction(build, qualifiedClassName, testName)); }
@Override public List<TestAction> getTestAction(TestObject testObject) { if (testObject instanceof CaseResult) { String id = testObject.getId(); JunitResultAction action = actions.get(id); if (action != null) { return Collections.<TestAction>singletonList(action); } } return Collections.emptyList(); }