Closed omercanxx closed 3 months ago
@omercanxx how many threads can your machine run or core does it have compared to your CI/CD server? - how many parallel threads have you set in your config?
We had that with xunit on the pipeline as well. Similar issue that we have in our notes we found at a time is https://github.com/SpecFlowOSS/SpecFlow/issues/1399
in our case it seemed to happen when there was a number of tests > 100 we upgraded xunit to latest and that resolved the issue. We did switch to mstest after and did not see that issue with mstest. Hope it helps.
My tests were failing because I missed using await in an asynchronous method. Thanks for your help
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
SpecFlow Version
3.9.52
Which test runner are you using?
xUnit
Test Runner Version Number
2.4.3
.NET Implementation
.NET 6.0
Project Format of the SpecFlow project
Classic project format using
<PackageReference>
tags.feature.cs files are generated using
SpecFlow.Tools.MsBuild.Generation NuGet package
Test Execution Method
Visual Studio Test Explorer
SpecFlow Section in app.config or content of specflow.json
No response
Issue Description
Hello,
I've encountered an issue with SpecFlow tests that intermittently fail in our CI pipeline. This problem seems to be related to the ScenarioContext being disposed unexpectedly during test execution. Here are the details:
In our project, we have approximately 1500 tests running on a CI pipeline. While these tests pass consistently when run locally, they intermittently fail in the pipeline environment. Upon investigation, I noticed the following error message in the logs:
The previous ScenarioContext was already disposed
Steps to Reproduce
I dont know how can reproduce the steps. It works on my machine 😅
Link to Repro Project
No response