anshooarora / extentreports-csharp

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

Multiple screenshots in single entry when running in parallel #123

Open Roni-GitHub opened 6 years ago

Roni-GitHub commented 6 years ago

HI,

I'm running several tests in parallel and writing to the same report instance (singleton). Each test gets new instance of ExtentTest. I'm using the Flush command only once for each test end.

The problem is that the Flush command is writing to the report multiple same screenshot in single entry as the number of ExtentTests running and using MediaEntityBuilder.CreateScreenCaptureFromPath(fullPath).Build().

I had the same problem when i ran my tests asynchronous but the following workaround fixed it: https://github.com/anshooarora/extentreports-csharp/issues/58

Appriciate for help.

Thanks.