@Override public String toDebugString() { List<String> debugLines = Lists.newArrayList(super.toDebugString()); if (children != null) { for (CHILD_TYPE child : children) { if (child != null) { debugLines.add(child.toDebugString()); } } } return Joiner.on("\n").join(debugLines); }
@Override public void run(final RunNotifier junitNotifier) { log.debug("rootNode.toDebugString:\n" + rootNode.toDebugString()); // for maven if (thisDescription == null) { thisDescription = getDescription(); } log.debug("Description tree:\n" + printDescription(thisDescription, 0)); notifier.setJunitRunNotifier(junitNotifier); runner.run(); }
/** * @param failure */ private static void logFailure(final SubstepExecutionFailure failure) { final Throwable here = new Throwable(); final StackTraceElement[] failureTrace = failure.getThrowableInfo().getStackTrace(); final StackTraceElement[] hereTrace = here.getStackTrace(); final int requiredTraceSize = failureTrace.length - hereTrace.length; if (requiredTraceSize > 0 && requiredTraceSize < failureTrace.length) { final StringBuilder stackTraceBuilder = new StringBuilder(); stackTraceBuilder.append(failure.getThrowableInfo().getDescription()).append("\n"); for (int i = 0; i < requiredTraceSize; i++) { stackTraceBuilder.append("\tat ").append(failureTrace[i]).append("\n"); } log.info("SubstepExecutionFailure @ " + failure.getExeccutionNode().toDebugString() + "\n" + stackTraceBuilder.toString()); } else { // fallback position - just normal logging log.info("SubstepExecutionFailure @ " + failure.getExeccutionNode().toDebugString(), failure.getThrowableInfo().getThrowable()); } }
log.info("SubstepExecutionFailure @ " + failure.getExeccutionNode().toDebugString() + "\n" + stackTraceBuilder.toString()); log.info("SubstepExecutionFailure @ " + failure.getExeccutionNode().toDebugString(), failure.getThrowableInfo().getThrowable());
@Override public void run(final RunNotifier junitNotifier) { log.debug("rootNode.toDebugString:\n" + rootNode.toDebugString()); // for maven if (thisDescription == null) { thisDescription = getDescription(); } log.debug("Description tree:\n" + printDescription(thisDescription, 0)); // ExecutionContext.put(Scope.SUITE, // INotificationDistributor.NOTIFIER_DISTRIBUTOR_KEY, // notifier); notifier.setJunitRunNotifier(junitNotifier); // runner.setNotifier(notifier); Assert.assertNotNull("execution config has not been initialised", executionConfig); runner.run(); }
log.debug("rootNode.toDebugString():\n" + rootNode.toDebugString());
log.debug("rootNode.toDebugString():\n" + rootNode.toDebugString());