anshooarora / extentreports-java

Community version of Extent API for Java has moved to https://github.com/extent-framework/
http://extentreports.com
Other
528 stars 318 forks source link

Extent Report 3.1.2 Customized Summary report #1101

Open raghunnandan opened 6 years ago

raghunnandan commented 6 years ago

Summary

I am using extent report 3.1.2 to generate Automation test summary report in Cucumber framework . I am stuck up in implement couple of customized requests from Client .

Client Request : Hierarchy would be Suite ( Left Side of the page in the report)--> Parent (Right side of the page in the report )--> Child ( under Parent )--> Grand Child (Under Child)

Current Behavior

I am able to create Execution results in report in below manner. Test name (Parent )--> Child (validation points)--> Grand Child (Steps under validation points)

Please let me know can we Implement in extent report ? . I tried few things but facing issue . Please help me know on this.

reportpblm

Thanks in Advance. Raghunandan N

foursyth commented 6 years ago

See here: https://github.com/email2vimalraj/CucumberExtentReporter/blob/master/src/main/java/com/vimalselvam/cucumber/listener/ExtentCucumberFormatter.java

You can modify this implementation to add the suiteTestThreadLocal as well:

public void feature(Feature feature) {
    featureTestThreadLocal.set(getExtentReport().createTest(com.aventstack.extentreports.gherkin.model.Feature.class, feature.getName()));
    ExtentTest test = featureTestThreadLocal.get();

    for (Tag tag : feature.getTags()) {
        test.assignCategory(tag.getName());
    }
}