Bindings for SpecFlow can be written also in F#. Doing so you can take the advantages of the F# language for writing step definitions: you can define regex-named F# functions for your steps. Simply put the regex between double backticks.
let [<Given>] ``I have entered (.*) into the calculator``(number:int) = Calculator.Push(number)
Note: You need to create a C# or VB project for hosting the feature files and configure your F# project(s) as external binding assemblies:
<specFlow> <stepAssemblies> <stepAssembly assembly="MyFSharpBindings" /> </stepAssemblies> </specFlow>
SpecFlow provides item templates for creating new F# step definitions or hooks in Visual Studio.
Note: The navigation and the binding analysis features of the SpecFlow editor provide only limited support for F# projects.
An example can be found at https://github.com/techtalk/SpecFlow-Examples/tree/master/BowlingKata/BowlingKata-Fsharp