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

SpecFlow: Show skipped scenarios of a feature in case a BeforeFeature hook fails #430

Open
1 of 3 tasks
delatrie opened this issue Nov 14, 2023 · 0 comments
Open
1 of 3 tasks
Labels
task:improvement Change that improves some user experience but can't be considered a new feature theme:specflow

Comments

@delatrie
Copy link
Contributor

I'm submitting a ...

  • bug report
  • feature request
  • support request => Please do not submit support request here, see note at the top of this template.

What is the current behavior?

Currently no test is included in the report if a BeforeFeature hook has failed. Only a placeholder test is created to indicate the error.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem

Given the following hook:

using NUnit.Framework;
using TechTalk.SpecFlow;

[Binding]
public class FeatureHookBindings
{
    [BeforeFeature]
    public static void BeforeFeature(FeatureInfo featureInfo)
    {
        throw new Exception("Error in BeforeFeature");
    }
}

If we run the tests, all scenarios will be skipped, and no tests will be shown in the report (except the placeholder).

What is the expected behavior?

The skipped scenarios should be included in the report as skipped test cases.

Please tell us about your environment:

@delatrie delatrie added theme:specflow task:improvement Change that improves some user experience but can't be considered a new feature labels Nov 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
task:improvement Change that improves some user experience but can't be considered a new feature theme:specflow
Projects
None yet
Development

No branches or pull requests

1 participant