SpecFlow.DSL 0.0.4

There is a newer version of this package available.
See the version list below for details.
dotnet add package SpecFlow.DSL --version 0.0.4
NuGet\Install-Package SpecFlow.DSL -Version 0.0.4
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.DSL" Version="0.0.4" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SpecFlow.DSL --version 0.0.4
#r "nuget: SpecFlow.DSL, 0.0.4"
#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.DSL as a Cake Addin
#addin nuget:?package=SpecFlow.DSL&version=0.0.4

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

An enhancement to Specflow DSL to be able to use dynamic test data in specflow steps by bringing in variables, regular expressions and simple calculations.
**Examples**:

- Create dynamic test data and refer it in another step

When enter [[var=50]] //assign 50 to a variable named "var"

Then [[var]] equals 50 // now get variable "var" value

- Create dynamic test data using regular expression

When enter [[var=RegEx([0-9]{3})]] //assign var with 3 digit random number

Then [[var]] is a 3 digits number // now get variable "var" value

- Same applies to SpecFlow tables:
When create new user with the following details:
    |Field   | Value                                 |
    |UserName| [[name=RegEx([a-z]{5,8})]]            |        
|Password| [[pwd=RegEx([a-z]{3}[0-9]{3})]]       |
Then verify can login with username="[[name]]" and password="[[pwd]]"

- Support customerise transformation

    for example, you want to map Today to YYYY:MM:dd, add the following code in one of your Specflow steps
or put it in BeforeScenario step.
     ((IParameterTransform)
               (ScenarioContext.Current.GetBindingInstance(typeof(IParameterTransform))))
           .addTransformer(s => s.ToLower() == today ? DateTime.Now.ToString("yyyy/MM/dd") : s);

    Now in Specflow feature files, you can write:
When entered "[[timeVar=Today]]"  //timeVar will be assigned to yyyy/MM/dd, e.g 2017/12/04

- Calculations are currently NOT supported but can be supported by customerisation

Product Compatible and additional computed target framework versions.
.NET Framework net452 is compatible.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in 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.1.0 3,217 8/3/2023
3.0.2 137 7/28/2023
3.0.1 16,403 8/18/2021
3.0.0 397 8/16/2021
0.0.4 2,196 4/12/2017
0.0.3 1,057 4/11/2017