SpecFlow.NCrunch 3.9.74

dotnet add package SpecFlow.NCrunch --version 3.9.74
NuGet\Install-Package SpecFlow.NCrunch -Version 3.9.74
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SpecFlow.NCrunch" Version="3.9.74" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SpecFlow.NCrunch --version 3.9.74
#r "nuget: SpecFlow.NCrunch, 3.9.74"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install SpecFlow.NCrunch as a Cake Addin
#addin nuget:?package=SpecFlow.NCrunch&version=3.9.74

// Install SpecFlow.NCrunch as a Cake Tool
#tool nuget:?package=SpecFlow.NCrunch&version=3.9.74

SpecFlow.NCrunch

Plugin for Specflow which allows generation of NCrunch attributes on the unit tests based on tags on the scenarios

NCrunch has a great model for controlling how your tests get run in parallel by the engine. When using Specflow, then specflow engine generates the tests meaning that its hard to take advantage of these attributes as adding them to the generated code isn't simple.

This plugin for specflow allows tags in the feature files to control the generation of the NCrunch attributes in the code. The tags come in 2 basic styles, those that require no parameters, and those that require parameters. For those that don't need parameters then simply using a tag with the same name as the attribute will cause the attribute to be generated:

@Isolated
Scenario: Adding a simple attribute
Given something

will result in this code being generated (assuming Specflow is configured to generate NUnit tests):

[NUnit.Framework.TestAttribute()]
[NUnit.Framework.DescriptionAttribute("Adding a simple attribute")]
[NCrunch.Framework.IsolatedAttribute()]
public virtual void AddingASimpleAttribute()

If the attribute takes a parameter or multiple parameters then the attribute should be followed by a colon and then a comma separated list of values. So this:

@Timeout:1000
@ExclusivelyUses:Database,FileSystem
Scenario: Adding attributes with parameters
Given something

will result in this code being generated (assuming Specflow is configured to generate NUnit tests):

[NUnit.Framework.TestAttribute()]
[NUnit.Framework.DescriptionAttribute("Adding attributes with parameters")]
[NCrunch.Framework.TimeoutAttribute(1000)]
[NCrunch.Framework.ExclusivelyUsesAttribute("Database", "FileSystem")]
public virtual void AddingAttributesWithParameters()

This allows tags to be used to control how tests are run in parallel with each other when NCrunch is used as the running engine.

Currently only tags on scenarios are supported, tags on features don't work.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
3.9.74 1,344 11/1/2023
3.9.22 4,103 2/1/2022
1.0.0 9,729 7/20/2016