-
Notifications
You must be signed in to change notification settings - Fork 0
Advanced Project Setup
Editor note: We recommend reading this documentation entry at http://www.specflow.org/documentation/Advanced-Project-Setup. We use the GitHub wiki for authoring the documentation pages.
The SpecFlow tests are usually placed into one or more separate project in the solution: the "SpecFlow projects".
The Setup SpecFlow Projects page describes the recommended setup process. This page covers the advanced project setup options if you are unable to use the NuGet packages.
To set up a project manually (i.e. without NuGet packages), download the binary package that contains all the necessary files and copy all SpecFlow assemblies to your project's folder structure for better upgrade and tool support.
SpecFlow projects require TechTalk.SpecFlow.dll (or one of the platform-specific variants) in order to compile. Add a reference to the TechTalk.SpecFlow.dll (located in the bin\{platform} folder of the binary package) to your SpecFlow project.
The SpecFlow IDE integration tries to locate the generator component in your project structure in order to use the generator version matching the SpecFlow runtime in your project.
If you installed SpecFlow with the NuGet package or have retained the original structure of the binary package, the generator will be located (based on the reference for the TechTalk.SpecFlow.dll assembly) without requiring any configuration. Otherwise, you need to take into account the following rules used to locate the generator (in order of priority, highest priority first):
- The generator path configured in app.config (
<generator path="..\lib\SpecFlow"/>, see Configuration) - The same path as the generator assembly (
TechTalk.SpecFlow.Generator.dll) referenced from the SpecFlow project - The same path as the runtime (
TechTalk.SpecFlow.dll) - In the
toolsor..\toolsdirectories relative to the runtime - The generator obtained through NuGet (
..\..\tools, relative to the runtime)
If SpecFlow cannot find the generator or it is older than v1.6.0, the installed SpecFlow generator is used. If you use any custom plugins (e.g. unit test generator), they must be located in the same folder as the generator.
SpecFlow is also distributed as a binary package. This package contains the assemblies that should be placed to the project folder. The package contains the following:
TechTalk.SpecFlow.dllTechTalk.SpecFlow.Generator.dllTechTalk.SpecFlow.Parser.dllTechTalk.SpecFlow.Utils.dllGherkin.dll-
IKVM.*.dll(5 assemblies) -
specflow.exe(optional) -
TechTalk.SpecFlow.Reporting.dll(optional) -
TechTalk.SpecFlow.targets(optional) -
TechTalk.SpecFlow.tasks(optional)