What are the different ways in which you can produce reports for TestNG results?
Question
What are the different ways in which you can produce reports for TestNG results?
Answer
There are two ways to produce a report with TestNG, they are:
Listeners: For a listener class to implement, the class has to implement the org.testng.TestListener interface. These classes are informed at runtime by TestNG when the test begins, finishes, skips, passes or fails. Reporters: For a reporting class to implement, the class has to implement an org.testng.Reporter interface. When the whole suite run ends, these classes are called. When called, the object consisting the information of the whole test run is delivered to this class.