Hey there! any question in your mind? Ask It Now!.

Popular Categories

BDD-Behavior Driven Development

+1 vote
asked in Programming by nitin (810 points)
What is BDD (Behaviour Driven Development) and how it is related to test-driven development (TDD)?
And what is the role of a QA/QC person,developer,product manager and how they are involved in this process?

1 Answer

+1 vote
answered by dharmendra singh (220 points)
Hello Nitin,
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)
2. Developer
3. QA

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.

Related Questions

0 votes
1 answer 247 views
0 votes
1 answer 405 views
0 votes
1 answer 379 views
+1 vote
1 answer 264 views
+1 vote
1 answer 160 views
+1 vote
1 answer 80 views
+1 vote
1 answer 63 views
asked in Programming by Brinz
+1 vote
1 answer 53 views
+2 votes
1 answer 558 views

Not a Member yet?

Ask to Folks Login

My Account
620 Folks are online
85 members and 535 guest online
Your feedback is highly appreciated