new line character and and TestNG report

2,812 views
Skip to first unread message

Tarun K

unread,
Aug 20, 2010, 7:25:31 AM8/20/10
to testng-users
Might be most silly question ever asked on this forum.
I have been trying hard to have my messages appearing in different
lines but of no avail.
when I do -

System.out.println("Failed Again NOT new" +"\nline another new
line");

in my TestNG method I get to see them in different lines on console.

But same string posted in Reporter.log API does not have it posted in
different lines

Reporter.log("Failed Again NOT new" +"\nline another new
line");

and I see out put as following in TestNG report -

**********
Failed Again NOT new line
another new line
**********

Though it should have been -

**********
Failed Again NOT new
line another new line
**********

Any guess.

Thanks in advance
~T

Cédric Beust ♔

unread,
Aug 22, 2010, 1:05:48 PM8/22/10
to testng...@googlegroups.com
Where are you reading the Reporter output, in the HTML report? \n will be ignored in HTML, you should use <p> or <br> if you want a new line there.

--
Cédric



--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To post to this group, send email to testng...@googlegroups.com.
To unsubscribe from this group, send email to testng-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/testng-users?hl=en.




--
Cédric


Tarun K

unread,
Aug 23, 2010, 12:24:32 PM8/23/10
to testng-users
thanks u replied. would try this...

~ T
Reply all
Reply to author
Forward
0 new messages