Building Junit based custom testng xml based reports

167 views
Skip to first unread message

Shreejit Nair

unread,
Jul 13, 2016, 11:17:25 AM7/13/16
to testng-users
Hi,
Please let me know if there is a way to generate custom testng xml based reports that are compatible within Jenkins pipelines.
I am looking to build something that extends JunitXmlFormatter but importantly it should be parsed successfully by Jenkins.
The default junit xml report generated by TestNG is not  very informative at the moment and we would like to override it.
Please let me know if there are samples I could consume that also work in CI pipelines and are parsed correctly.

Shreejit

⇜Krishnan Mahadevan⇝

unread,
Jul 13, 2016, 11:08:41 PM7/13/16
to testng...@googlegroups.com
Shreejit,
There are a lot of things that are not clear. When you say the current JUnit report generated by TestNG is not very informative, I was wondering what you would be hinting at ?

The whole point behind TestNG providing you the luxury of building your own reporting mechanism was to circumvent this part and build what you feel is informative and according to your needs.

This SO thread http://stackoverflow.com/questions/11530955/about-jenkins-junit-xml-format seems to talk about the Xml spec of JUnit reports. Maybe you can refer to it and then build upon it.

PS : I haven't worked on any of these so I wouldn't have samples to share. But if you can add more context, I could try taking a jab at this and see if I can build something.



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.
Visit this group at https://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.

Shreejit Nair

unread,
Jul 14, 2016, 2:44:55 AM7/14/16
to testng-users
Hi Krishnan,

Essentially I want to create custom xml reports that are more informative(i am looking for sample xml formats that are readily available for reporting) so I was looking for some samples for the same.
My test framework is hosted as a webservice that sends back an xml based report.
So, I am looking for pointers to build my own custom xml report. The idea of junit formatting is essentially to ensure a CI system like Jenkins can parse and display it successfully.
Reply all
Reply to author
Forward
0 new messages