-
Notifications
You must be signed in to change notification settings - Fork 0
Setup SpecFlow Projects
Editor note: We recommend reading this documentation entry at http://www.specflow.org/documentation/Setup-SpecFlow-Projects. 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 quick introduction guide on our website provides a basic introduction to SpecFlow. This page contains a detailed description of the possibilities.
This list describes the recommended setup options. For alternatives check the Advanced Project Setup page.
Since SpecFlow can use different unit testing frameworks to execute the SpecFlow tests, the SpecFlow projects have to be either Test Projects (in case of MsTest) or a simple Class Libraries. Just like for unit tests, it makes sense to keep a consistent naming convention for these projects (usual project name postfixes are Specs or AcceptanceTests).
SpecFlow projects need the TechTalk.SpecFlow.dll in order to compile. You can setup this by installing our NuGet package: [[SpecFlow|http://www.nuget.org/packages/SpecFlow]] or one of the specific helper packages, like [[SpecFlow.NUnit|http://www.nuget.org/packages/SpecFlow.NUnit]] or [[SpecRun.SpecFlow|http://www.nuget.org/packages/SpecRun.SpecFlow]]. The helper packages group all necessary dependencies and apply the necessary configuration.
PM> Install-Package SpecFlow -ProjectName MyApp.Specs
If you have used one of the helper NuGet packages you don't need to configure anything. If you have used the SpecFlow package or want to fine tune SpecFlow, you need to change the settings in the App.config file. See Configuration page for details.
Your project is ready to use SpecFlow. You can add the first feature files (with Add / New Item in Visual Studio for example) and implement your applications in Specification by Example (Behavior Driven Development (BDD), Acceptance Test Driven Development (ATDD)) style.