Search code examples
cucumberspecflowgherkin

How do I disable a feature in specflow (Gherkin) without deleting the feature?


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.


Solution

  • 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'