
Explore behavior driven development in C# using SpecFlow, the .NET implementation of Cucumber, to design and automate testing of a REST API through hands-on tutorials.
Explore behavior driven development and its collaboration among stakeholders, developers, testers, and the cucumber family, contrast with TDD and ATDD, and learn how scenarios and non-technical language guide automated tests.
Specflow, a cucumber-family behavior driven development tool, enables human readable acceptance tests. It integrates with Visual Studio and can run from command line or test engines, supporting continuous integration.
Install the Visual Studio SpecFlow extension via Tools and Updates, add SpecFlow to your project, and verify the latest stable version in the package browser.
Examine a real feature file in Visual Studio, detailing feature, scenarios, and steps with given, when, then, and end keywords, and the role of parameters in test automation.
Introduction to a rest api built with behavior driven development and spec flow in C#. Explore a five-project, in-memory user management api with create, read, update, and delete operations.
Create the first feature file for a rest api using SpecFlow, detailing get user by ID with scenarios for existing and non-existent users and preparing 200 and 404 checks.
Implement the first feature in SpecFlow by creating given/when/then step definitions, wiring an in-memory user repository, and returning 200 ok or 404 not found from the user controller.
Learn to create a new update user feature in SpecFlow for a REST API, using parameters, tables, and scenario outlines to validate valid updates, not found, and bad requests.
Implement the update user feature using new SpecFlow functionality, refactoring to use scenario context for sharing data, handling table parameters, and validating success and error responses.
Learn how to restrict specflow binding scope by feature, scenario, or tag and utilize hooks to run setup and teardown logic before and after tests, features, scenarios, and steps.
Write and implement a spec flow feature file for deleting a user by id, gaining hands-on experience with spec flow and REST API testing.
In this course you will learn about Behaviour Driven Development in C# and how this can be done using Specflow, which is the .Net implementation of Cucumber.
We will be going Specflow's core features in detail including:
The course starts off with both video tutorials explaining the Behaviour Driven Development process and an introduction to SpecFlow,followed by practical coding sessions where we will be developing a REST API together using SpecFlow and BDD to make sure that we are able to apply what we have learnt.
I'm also available to answer any queries you may have regarding any course material which you didn't understand or would like further detail on.