Encoding for TestNG Report

553 views
Skip to first unread message

Tarun K

unread,
Sep 2, 2010, 9:23:58 AM9/2/10
to testng-users
Hello all,

could u please let me know as to which class/utility defines encoding
for TestNG xml report.
I seem to be having problem with custom selenium report built in
house. The custom report does not display Arabic characters while
TestNG report displays them perfect.
I want to know the encoding which is used by TestNG so that it reports
works perfect even with Arabic characters.

Thanks
~ T

Chris Dolan

unread,
Sep 2, 2010, 4:31:49 PM9/2/10
to testng-users
In org.testng.reporters.JUnitXMLReporter:

protected void generateReport(ITestContext context) {
XMLStringBuffer document= new XMLStringBuffer("");
document.setXmlDetails("1.0", "UTF-8");
...

Chris

Tarun K

unread,
Sep 2, 2010, 11:18:29 PM9/2/10
to testng-users
Thanks this helps....

Tarun K

unread,
Sep 2, 2010, 11:46:31 PM9/2/10
to testng-users
Well, I am going awry on this. Still.......
I noticed that in-house report was using "ISO-8859-1" encoding to
generate test report xml file, so I had modified to "UTF-8", but still
did not get to see Arabic characters!
Could there be any other reason for this than encoding?

Thanks
~ T

Felipe Knorr Kuhn

unread,
Sep 3, 2010, 3:21:00 AM9/3/10
to testng...@googlegroups.com
How are you launching TestNG? Is it via the console or ant/maven?

Perhaps you need to set the file encoding in the system properties.

java -Dfile.encoding=<encoding>


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


Tarun K

unread,
Sep 3, 2010, 6:01:04 AM9/3/10
to testng-users
I have it launched in using Eclipse plug-in for TestNG

~ T

Tarun K

unread,
Sep 3, 2010, 6:22:39 AM9/3/10
to testng-users
Reply all
Reply to author
Forward
0 new messages