protected void printFailure(Failure each, String prefix) { getWriter().println(prefix + ") " + each.getTestHeader()); getWriter().print(each.getTrace()); }
protected void printFailure(Failure each, String prefix) { getWriter().println(prefix + ") " + each.getTestHeader()); getWriter().print(each.getTrace()); }
@Override public void testAssumptionFailure(Failure failure) { status = assumptionFailure; failureTrace = failure.getTrace(); skippedCount++; }
public void addAssumptionFailure(String description, Failure failure) { JsonObject test = testMap.get(description); test.addProperty(RESULT, "skipped"); test.addProperty(FAILURE_MESSAGE, failure.getTrace()); }
public void addTestFailure(String description, Failure failure) { JsonObject test = testMap.get(description); if (test != null) { test.addProperty(RESULT, "failure"); test.addProperty(FAILURE_MESSAGE, failure.getTrace()); } }
public void addAssumptionFailure(String description, Failure failure) { JsonObject test = testMap.get(description); test.addProperty(RESULT, "skipped"); test.addProperty(FAILURE_MESSAGE, failure.getTrace()); }
public void addTestFailure(String description, Failure failure) { JsonObject test = testMap.get(description); if (test != null) { test.addProperty(RESULT, "failure"); test.addProperty(FAILURE_MESSAGE, failure.getTrace()); } }
@Override public void testFailure(Failure failure) throws Exception { super.testFailure(failure); output.println("FAILURE " + failure); output.println("Stack Trace: " + failure.getTrace()); }
Result aTest; aTest= org.junit.runner.JUnitCore.runClasses(new Class<?>[] { Events.class,SearchCheck.class}); for(Failure i:aTest.getFailures()) { System.out.println(i.getException()+"\nat: "+i.getDescription()); System.out.println("trace: "+i.getTrace()); System.out.println(); } }
@Override public void testFailure(Failure failure) throws Exception { String trace = ""; if (failure.getTrace() != null && !failure.getTrace().isEmpty()) { trace = failure.getTrace(); } report("test Failed '%s' message='%s' details='%s'", getTestName(failure.getDescription()), "failed", trace); testFinished(failure.getDescription()); }
public FailureMirror(Failure failure) { this.message = failure.getMessage(); this.description = failure.getDescription(); this.trace = failure.getTrace(); final Throwable cause = failure.getException(); this.assertionViolation = cause instanceof AssertionError; this.assumptionViolation = cause instanceof AssumptionViolatedException; this.throwableString = cause.toString(); this.throwableClass = cause.getClass().getName(); }
public FailureMirror(Failure failure) { this.message = failure.getMessage(); this.description = failure.getDescription(); this.trace = failure.getTrace(); final Throwable cause = failure.getException(); this.assertionViolation = cause instanceof AssertionError; this.assumptionViolation = cause instanceof AssumptionViolatedException; this.throwableString = cause.toString(); this.throwableClass = cause.getClass().getName(); }
@Override public void testFailure(Failure failure) { if (failure.getTrace() != null && !failure.getTrace().isEmpty()) print(failure.getTrace()); println("##teamcity[testFailed flowId='%s' name='%s' message='%s' details='%s']", flowId, getTestName(failure.getDescription()), "failed", ""); testFinished(failure.getDescription()); }
protected void printFailure(Failure each, String prefix) { getWriter().println(prefix + ") " + each.getTestHeader()); getWriter().print(each.getTrace()); }
protected void printFailure(Failure each, String prefix) { getWriter().println(prefix + ") " + each.getTestHeader()); getWriter().print(each.getTrace()); }
static void dumpResult(Result result) { System.out.println("Failure count=" + result.getFailureCount()); System.out.println("Run count=" + result.getRunCount()); List<Failure> failureList = result.getFailures(); for (Failure f : failureList) { System.out.println("header=" + f.getTestHeader()); System.out.println("msg=" + f.getMessage()); System.out.println(f.getTrace()); } }
@Override public void testFailure(Failure failure) throws Exception { writer.write("failure",failure.toString()); writer.write("trace",failure.getTrace()); }
protected void runTest(Class testClass) { List<Failure> failures = JUnitCore.runClasses(testClass).getFailures(); StringBuffer message = new StringBuffer("The test should have NOT failed but it did!"); if (!failures.isEmpty()) { message.append("The stacktrace:\n" + failures.get(0).getTrace()); } Assert.assertTrue(message.toString(), failures.isEmpty()); } }
@Override public void testFailure(Failure f) throws Exception { Description d = f.getDescription(); say("##teamcity[testFailed name='%s' message='%s' details='%s']", getTestName(d), f.getMessage(), f.getTrace()); }
public FailureDTO(Failure failure) { this.message = failure.getMessage(); this.testHeader = failure.getTestHeader(); this.trace = failure.getTrace(); Description description = failure.getDescription(); if (description != null) { // TODO we could return the entire description tree? this.description = description.toString(); } ThrowableDTO.addThrowableAndCauses(exceptions, failure.getException()); }