SpecFlow
SpecFlow copied to clipboard
Extent Reporting Framework & Parallel Execution With SpecFlow - Report Scenarios Getting Logged Under The Last Executed Thread
Hi Team,
I am in the process of enabling Parallel Execution for One of My Project; however ended up in a situation where I am able to execute test cases parallelly but the ExtentReport is generating wearied report - all the Test Steps are logged under the last scenario that got executed; where as i have executed 3 separate feature files.
Solution that i am working on along with sample report attached. Tired to workout on couple of solution suggested in google with no luck . Can somebody give me direction on this.
Hi Team, I know support is quite busy; however, any direction that you can guide me with this issue.
Guys.. any recommendations.
I have also seen this behavior in parallel execution, but kind of living with it :( Would be nice if it gets fixed.
Team,
Any recommendations.
I've changed the title of this issue to reflect that you are having issues with Extent Reporting Framework (which is my understanding of the issue). Maybe that will attract more responses from others who have experience with Extent.
Thanks Stephen....
I was able to sort the issue out to a certain extend... @SavitaMaurya - Try following the link https://stackoverflow.com/questions/54191960/extent-report-for-parallel-testing-xunit-and-specflow
"[ThreadStatic] private static ExtentTest scenario;"
Should do the trick for you as well.. may be with some cosmetic changes witin your hooks/listener class.
@ramgkn [ThreadStatic]
worked for me but now my steps are written to random scenarios in the report. Did you ever get this working correctly?
At the end worked for me, it can be due to the context variables have not kept thread static.
Please check that , if still issue will give u a snippet for nunit
On Thu, 16 Jul, 2020, 19:38 ChrisWoodMHM, [email protected] wrote:
@ramgkn https://github.com/ramgkn [ThreadStatic] worked for me but now my steps are written to random scenarios in the report. Did you ever get this working correctly?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/SpecFlowOSS/SpecFlow/issues/1768#issuecomment-659436875, or unsubscribe https://github.com/notifications/unsubscribe-auth/AH4F22XLGCLHNN7X2A44JFLR34CWJANCNFSM4JI7LYSQ .
Thanks Stephen....
I was able to sort the issue out to a certain extend... @SavitaMaurya - Try following the link https://stackoverflow.com/questions/54191960/extent-report-for-parallel-testing-xunit-and-specflow
"[ThreadStatic] private static ExtentTest scenario;"
Should do the trick for you as well.. may be with some cosmetic changes witin your hooks/listener class.
Thanks, I had the same issue and adding the [ThreadStaticAttribute] in the static ExtentTest, now the report works :)
@ramgkn , I facing the same, but I in advanced stage, report is not generating for me. would you please share me the extent test part of the code, just wanted to understand how fearturecontext, scenario context are configured