Skip to content

Instantly share code, notes, and snippets.

@wkorando
Created September 10, 2018 18:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wkorando/54338ecfc371b0e69e1c2f37705e03b1 to your computer and use it in GitHub Desktop.
Save wkorando/54338ecfc371b0e69e1c2f37705e03b1 to your computer and use it in GitHub Desktop.
public class ConsoleOutputListener implements TestExecutionListener {
@Override
public void reportingEntryPublished(TestIdentifier testIdentifier, ReportEntry entry) {
entry.getKeyValuePairs().values().stream().forEach(c -> System.out.println("Captured output: " + c));
TestExecutionListener.super.reportingEntryPublished(testIdentifier, entry);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment