BDD with Specflow, Gherkin and .Net Core 3.1
Jul 14, 2021
BDD increases and improves collaboration. It enables everyone involved in the project to easily engage with the product development cycle. And by using plain language, all are able to write behavior scenarios. High visibility.
Steps in Visual Studio 2019 to create a BDD test with specflow and gherkin
- New project -> NUnit Test Project
- Manage extensions -> Specflow for VS 2019
- Add the nuget packages — Specflow, Specflow.NUnit, Specflow.Tools.MSBuild.Generation, Specflow.Assist.Dynamic, Selenium.Webdriver, Selenium.Webdriver.Chromedriver
- Add new item -> Specflow feature file
- Write the gherkin code
6. Generate the step definiton
7. Write selenium code to access the screen elements and manipulate
8. Integrate selenium code in steps
Execute the test code!