Examples¶
SpecFlow Sample Projects¶
You can find a number of SpecFlow+ and SpecFlow sample projects on our GitHub page. These repositories contain the following sample projects, if you have any projects worth sharing, please consider adding them to the repositories.
If you are looking for .NET6 example projects and ready to use code snippets and plugins then check out the SpecFlow Actions page.
- Getting_Started: Simple calculator project based on the Getting Started guide with a single SpecFlow+ Runner test
- Selenium Grid WebTest: A sample project using Selenium Grid Web with SpecFlow+ Runner
- Selenium WebTest: A sample project using Selenium Web with SpecFlow+ Runner. This project also demonstrates how to include screenshots in your HTML report. Refer to the documentation for more details on embedding screenshots.
- Windows AppDriver: Using WindowsAppDriver with SpecFlow+ Runner
- Custom Deployment Steps: Sample project based on the WindowsAppDriver project demonstrating custom deployment steps
- Filter Example: Sample project using filters to only run a subset of tests
- Multiple Reports: Sample project using SpecFlow+ Runner to output multiple reports using custom templates
- Test Thread Isolation: Sample project showing the effects of different test thread isolation configurations for multi threaded testing
- AppVeyor_Support: Sample project showing how to use SpecFlow+Runner with AppVeyor
- Bookshop example : An end-to-end example project that explains how to use SpecFlow and the SpecFlow+ Runner in a simple web application project
- Additional Step Assembly : Sample project showcasing additional step assembly
- AsyncAwait: This example shows how to implement a step definition which calls the
HttpClient.GetAsync
method - A Selenium UI automation project: A UI automation sample project using Selenium with Page Object Model Pattern. A step-by-step guide for this repo is also available here.
- SampleMethodTagDecorator: Sample project showcasing Sample Method Tag Decorator
- External Data Sample: Sample project for the SpecFlow.ExternalData plugin
- Parallel Execution: Sample project showcasing parallel execution in NUnit,xUnit, and MsTest.
- Scenario Feature Context Injection: Same project showcasing Scenario Feature Context Injection
- Step Argument Transformation Example:This project demonstrates how you can create feature files in one language, but specify values using a different locale.
- Skip Scenario: xUnit skip scenario example
- Docker Example : Docker Example project
- Multiple Browsers against different Environments: This is a example how to use SpecFlow and SpecFlow+Runner to run Selenium Web Tests for different Browsers and different environments.
- External Data Plugin Example: Sample project to showcase the use of SpecFlow External Data Plugin
SpecFlow's official YouTube channel that includes a vast number of tutorials, webinar recordings and example projects | Collection of projects that are used on our Twitch streams can be found here |
Given-When-Then Challenge Sample Projects¶
- Given-When-Then With Style series : A series of weekly blog articles, aimed at helping you get the most out of Given-When-Then feature files
- Challenge 1-2 : Repo for the first two challenges
Community Sample Projects¶
- Tawfik Nouri: BDD/TDD With SpecFlow & .NET Core
Do you know any further SpecFlow examples you would recommend? Please let us know on LinkedIn, tweet us @specflow or just send us a pull request on GitHub.