Hi guys,
when I'm using System.out inside of a Test (JUNIT/RestAssured) the output is written to the Test-Result in Hudson.
RestAssured (which I use to test a REST-API) provides Filters for Requests and Responses and uses a PrintStream (by default System.out) for the output.
Unfortunately the output is written inside the Console Output but not in the Test results.
I tried to create a new instance of PrintStream with System.out which I passed to Rest-Assured because I thought "maybe the System.out has to come from the Test itself" - but without success.
public static PrintStream stream = new PrintStream(System.out);
@BeforeClass
public static void startUp() {
RestAssured.filters(new RequestLoggingFilter(stream), new ResponseLoggingFilter(stream));
}
Is there an option to get some output of the PrintStream inside of the Logger to the Test-Result?
[Updated on: Thu, 24 July 2014 03:57] by Moderator