SpecFlowOSS / SpecFlow

#1 .NET BDD Framework. SpecFlow automates your testing & works with your existing code. Find Bugs before they happen. Behavior Driven Development helps developers, testers, and business representatives to get a better understanding of their collaboration
https://www.specflow.org/
Other
2.23k stars 752 forks source link

Support for Verify #2602

Closed SabotageAndi closed 1 year ago

SabotageAndi commented 2 years ago

Types of changes

Checklist:

SabotageAndi commented 2 years ago

@bayn Verify is working with this, but the naming of the files isn't right yet.

I think with https://github.com/VerifyTests/Verify/blob/main/docs/naming.md#derivepathinfo we could adjust the generation that it takes Feature title/Scenario title automatically.

Perhaps you can have a look at this?

baynezy commented 2 years ago

Thanks @SabotageAndi - I'll take a look later this week. I really appreciate your help.

SimonCropp commented 2 years ago

shouldnt specflow default to duplicating all attributes from *StepDefinitions over to *.feature.cs ?

SimonCropp commented 2 years ago

@SabotageAndi as a workaround. you can add a partial with the marker attribute to your project

namespace Example.Spec.Features;

[UsesVerify]
public partial class HtmlGenerationFeature
{
}

note you will need one per definition and the namespace and name have to match

SabotageAndi commented 2 years ago

shouldnt specflow default to duplicating all attributes from *StepDefinitions over to *.feature.cs ?

No, it doesn't. The Step definitions are executed at runtime. Some Gherkin tags (@some_tag) are translated to attributes, but not all.

kaylumah commented 1 year ago

@SabotageAndi this looks very promesing, any plans on officially releasing this plugin?