Closed scottdtb closed 7 years ago
That is because you are creating new instance of ExtentReports before every test. You just need 1 unique instance of it for the entire session.
See here for an example: https://github.com/saikrishna321/AppiumTestDistribution/blob/master/src/main/java/com/report/factory/ExtentManager.java
Hi @anshooarora thanks for the quick reply.
Very useful response however the best method which works best for my code is appending the report before each test. Your guidance lead me to this so thanks.
Keep up the good work!
Hello,
I am using TestNG, Extent V3.0.6 with selenium and java.
My issue is that when I am running a suite of individual tests, the report only outputs the final test within that suite.
Here is one of my most basic and shortest test... NOTE: I am printing my logs to the console only for the short term until I get this working consistently.
public class FifthTest{ // Change at start of every new test ExtentHtmlReporter htmlReporter; ExtentReports extent; ExtentTest logger; WebDriver driver;
}
This is my testNG suite that I run which runs each of my tests one after the other.