grasshopper7 / extentreports-cucumber6-adapter

Cucumber-JVM 6 Adapter for Extent Framework
https://ghchirp.online/2098/
MIT License
16 stars 15 forks source link

Retried Tests end up with Duplicate tests in the Extent Report. #57

Closed SSINGHPR closed 10 months ago

SSINGHPR commented 10 months ago

Hi,

I am using [RetryAnalyzer] to re-run the failed TestNG tests by passing the listener in testng.xml

    <listeners>
        <listener class-name="xyz.abc.RetryListener"/>
    </listeners>

however in the extent report It ends up having both the failed scenarios. I saw the extentReports has the config to keep the last retried however it did not work. any idea where should I put this inorder to work ? extentReports.isKeepLastRetryOnly(); I also tried this below logic I found however it did not help either : https://stackoverflow.com/questions/51420504/retry-analyzer-and-extent-report https://stackoverflow.com/questions/67368492/how-to-remove-first-attempt-of-failed-test-cases-from-extent-report-when-using-r

Also saw long time ago this bug was reported with extent developers and seems like they did fix couple of years back however I am still not able to achieve only keeping the last retried test so that the count of total tests doesn't get messed up in the report with retry logic. Thanks so much in advance for taking time to look into this and would very much appreciate the help to resolve this.

For example : In the below screenshot the test "Verify Failed App Login] [1] was marked as skipped since it failed and then was reran by the RetryAnalyzer logic however in the extent report both of those shows as failed. How can I achieve to have only one failed test name after retry and do not account the skipped one in the report.

s