extent-framework / extentreports-java

Extent Reporting Library, Java
http://extentreports.com
Apache License 2.0
226 stars 127 forks source link

Update test status after failed test node passes in rerun #67

Closed Saurabhrck closed 5 years ago

Saurabhrck commented 5 years ago

Hi,

Today I have migrated our extent report framework from version 2 to version 4. Our framework is a testng based framework with selenium and cucumber. we use various testng listener to initialize and flush report in extent report.

On a test failure, we retry the test up to n number of times and publish the final result in CI-CD tool. The problem here is once the failed test/scenario(which is a node of a test) rerun and passes, in the extent report html the status of the parent test is still shown as fail. even though we have removed the failed child node from extent report by:

ExtentTest test = extent.createTest("Test"); ExtentTest node = test.createNode("Node") if node fail{ extent.removeTest(node); }

Also if anyone can suggest me how to initialize ExtentReport without overwriting existing HTML file? As we run multiple testNG suite at once if would be a nice option to have it flush in a single html file.

anshooarora commented 5 years ago

Please check with:

<dependency>
    <groupId>com.aventstack</groupId>
    <artifactId>extentreports</artifactId>
    <version>4.0.10-SNAPSHOT</version>
</dependency>

link

Saurabhrck commented 5 years ago

Hi @anshooarora ,

Thanks for the build. unfortunately I am only allowed to download dependency from https://repo.maven.apache.org/maven2/com/aventstack/extentreports/ . I guess I will have to wait till you push this fix to release.

Thanks again.

foursyth commented 5 years ago

Hmm, enabling snapshots should work and the link Anshoo shared is what central pulls from, so I don't see any issues

virenv commented 5 years ago

The core issue in this bug has been fixed. Closing the bug.