Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Async feature background not awaited in beta version (NET 6) #2608

Closed
RadtkeJCJ opened this issue Jun 21, 2022 · 2 comments
Closed

Async feature background not awaited in beta version (NET 6) #2608

RadtkeJCJ opened this issue Jun 21, 2022 · 2 comments
Assignees
Labels

Comments

@RadtkeJCJ
Copy link

SpecFlow Version

3.10.2-beta

Which test runner are you using?

xUnit

Test Runner Version Number

2.4.3

.NET Implementation

.NET 5.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

Feature background given steps are not awaited - scenarios work correctly with the same step explicitly specified as a Given.

I see the generated .feature.cs file is creating lines for feature backgrounds which are missing an await:
this.FeatureBackgroundAsync();
The given steps look like this:
await testRunner.GivenAsync("<snip>", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given ");

Steps to Reproduce

  1. Create a scenario which depends on an async Given step
  2. Scenario should pass
  3. Move the async Given step to the feature background section
  4. Scenario will fail as execution does not await the Given step

Link to Repro Project

No response

@gasparnagy
Copy link
Contributor

Fixed by PR #2654, thx @laingsimon 💯!

@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants