Java 类hudson.tasks.junit.TestObject 实例源码

项目:quarantine    文件:QuarantineTestDataPublisher.java   
@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();
}
项目:browserstack-integration-plugin    文件:AutomateActionData.java   
@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();
}
项目:flaky-test-handler-plugin    文件:JUnitFlakyTestData.java   
/**
 * 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();
}
项目:sahagin-jenkins-plugin    文件:SahaginTestData.java   
@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));
}
项目:cloudtest-plugin    文件:JunitResultPublisher.java   
@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();
}