Closed gasparnagy closed 1 year ago
@SabotageAndi Maybe we should not allow async void
step definitions at all in SpecFlow v4?
Good idea! Let's do it!
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
4.0 beta
Which test runner are you using?
xUnit
Test Runner Version Number
2.4.2
.NET Implementation
.NET 6.0
Project Format of the SpecFlow project
Sdk-style project format
.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
n/a
Issue Description
When an expection (e.g. assertion) is thrown from an
async void
step definition, the exception is caught by SpecFlow and the test shows an incorrect "pass" state.Steps to Reproduce
Link to Repro Project
https://github.com/gasparnagy/issue-repro-specflow-2600