Generating reports for tests

Hi All,

I’ve just got to a stage in automating my application that I would like to start generating reports on the tests I have run.

Where should I start? Looking for something simple but expandable to start with.



@Venkatesh I’ve come across extent reporter before but haven’t found an updated guide on how to implement it.


@Venkatesh I’ve added those and got rid of the errors. Do I have to call each method in the Main class after each test or is there a way I can call it at the end of ALL my tests?

You don’t need to call this in main , implement and add it in your unit test as mentioned in testing examples on the same link.

TestNG Examples
Using ExtentTestNGReportBuilder

public class ExtentTestNGReportBuilder {

private static ExtentReports extent;
private static ThreadLocal parentTest = new ThreadLocal();
private static ThreadLocal test = new ThreadLocal();

public void beforeSuite() {
	extent = ExtentManager.createInstance("extent.html");
	ExtentHtmlReporter htmlReporter = new ExtentHtmlReporter("extent.html");

@Venkatesh Is there any documentation to explain the code? Atm that always marks the test as a fail. How do I get it to mark it a pass or fail dependant on the test result. I can always make it pass or fail.