hudson.model.AbstractBuild.getTestResultAction()方法的使用及代码示例

x33g5p2x  于2022-01-15 转载在 其他  
字(7.1k)|赞(0)|评价(0)|浏览(79)

本文整理了Java中hudson.model.AbstractBuild.getTestResultAction()方法的一些代码示例,展示了AbstractBuild.getTestResultAction()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AbstractBuild.getTestResultAction()方法的具体详情如下:
包路径:hudson.model.AbstractBuild
类名称:AbstractBuild
方法名:getTestResultAction

AbstractBuild.getTestResultAction介绍

暂无

代码示例

代码示例来源:origin: org.eclipse.hudson/hudson-core

/**
 * Returns the action that points to the top level test result includes this
 * test result.
 *
 * @return
 */
public AbstractTestResultAction getParentAction() {
  return getOwner().getTestResultAction();
}

代码示例来源:origin: hudson/hudson-2.x

/**
 * Returns the action that points to the top level test result includes
 * this test result.
 * 
 * @return
 */
public AbstractTestResultAction getParentAction() {
  return getOwner().getTestResultAction();
}

代码示例来源:origin: org.jvnet.hudson.main/hudson-core

/**
 * Returns the action that points to the top level test result includes
 * this test result.
 * 
 * @return
 */
public AbstractTestResultAction getParentAction() {
  return getOwner().getTestResultAction();
}

代码示例来源:origin: org.eclipse.hudson.main/hudson-core

/**
 * Returns the action that points to the top level test result includes
 * this test result.
 * 
 * @return
 */
public AbstractTestResultAction getParentAction() {
  return getOwner().getTestResultAction();
}

代码示例来源:origin: org.hudsonci.plugins/rest-plugin-api

@GET
@Path("tests")
public TestsDTO getTests(final @PathParam("projectName") String projectName, final @PathParam("buildNumber") int buildNumber) {
  log.debug("Get tests: {} #{}", projectName, buildNumber);
  AbstractBuild build = support.getBuild(projectName, buildNumber);
  AbstractTestResultAction action = build.getTestResultAction();
  if (action == null || action.getTotalCount() == 0) {
    throw new WebApplicationException(NO_CONTENT);
  }
  return testsx.convert(build.getTestResultAction());
}

代码示例来源:origin: org.hudsonci.plugins/instant-messaging

private CharSequence getFailedTestsReport(AbstractBuild<?, ?> build) {
  AbstractTestResultAction testResultAction = build.getTestResultAction();
  if (testResultAction == null || testResultAction.getFailCount() == 0) {
    return "";

代码示例来源:origin: com.marvelution.jira.plugins/hudson-apiv2-plugin

/**
 * {@inheritDoc}
 */
@Override
public TestResult convertTo(hudson.model.AbstractBuild source, TestResult destination) {
  // For now disable AggregatedTestResultAction
  if (source.getTestResultAction() != null
    && !(source.getTestResultAction() instanceof AggregatedTestResultAction)) {
    // We have Surefire test results, map these to the TestResult object
    return mapper.map(source.getTestResultAction(), TestResult.class);
  } else if (HudsonPluginUtils.hasTestNGPlugin()) {
    // We have the TestNG plugin installed, maybe there are TestNG test results?
    hudson.plugins.testng.TestNGBuildAction buildAction =
      source.getAction(hudson.plugins.testng.TestNGBuildAction.class);
    if (buildAction != null) {
      return mapper.map(buildAction.getResults(), TestResult.class);
    }
  }
  // Return an empty TestResult
  return new TestResult();
}

代码示例来源:origin: org.eclipse.hudson.main/hudson-core

public AbstractTestResultAction getLastTestResultAction() {
  final AbstractBuild<?,?> tb = project.getLastSuccessfulBuild();
  AbstractBuild<?,?> b=project.getLastBuild();
  while(b!=null) {
    AbstractTestResultAction a = b.getTestResultAction();
    if(a!=null) return a;
    if(b==tb)
      // if even the last successful build didn't produce the test result,
      // that means we just don't have any tests configured.
      return null;
    b = b.getPreviousBuild();
  }
  return null;
}

代码示例来源:origin: hudson/hudson-2.x

public AbstractTestResultAction getLastTestResultAction() {
  final AbstractBuild<?,?> tb = project.getLastSuccessfulBuild();
  AbstractBuild<?,?> b=project.getLastBuild();
  while(b!=null) {
    AbstractTestResultAction a = b.getTestResultAction();
    if(a!=null) return a;
    if(b==tb)
      // if even the last successful build didn't produce the test result,
      // that means we just don't have any tests configured.
      return null;
    b = b.getPreviousBuild();
  }
  return null;
}

代码示例来源:origin: org.jvnet.hudson.main/hudson-core

public AbstractTestResultAction getLastTestResultAction() {
  final AbstractBuild<?,?> tb = project.getLastSuccessfulBuild();
  AbstractBuild<?,?> b=project.getLastBuild();
  while(b!=null) {
    AbstractTestResultAction a = b.getTestResultAction();
    if(a!=null) return a;
    if(b==tb)
      // if even the last successful build didn't produce the test result,
      // that means we just don't have any tests configured.
      return null;
    b = b.getPreviousBuild();
  }
  return null;
}

代码示例来源:origin: org.eclipse.hudson/hudson-core

public AbstractTestResultAction getLastTestResultAction() {
  final AbstractBuild<?, ?> tb = project.getLastSuccessfulBuild();
  AbstractBuild<?, ?> b = project.getLastBuild();
  while (b != null) {
    AbstractTestResultAction a = b.getTestResultAction();
    if (a != null) {
      return a;
    }
    if (b == tb) // if even the last successful build didn't produce the test result,
    // that means we just don't have any tests configured.
    {
      return null;
    }
    b = b.getPreviousBuild();
  }
  return null;
}

代码示例来源:origin: org.hudsonci.plugins/instant-messaging

@Override
protected CharSequence getMessageForJob(AbstractProject<?, ?> job) {
  AbstractBuild<?, ?> build = job.getLastCompletedBuild();
  if (build == null) {
    // No builds
    return job.getFullDisplayName() + " has never been built";
  }   
  AbstractTestResultAction<?> tests = build.getTestResultAction();
  if (tests == null) {
    // no test results associated with this job
    return job.getFullDisplayName() + ": latest build contains no test results";
  }
  StringBuilder listing = new StringBuilder(String.format("%s build #%s had %s of %s tests fail\n", job.getFullDisplayName(), build.getNumber(), tests.getFailCount(), tests.getTotalCount()));
  
  listing.append("\n");
  List<CaseResult> failedTests = tests.getFailedTests();
  for (CaseResult result : failedTests) {
    listing.append(String.format("%s failed in %ss\n", result.getFullName(), result.getDuration()));
  }
  return listing;
}

代码示例来源:origin: org.hudsonci.plugins/rest-plugin-api

target.setTestsAvailable(source.getTestResultAction() != null && source.getTestResultAction().getTotalCount() != 0);

代码示例来源:origin: org.jvnet.hudson.main/hudson-core

AbstractTestResultAction trN = ((AbstractBuild)(Run)this).getTestResultAction();
AbstractTestResultAction trP = prev==null ? null : ((AbstractBuild) prev).getTestResultAction();
if(trP==null) {
  if(trN!=null && trN.getFailCount()>0)

代码示例来源:origin: org.eclipse.hudson.main/hudson-core

AbstractTestResultAction trN = ((AbstractBuild)(Run)this).getTestResultAction();
AbstractTestResultAction trP = prev==null ? null : ((AbstractBuild) prev).getTestResultAction();
if(trP==null) {
  if(trN!=null && trN.getFailCount()>0)

代码示例来源:origin: hudson/hudson-2.x

AbstractTestResultAction trN = ((AbstractBuild)(Run)this).getTestResultAction();
AbstractTestResultAction trP = prev==null ? null : ((AbstractBuild) prev).getTestResultAction();
if(trP==null) {
  if(trN!=null && trN.getFailCount()>0)

代码示例来源:origin: org.eclipse.hudson/hudson-core

AbstractTestResultAction trN = ((AbstractBuild) (Run) this).getTestResultAction();
AbstractTestResultAction trP = prev == null ? null : ((AbstractBuild) prev).getTestResultAction();
if (trP == null) {
  if (trN != null && trN.getFailCount() > 0) {

代码示例来源:origin: org.eclipse.hudson/hudson-core

AbstractTestResultAction trN = ((AbstractBuild) run).getTestResultAction();
AbstractTestResultAction trP = prev == null ? null : ((AbstractBuild) prev.getBuild()).getTestResultAction();
if (trP == null) {
  if (trN != null && trN.getFailCount() > 0) {

相关文章

微信公众号

最新文章

更多

AbstractBuild类方法