allure-framework / allure-framework/allure-csharp
SpecFlow: Show skipped scenarios of a feature in case a BeforeFeature hook fails
- Dominant language
- C#
- Stars
- 125
- Forks
- 76
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 18
Description
#### I'm submitting a ...
- [ ] bug report
- [x] 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:
```csharp
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:
- Allure version: 2.23.1
- Test framework: SpecFlow@3.9.74
- Allure adaptor: Allure.SpecFlow@2.10.0
Contributor guide
Research direction
Start by reproducing the failure with the supplied BeforeFeature hook under SpecFlow 3.9.74 and Allure.SpecFlow 2.10.0, then trace how the SpecFlow adapter handles the failed hook and skipped scenarios. Done means every skipped scenario appears in the Allure report as a skipped test case rather than only a placeholder.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100