extent-framework / extentreports-testng-adapter

TestNG Adapter for Extent Framework
http://extentreports.com/docs/versions/4/java/testng.html
Apache License 2.0
50 stars 14 forks source link

Extent Report is incorrect if ITestListener is used #3

Closed ghost closed 4 years ago

ghost commented 5 years ago

Hi Anshoo,

Report shows only one test case with exceptions, please find attached the screenshot for more details.

eclipse_output extentrpt1 extentrpt2

Thanks Sen

anshooarora commented 5 years ago

Can you share an example for me to repro?

ghost commented 5 years ago

TestNGAdapter (2).zip

Please find attached the example.

ghost commented 5 years ago

Hi Anshoo,

Wish u happy New Year!!!..

Did you get a chance to look at the file that is attached in the previous post?

Thanks Sen

anshooarora commented 5 years ago

Happy new year!

I will check this tomorrow, thank you for your patience.

anshooarora commented 5 years ago

Please check with 1.0.3, it was fixed earlier. The code in your repo is from an older commit.

ghost commented 5 years ago

I have checked with 1.0.3 version still the report is incorrect with both the ITestListenerAdapter class and ITestListenerClassAdapter. We can check by running the Class1Tests.java in com.aventstack.extentreports.adapter.testlistener

Please find the screenshot below 2 1

anshooarora commented 5 years ago

Still unable to reproduce, here is what I am seeing:

ExtentHtml.zip

ghost commented 5 years ago

Did you skip the beforesuite? if its skipped at beforesuite then we see the report incorrect. Could you please share me the sample code that you verified.

I have downloaded the source and ran the class1Tests.java under the package com.aventstack.extentreports.adapter.testlistener as TestNG and still the report comes incorrect. I dont know if i miss something. could you please help me.

Attached is the source which I have downloaded and executed.

extentreports-testng-adapter-master.zip

Additional note:

Method getTest(ITestResult result) in the ExtentTestManager class always returns the variable "t" with "passClass1" which cause the report incorrect. If we check the "result" it contains correct test method name.

image

image

Thank you Sen

ghost commented 5 years ago

Hi Anshoo,

Did you get a chance to look into my comments?

Thanks Sen

anshooarora commented 5 years ago

I will look into this today..

ghost commented 5 years ago

Hi Anshoo,

Able to reproduce this issue?, if we skip the before suite we do see this incorrect report.

Thanks Sen

anshooarora commented 5 years ago

I am really not sure what is happening. I run your class in your project and I get these errors. Running them directly in mine creates the correct report.

anshooarora commented 5 years ago

What timezone are you in? We can do a quick Webex. See the report that was just created.

ExtentHtml.zip

ghost commented 5 years ago

Thanks for the quick update...

I am in IST zone, let me know your convenient time so that we can do webex.

Did you skip the beforsuite? report comes incorrect only when we skip the before suite.

Thanks Sen

anshooarora commented 5 years ago

Yes, this is after skipping the beforesuite.

ghost commented 5 years ago

Still no luck for me.. let me know your convenient time to do webex... Pls share the webex link

ghost commented 5 years ago

Did you get a chance to find why these error is coming?.. Is anything I am missing?/to update any jars or code difference?

Please let me know.

Thanks Senthil Raj R

ghost commented 5 years ago

I just downloaded the source and import it in to eclipse, I didn't do any changes.

Could you please help me to resolve this?

Thanks Sen