SpecFlow icon indicating copy to clipboard operation
SpecFlow copied to clipboard

Last [AfterFeature] method not runnin

Open lalberto8085 opened this issue 4 years ago • 1 comments

SpecFlow Version

3.9.22

Which test runner are you using?

MSTest

Test Runner Version Number

2.2.5

.NET Implementation

equal or greater .NET Framework 4.6.1

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

No response

Issue Description

I have several features on my tests and have before and after hooks for scenarios and features. The hooks work as intended until the last feature finishes running and won't execute the AfterFeature hook.

this is an issue since I'm doing cleanup in the AfterFeature.

Steps to Reproduce

  1. Create more than one feature
  2. Make [AfterFeature] hooks
  3. Execute all tests using the VS Test Runner

Link to Repro Project

No response

lalberto8085 avatar Nov 08 '21 22:11 lalberto8085

Could you please create a project where we can reproduce this issue?

SabotageAndi avatar Nov 12 '21 08:11 SabotageAndi