Run specific scenarios

Updated: 04 February 2023

SpecFlow converts tags in feature files to test case categories.

For xUnit

dotnet test --filter Category=done
dotnet test --filter "Category=us123 & Category=done"
dotnet test --filter "Category=done | Category=automated"
Feature: Breakfast

@done @important
Scenario: Eating cucumbers
  Given there are 12 cucumbers
  When I eat 5 cucumbers
  Then I should have 7 cucumbers

Scenario: Use all the sugar
  Given there is some sugar in the cup
  When I put all the sugar to my coffee
  Then the cup is empty

Behaviour Driven Development

Updated: 02 February 2023

Feature file

The purpose of a feature file is to document the expected behaviour of an application in a way that it is both human-readable and suitable for test automation. A feature file contains Scenarios, expressed in the Gherkin syntax i.e. Given / When / Then steps.

Given ~ Arrange
When ~ Act
Then ~ Assert