Reporter.log newline

2,893 views
Skip to first unread message

jrock2004

unread,
Dec 6, 2010, 4:57:46 PM12/6/10
to testng-users
Ok I am trying to make the appearance of how the emailable report from
the reporter.log method look a little fancier. I want to do something
like this:

User ID:
jjj...@soemthing.com

So this is how I am coding it

Reporter.log("User ID: \n" + userID);

Is this not correct? Is their a way I can better style the emailable-
report.html? Thanks

Cédric Beust ♔

unread,
Dec 6, 2010, 5:03:08 PM12/6/10
to testng...@googlegroups.com
It's HTML, try with a <br> or <p>.

-- 
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


jrock2004

unread,
Dec 6, 2010, 5:10:27 PM12/6/10
to testng-users
That did it. Cool that I did not know so that opens up a lot for me,
thank you.

On Dec 6, 5:03 pm, Cédric Beust ♔ <ced...@beust.com> wrote:
> It's HTML, try with a <br> or <p>.
>
> --
> Cédric
>
>
>
>
>
> On Mon, Dec 6, 2010 at 1:57 PM, jrock2004 <jrock2...@gmail.com> wrote:
> > Ok I am trying to make the appearance of how the emailable report from
> > the reporter.log method look a little fancier. I want to do something
> > like this:
>
> > User ID:
> > jjjj...@soemthing.com
>
> > So this is how I am coding it
>
> > Reporter.log("User ID: \n" + userID);
>
> > Is this not correct? Is their a way I can better style the emailable-
> > report.html? Thanks
>
> > --
> > 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<testng-users%2Bunsubscribe@google groups.com>
> > .

jrock2004

unread,
Dec 10, 2010, 8:43:42 AM12/10/10
to testng-users
Now the top section and the title of each tests, are these
configurable? Thanks

Rafael Carvalho

unread,
Jul 1, 2014, 10:45:07 AM7/1/14
to testng...@googlegroups.com
How insert html within of the report.log() ?

I try with Reporter.setEscapeHtml(true); but doesn't work!

Alexander Schikora

unread,
Jul 1, 2014, 11:27:42 AM7/1/14
to testng...@googlegroups.com
luckily it doesn't, you might wanna try false instead of true and check what escaping actually means ;)

SUBRAMANYESWARA RAO BHAVIRISETTY

unread,
Jul 1, 2014, 11:31:52 AM7/1/14
to testng-users
Exactly, And if you are using reportng, set the following system property variable.

                        <org.uncommons.reportng.escape-output>false</org.uncommons.reportng.escape-output>

String reason = "http://jira.com/show_bug.cgi?id="
                    + bugid;


 Reporter.log("<a href=\""+ reason + "\">Bug " + bugid + "</a>" );

You can get the hyperlink in the testng html reports with the above code.



To unsubscribe from this group and stop receiving emails from it, send an email to testng-users...@googlegroups.com.

To post to this group, send email to testng...@googlegroups.com.



--
Subramanyam

Rafael Carvalho

unread,
Jul 1, 2014, 11:57:46 AM7/1/14
to testng...@googlegroups.com
in fact, I need to build a table and organize the output of the results in this table.

So I thought I'd insert html into the report.log ().

Gagan Maheshwari

unread,
Sep 3, 2017, 2:14:29 AM9/3/17
to testng-users
I am trying to introduce html tags in  my testng report, so in order to do that i tried with Reporter.setEscapeHtml(true); and Reporter.setEscapeHtml(false); but not one of them is working. Please help me out

Krishnan Mahadevan

unread,
Sep 8, 2017, 4:08:31 PM9/8/17
to testng...@googlegroups.com

What version of TestNG are you working with ?

 

Thanks & Regards

Krishnan Mahadevan

 

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"

My Scribblings @ http://wakened-cognition.blogspot.com/

My Technical Scribbings @ http://rationaleemotions.wordpress.com/

--

You received this message because you are subscribed to the Google Groups "testng-users" group.

To unsubscribe from this group and stop receiving emails from it, send an email to testng-users...@googlegroups.com.

To post to this group, send email to testng...@googlegroups.com.

Reply all
Reply to author
Forward
0 new messages