Skip to content
Related Articles

Related Articles

Save Article
Improve Article
Save Article
Like Article

Difference between BDD vs TDD in Software Engineering

  • Last Updated : 30 Jun, 2021

1. Behavior Driven Development (BDD) :
Behavior Driven Development (BDD) is a development technique which focuses more on a software application’s behavior. Mainly it creates an executable specification that fails because the respective feature doesn’t exist, then writing the simplest code that can make the specification pass and as a result we get the required behavior implemented in the system. Actually it is a development practice where the developers are involved in it.

Process of BDD :

Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.

 

  1. Write the behavior of the application
  2. Write the automated scripts
  3. Then Implement the functional code
  4. Check if the behavior is successful and if not success then fix it
  5. Organize the code (Optional)
  6. Repeat the steps for another behavior

2.Test Driven Development (TDD) :
Test Driven Development (TDD) is a development technique which focuses more on the implementation of a feature of a software application/product.  Mainly it refers to write a test case that fails because the specified functionality doesn’t exist and after that update the code that can make the test case pass and as a result we get the feature implemented in the system. Actually it is a team methodology where Developers, Customer, QAs are involved in it.



Process of TDD :

  1. Add test case
  2. Run the test cases and watch test fails
  3. Update the code
  4. Run the test cases again
  5. Refactor the code (Optional)
  6. Repeat the steps for another test case

Difference between BDD vs TDD :

S.NO.

Behavior Driven Development

Test Driven Development

01.Behavior Driven Development is a development technique which focuses more on a software application’s behavior.Test Driven Development is a development technique which focuses more on the implementation of a feature of a software application/product.
02.In BDD the participants are Developers, Customer, QAs.In TDD the participants are developers.
03.Mainly it creates an executable specification that fails because the respective feature doesn’t exist, then writing the simplest code that can make the specification pass and as a result we get the required behavior implemented in the system.Mainly it refers to write a test case that fails because the specified functionality doesn’t exist and after that update the code that can make the test case pass and as a result we get the feature implemented in the system.
04.Its main focus is on system requirements.Its main focus is on unit test.
05.In BDD the starting point is a scenario.In TDD the starting point is a test case.
06.It is a team methodology.It is a development practice.
07.Here language used to write behavior/scenarios is simple English language.Here language is used is similar to the one used for feature development like programming language.
08.In BDD collaboration is required between all the stakeholders.In TDD collaboration is required only between the developers.
09.It is a good approach for project development which are driven by user actions.It is a good approach for projects which involve API and third-party tools.
10.Some of the tools used are  Cucumber, Dave, JBehave, Spec Flow,  Concordian, BeanSpec etc.Some of the tools used are  JBehave, JDave, Cucumber, Spec Flow, BeanSpec, FitNesse etc.
My Personal Notes arrow_drop_up
Recommended Articles
Page :