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

Results are getting merged when trying to implement using Parallel Usage in TestNG with Selenium Grid + Page Factory model. #417

Closed KishanKrishna closed 8 years ago

KishanKrishna commented 8 years ago

Hi Anshoo ,

As discussed earlier, I am uploading my POC

I have been following Extent reporting model and trying to implement using Parallel Usage in TestNG with Selenium Grid + Page Factory model. I am able to get all results with single script execution for 2.40.2v of Extent reports but could facing issues when running in parallel.

Results for each thread instance are not getting segregated properly to each thread instead it gets results of other threads are getting mixed up.

I am using endTest after each Test method and flush at the end. But don't understand exactly how extent report object is segregating each thread results in the output .

Can you help me here? I am attaching my POC framework removing jars. Please add jars before you test them.

  1. Extent reporting jars(4 ) a) extentreports-java-2.40.2 b)freemarker-2.3.23 c)jsoup-1.8.3 d)sqlite-jdbc-3.8.11.
  2. IE driver
  3. Chrome driver
  4. Selenium Stand alone jar. KishanGridTestNG.zip

Sample results ResultPoc.zip

anshooarora commented 8 years ago

There are no jars in the package, not even pom.xml? Also, you need to follow a more dynamic approach like this example so all extent methods are abstracted out in one place, see BaseClass for example. ExtentTestManager class manages all threaded test instances, but make sure to create only 1 thread using this class per thread.

KishanKrishna commented 8 years ago

I dont use Maven build tool instead use only Testng.xml to run . Let me give a try .

KishanKrishna commented 8 years ago

Uploading all Jars. Except Selenium Stand alone jar.. This is 29.4MB. Cannot upload due to size constraint.

Jars1.zip Jars2.zip

pkum11 commented 8 years ago

Hi KK,

Do you still need help ? I was able to resolve this for myself

KishanKrishna commented 8 years ago

No . i am able to resolve this.Thanks for asking.

On Sep 29, 2016 21:41, "pkum11" notifications@github.com wrote:

Hi KK,

Do you still need help ? I was able to resolve this for myself

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/anshooarora/extentreports-java/issues/417#issuecomment-250513524, or mute the thread https://github.com/notifications/unsubscribe-auth/ARJjbBApyDd1vxOqU4FCH_vys_6PT2LLks5qu-MXgaJpZM4IFT-A .

sethisandeepsethi commented 8 years ago

Looks like it is resolved. so the issue should get closed.

BHARATSEHRA commented 7 years ago

@KishanKrishna / @pkum11

Facing same problem , could you please help me to resolve the issue.

Thanks In Anticipation

rahuln04 commented 7 years ago

How to handle the extent reports when the scripts are running parallel

pramodkumarcpc45610 commented 7 years ago

Hi Anshoo... i am using extent reports to generate html reports. it is working fine with single testfixture but when i am doing parallel execution.. i am unable to proceed with testing as screen shots are appending twice for each test.... using nunit and extent reports..... how to flush the reports at end of all testfixtures .. Please let me know is there any option to flush at the end of exectuion in case of parallel execution