Skip to content

Repository files navigation

SpecFlow Shared Steps

Build statusNuGet version

Download

The latest version is available on Nuget

Configuration

Add or update the following section in your specflow.json:

 "stepAssemblies": [
{ "assembly": "SpecFlowSharedSteps" }
]

Usage

Assume you have some set of steps you wanna share between your specflow scenarios.

Now it's as easy as just one step:

Given I execute the steps of 'My Feature'.'Some Scenario'

or

Given I execute background steps of Some Feature
# for quote lovers:Given I execute background steps of 'Some Feature'

or even

Given I execute the steps of:
| feature | scenario || FeatureOne | SharedSteps1 || FeatureTwo | SharedSteps2 |

See more examples

Shared context

Parent Feature and Scenario Context is used by shared steps. Context values created by shared steps are available in parent scenario. Be careful with context key duplication.

About

SpecFlow step definitions to reuse scenario steps

Topics

Resources

Stars

6 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages