Reputation: 955
I need to generate a testng extent report (version 3)
. I saw that there are two ways to generate an extent report.
Here, I am explaining two cases without using the code.
Case 1:
Creating a class implementing "IReporter" listener and this class is defined in the testng.xml file.
Case 2:
Creating a java class (ExtentTestManager.java) and defined relavent methods, used "com.relevantcodes.extentreports.ExtentTest" and "com.relevantcodes.extentreports.ExtentReports" packages for implementation the logics.
Then, creating a class (TestListener) implementing "ITestListener" listener and extending BaseTest Class.
To override methods, this class is used the methods in ExtentTestManager.java class. Finally, this new class is defined testng.xml file.
Here, I want to know which implementation is appropriate to generate an extent report and reasons, please.
In case 2, why should be "TestListener" class extended the "TestBase" class as well?.
Upvotes: 0
Views: 3338
Reputation: 955
I found the answer for this question. Please refer this article.
Upvotes: 1