SpecFlow icon indicating copy to clipboard operation
SpecFlow copied to clipboard

The previous ScenarioContext was already disposed

Open omercanxx opened this issue 1 year ago • 0 comments

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

omercanxx avatar May 29 '24 21:05 omercanxx