Here, we will try to understand BDD, which means Behavior Driven Development, using Cucumber in Visual Studio. We already know about TDD, the Test Driven Development, where we create unit tests and validate our code with test cases so that we can confirm that the functionality is working properly.
What is Cucumber ?
Basically, Cucumber is used for writing BDD test cases, and for writing this test cases, Gherkins is the language. This is not a programming language but a plain English statement language that is used with some keywords.
One can get more information by visiting https://cucumber.io/
Please see the below example.
Scenario
Add two given numbers. I have entered 10 into the calculator and I have entered 10 again into the calculator. When I press Add, the result should be 20 on the screen.
We can integrate any programming language with Cucumber.

In this sample, I am trying to implement the Cucumber with .NET technologies. The development environment used is Visual Studio 2015.
One can use any other programming language, like Java, JavaScript, PHP, or Ruby.
Integration with Visual Studio
In this article, I am using Visual Studio for integration of Cucumber. Please open Visual Studio.
Go to Tools >> Extensions and updates. Select Online option from left tabs and search for SpecFlow.











Raj KumarPosted Oct 25, 2018, 12:22 AM
Interested to know, how a scenario / scenario outline can be added as a test case in TFS.
Aleem VSPosted Jul 17, 2018, 3:08 AM
How to run multiple .feature or @Tags in c#