Writing to Test-Result from REST-Assured-Log [message #1403366] |
Wed, 23 July 2014 09:39 |
Andreas Sattler Messages: 1 Registered: July 2014 |
Junior Member |
|
|
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 07:57] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.02376 seconds