In Serenity report is there a way to view the Eclipse "Console" output

467 views
Skip to first unread message

Selva kumar V

unread,
Mar 31, 2016, 5:50:39 AM3/31/16
to Serenity BDD Users Group
Hi,
In report is there a way to view the eclipse console data (like System.out.print) since to view some data like printing and all we need those. Please pardon if this question looks lame.

Thanks in advance.

Matthew Chan

unread,
Mar 31, 2016, 6:22:21 PM3/31/16
to Serenity BDD Users Group
There is no way as far as I know.

However if you want to just log additional details into your report, you can do so by doing this. I think it was in one of the older thucydides blog notes. 

public void log(String description, String... remarks) {
System.out.println("\n+Description: " + description + " | Remarks: " + remarks.toString());
String html =
"<h4 style=\"font-style:italic;color:black\">" + description + "</h4>" +
"<div><p>Remarks:</p>" +
"<ul style=\"margin-left:5%; font-weight:200; color:#434343; font-size:10px;\">";

for (String li : remarks) html += "<li>" + li + "</li>";

html += "<ul></div>";

description(html);
}

And a dummy step to be added into the Report
@Step
public void description(String htmlString) {
System.out.println("\n");
}
Reply all
Reply to author
Forward
0 new messages