junit VS Apache testNG
https://www.tutorialspoint.com/testng/
https://www.ibm.com/developerworks/cn/java/j-testng/
testNG have four different examples to demonstrate four different cases of reporting and logging:
Custom Logging | This example illustrates how to write your own logger. create class to extends extends TestListenerAdapter |
Custom Reporter | This example illustrates how to write your own reporter. create class to implements IReporter |
HTML and XML report | This example illustrates the default HTML and XML report generated by TestNG. |
JUnit Reports | This example illustrates how to generate JUnit reports from TestNG reports. |