concept SpecFlow in category BDD

appears as: SpecFlow
BDD in Action Second Edition MEAP V04

This is an excerpt from Manning's book BDD in Action Second Edition MEAP V04.

This format is designed to be both easily understandable for business stakeholders and easy to automate using dedicated BDD tools such as Cucumber and SpecFlow. This way, it both documents your requirements and runs your automated tests.

BDD in Action: Behavior-Driven Development for the whole software lifecycle

This is an excerpt from Manning's book BDD in Action: Behavior-Driven Development for the whole software lifecycle.

There are many specialized BDD tools that you can use to automate your acceptance criteria. Popular choices include tools like JBehave, Cucumber, SpecFlow, and Behat. While not indispensable, these tools make it easier to express the automated tests in a structured form similar to the “Given ... When ... Then” expressions used in the previous section. This makes it easier for product owners and testers to understand and identify the automated acceptance criteria, which in turn can help increase their confidence in the automated tests and in the automated acceptance-testing approach in general.

6.7. Automating scenarios in .NET with SpecFlow

If you’re in a .NET environment, your best option for BDD is SpecFlow (http://specflow.org). SpecFlow is an open source Visual Studio extension that provides support for Gherkin scenarios in the .NET and Windows development ecosystem. The rest of this section will assume that you’re reasonably familiar with the Visual Studio development environment.

6.7.1. Setting up SpecFlow

SpecFlow is a Visual Studio extension, so you can install it directly from the Visual Studio Gallery (see figure 6.9). Once it’s installed, you’ll need to create a new Unit Test project in Visual Studio and add the SpecFlow package to your project using NuGet (the .NET package manager found at http://www.nuget.org/).

Figure 6.9. You can install SpecFlow in the Visual Studio Gallery.

SpecFlow works with several .NET unit testing frameworks, including NUnit, xUnit, and a more specialized commercial tool called SpecRun. In this example, we’ll be using NUnit.

You can install SpecFlow with NUnit through the Manage NuGet Packages screen or directly from the NuGet Package Management Console using the following command:

sitemap

Unable to load book!

The book could not be loaded.

(try again in a couple of minutes)

manning.com homepage
test yourself with a liveTest