System.InvalidOperationException : Collection was modified; enumeration operation may not execute. #103
Comments
Version? |
I am currently using 3.0.2. I see that there is a newer version out, so will try that |
Yes, version 3.1 launched yesterday. Please check. |
Are you able to reproduce this? If not, can this be closed? |
Closing this for now. Please reopen or create a new issue if you encounter this again. |
Currently the latest C# ExtentReports 3.1.3 with NUnit 3.10.1
Please, provide at least some temporary workaround. |
I am running v3.1.3 and I ran into this issue when running in parallel. I am attempting to use locks to prevent this from happening, but I would prefer not too.
|
Not sure if to create a new issue or attach a comment to #75. When using ExtentReports with xunit and tests executed in parallel, I'm sometimes receiving the following stack trace and exception:
Result StackTrace:
at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
at System.Collections.Generic.List
1.ForEach(Action
1 action)at AventStack.ExtentReports.Model.Test.UpdateTestStatusRecursive(Test test)
at AventStack.ExtentReports.Model.Test.End()
at AventStack.ExtentReports.Model.Test.<>c.b__73_0(Test x)
at System.Collections.Generic.List
1.ForEach(Action
1 action)at AventStack.ExtentReports.Model.Test.EndChildTestsRecursive(Test test)
at AventStack.ExtentReports.Model.Test.End()
at AventStack.ExtentReports.Model.Report.EndTest(Test test)
at AventStack.ExtentReports.Model.Report.b__19_0(Test test)
at System.Collections.Generic.List
1.ForEach(Action
1 action)at AventStack.ExtentReports.Model.Report.CollectRunInfo()
at AventStack.ExtentReports.Model.Report.AddLog(Test test, Log log)
at AventStack.ExtentReports.ExtentTest.AddLog(Log evt)
at AventStack.ExtentReports.ExtentTest.Log(Status status, String details, MediaEntityModelProvider provider)
at AventStack.ExtentReports.ExtentTest.Pass(String details, MediaEntityModelProvider provider)
I'm not sure if this is any help, but I'm using ExtentReports with a gherkin structure as I'm using it with Specflow and xUnit. The creation of the step node and the passing/failing of said node is done within the AfterStep callback.
The text was updated successfully, but these errors were encountered: