Quick Introduction to SpecFlow

SpecFlow is an open source Behavior-Driven Development (BDD) tool for .NET. SpecFlow uses the official Gherkin parser and supports the .NET framework, Xamarin and Mono. You can use SpecFlow to define, manage and automatically execute human-readable acceptance tests in .NET projects. Writing easily understandable tests is a cornerstone of the BDD paradigm and also helps build up a living documentation of your system. Anton Angelov has created a series of articles dedicated to Specflow that starts with an introduction tutorial.

SpecFlow integrates with Visual Studio, but can be also used from the command line (e.g. on a build server). SpecFlow supports popular testing frameworks: MSTest, NUnit (2 and 3), xUnit 2 and MbUnit. This introductory article of Anton Angelov provides a step by step process to use SpecFlow that goes from the tool installation to test execution. It starts by explaining how to install SpecFlow in Visual Studio.

SpecFlow Behavior-Driven Development (BDD) tool for .NET

Then the article explains how to create a scenario with an example. You will learn how to write the step definitions that bind the statements in the test scenario to the application code. You will also learn how create the page objects that will drive your tests and how to generate and manage the bindings. You will then be ready to execute your tests. The full code of this example is available for download.

Read the complete article on https://automatetheplanet.com/getting-started-specflow/

Related Content:

Be the first to comment

Leave a Reply

Your email address will not be published.


*