From 04c775ce3e0cd95bf7a323cc6b7dea2b0cfc843f Mon Sep 17 00:00:00 2001 From: Dave Syer Date: Wed, 6 Feb 2013 14:55:49 +0000 Subject: [PATCH] Add stdout from bash processes to test reports Its quite hard to debug what went wrong if a test fails so it would be very helpful to have a record somewhere of the stdout from bash. This patch appends it to the test report. --- src/test/resources/gvm/env.groovy | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/test/resources/gvm/env.groovy b/src/test/resources/gvm/env.groovy index 261799aa..d804da6d 100644 --- a/src/test/resources/gvm/env.groovy +++ b/src/test/resources/gvm/env.groovy @@ -48,7 +48,11 @@ Before(){ } } -After(){ +After(){ scenario -> + def output = bash?.output + if (output) { + scenario.write("\nOutput: \n${output}") + } bash?.stop() cleanUp() }