I am also working in BDD using specflow. I'm sharing my experience around BDD.
Test-driven development (TDD):
A technique to use automated unit tests because developer/QA cannot create the code without truly understanding what the desired result should be and how to test it.
The motto of test-driven development is "Red, Green, Refactor."
Red: Create a test and make it fail.
Green: Make the test pass by any means necessary.
Refactor: Change the code to remove duplication in your project and to improve the design while ensuring that all tests still pass.
Behaviour Driven Development (BDD)
1. Synthesis and refinement of practices stemming from TDD and object-oriented analysis
2. Its designed to provide software development and management teams with shared tools and a shared process to collaborate on software development.
3. It leverages a simple, domain-specific scripting language called Gherkin
BDD focuses on:
Where to start in the process
What to test and what not to test
How much to test in one go
What to call the tests
How to understand why a test fails
An example of BDD Scenario for Facebook login using Gherkin Language:
Scenario : User should able to login to Facebook
Given that a user having the username and password
And user having login page opened
When he enters the credentials
Then he should able to see the Facebook Home page
BDD keywords are Scenario, Given, And, When and Then etc.
BDD process involves :
1. Product Manager(PM)
When the PM gives the requirements, developer will write the unit test cases using Gherkin language as shown in example.
> For PM, It will be very easy, to understand whether his requirements are captured properly.
> For Developer, its easy to design the unit test cases
When the PM gives the requirements, QA person will write the test scenarios
> For PM, It will be very easy, to understand whether all scenario are tested properly and he can add if needed more scenario easily.
> For QA person, its easy to design and test the test scenarios
Please feel free to ask any further followup questions.