/** * Returns the action that points to the top level test result includes this * test result. * * @return */ public AbstractTestResultAction getParentAction() { return getOwner().getTestResultAction(); }
/** * Returns the action that points to the top level test result includes * this test result. * * @return */ public AbstractTestResultAction getParentAction() { return getOwner().getTestResultAction(); }
/** * Returns the action that points to the top level test result includes * this test result. * * @return */ public AbstractTestResultAction getParentAction() { return getOwner().getTestResultAction(); }
/** * Returns the action that points to the top level test result includes * this test result. * * @return */ public AbstractTestResultAction getParentAction() { return getOwner().getTestResultAction(); }
@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()); }
private CharSequence getFailedTestsReport(AbstractBuild<?, ?> build) { AbstractTestResultAction testResultAction = build.getTestResultAction(); if (testResultAction == null || testResultAction.getFailCount() == 0) { return "";
/** * {@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(); }
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; }
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; }
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; }
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; }
@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; }
target.setTestsAvailable(source.getTestResultAction() != null && source.getTestResultAction().getTotalCount() != 0);
AbstractTestResultAction trN = ((AbstractBuild)(Run)this).getTestResultAction(); AbstractTestResultAction trP = prev==null ? null : ((AbstractBuild) prev).getTestResultAction(); if(trP==null) { if(trN!=null && trN.getFailCount()>0)
AbstractTestResultAction trN = ((AbstractBuild)(Run)this).getTestResultAction(); AbstractTestResultAction trP = prev==null ? null : ((AbstractBuild) prev).getTestResultAction(); if(trP==null) { if(trN!=null && trN.getFailCount()>0)
AbstractTestResultAction trN = ((AbstractBuild)(Run)this).getTestResultAction(); AbstractTestResultAction trP = prev==null ? null : ((AbstractBuild) prev).getTestResultAction(); if(trP==null) { if(trN!=null && trN.getFailCount()>0)
AbstractTestResultAction trN = ((AbstractBuild) (Run) this).getTestResultAction(); AbstractTestResultAction trP = prev == null ? null : ((AbstractBuild) prev).getTestResultAction(); if (trP == null) { if (trN != null && trN.getFailCount() > 0) {
AbstractTestResultAction trN = ((AbstractBuild) run).getTestResultAction(); AbstractTestResultAction trP = prev == null ? null : ((AbstractBuild) prev.getBuild()).getTestResultAction(); if (trP == null) { if (trN != null && trN.getFailCount() > 0) {