Skip to main content
suppressed syntax hilighting
Source Link
gnat
  • 20.9k
  • 29
  • 115
  • 295

So finally after reading a lot, I have understood that the difference between BDD and TDD is between T & B. But coming from basic TDD background, what I used to was,

  1. first write unittest for database models

  2. write test for views (at this point start with integration test as well, along with unittests)

  3. write more integration tests for testing UI stuff.

What would be a correct way to approach BDD. Say I have a simple blog application.

Given : When a user logs in. 
He should be shown list of all his posts. 
Given : When a user logs in. 
He should be shown list of all his posts. 

But for this, I need a model with a row user, another row blog posts. 
So how do we go about writing tests.?
when do we create fixtures? When do we write integration  (selenium) tests?

So finally after reading a lot, I have understood that the difference between BDD and TDD is between T & B. But coming from basic TDD background, what I used to was,

  1. first write unittest for database models

  2. write test for views (at this point start with integration test as well, along with unittests)

  3. write more integration tests for testing UI stuff.

What would be a correct way to approach BDD. Say I have a simple blog application.

Given : When a user logs in. 
He should be shown list of all his posts. 

But for this, I need a model with a row user, another row blog posts. So how do we go about writing tests. when do we create fixtures? When do we write integration(selenium) tests?

So finally after reading a lot, I have understood that the difference between BDD and TDD is between T & B. But coming from basic TDD background, what I used to was,

  1. first write unittest for database models

  2. write test for views (at this point start with integration test as well, along with unittests)

  3. write more integration tests for testing UI stuff.

What would be a correct way to approach BDD. Say I have a simple blog application.

Given : When a user logs in. 
He should be shown list of all his posts. 

But for this, I need a model with a row user, another row blog posts. 
So how do we go about writing tests?
when do we create fixtures? When do we write integration  (selenium) tests?

Source Link
whatf
  • 231
  • 1
  • 2
  • 4

How to organize unit/integration test in BDD

So finally after reading a lot, I have understood that the difference between BDD and TDD is between T & B. But coming from basic TDD background, what I used to was,

  1. first write unittest for database models

  2. write test for views (at this point start with integration test as well, along with unittests)

  3. write more integration tests for testing UI stuff.

What would be a correct way to approach BDD. Say I have a simple blog application.

Given : When a user logs in. 
He should be shown list of all his posts. 

But for this, I need a model with a row user, another row blog posts. So how do we go about writing tests. when do we create fixtures? When do we write integration(selenium) tests?