Hey Suraj, TestNG offers two ways to produce a report for testing results:
- Listeners implement the interface org.testng.ITestListener and are notified in real time of when a test starts, passes, fails, etc.
- Reporters implement the interface org.testng.IReporterand are notified when all the suites have been run by TestNG. The IReporter instance receives a list of objects that describe the entire test run.