I have some SpecFlow features (using the Gherkin syntax) and I would like to temporarily disable the feature to prevent its tests from running?
Is there an attribute I can mark the feature with to do this? I'm guessing that something that works with Cucumber might also work with SpecFlow.
Ignored Tests Just like with normal unit tests, you can also ignore SpecFlow tests. To do so, tag the feature or scenario with the @ignore tag.
Use scenario outlines to group examples that share the same structure, and put common data in the scenario instead of the example tables. Use background sections to expose contextual information for examples that do not share the same structure.
@Nir Multiple scenarios can be added by just specifying a new Scenario: tag. Scenario outline is detailed in the SpecFlow docs on their site. Without really understanding what it is you want to parameterise, I can't offer a code sample.
All Gherkin files have the . feature file extension. They contain a single Feature definition for the system under test and are an executable test script.
You can mark the feature with the tag @ignore:
@ignore @web Scenario: Title should be matched When I perform a simple search on 'Domain' Then the book list should exactly contain book 'Domain Driven Design'
In the recent version of Specflow, you now also have to provide a reason with the tag, like so:
@ignore("reason for ignoring")
EDIT: For some reason it break with spaces but this works:
@ignore("reason")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With