0

I'm new to BDD and after reading through a few sources have got the following understanding:

BDD has two parts to it, Integration testing and Unit testing. Integration testing which is done by specification tool like Cucumber. Unit testing which is traditional junit+(jmock or mockito) etc.

Is this understanding correct?

Rgds.

tintin
  • 5,676
  • 15
  • 68
  • 97
  • "part of BDD structure": if you mean "what can bdd be used for?" then [tdd-and-bdd-differences](http://stackoverflow.com/questions/4395469/tdd-and-bdd-differences/4396118#4396118) might be helpful – k3b Jan 02 '11 at 11:02

1 Answers1

2

I think it's much more a way of thinking about development, rather than the structure of unit vs. integration testing. To quote from here:

BDD focuses on obtaining a clear understanding of desired software behaviour through discussion with stakeholders. It extends TDD by writing test cases in a natural language that non-programmers can read. Behavior-driven developers use their native language in combination with the ubiquitous language of domain driven design to describe the purpose and benefit of their code. This allows the developers to focus on why the code should be created, rather than the technical details, and minimizes translation between the technical language in which the code is written and the domain language spoken by the business, users, stakeholders, project management, etc.

From the little I've done with it, our BDD focus was on developing a ubiquitous language shared by the business and developers, and writing the tests in a business-comprehensible fashion.

Brian Agnew
  • 268,207
  • 37
  • 334
  • 440
  • Hi, I'm thinking about it in a more fine grained level at this moment. From the above explanation it seems that BDD is TDD with the better naming convention, from this does that mean we don't need any cucumber features in BDD? Can we write a unit test in BDD manner? – tintin Jan 02 '11 at 12:04
  • BDD doesn't specify any particular tools to use. It's a philosophy or practise. You can write a unit test in a BDD style, using the vocabulary of the business/customers. – Brian Agnew Jan 02 '11 at 13:10
  • Thanks Brian, your explaination made me look further for more detailed understanding of BDD approch. Reading the full http://en.wikipedia.org/wiki/Behavior_Driven_Development wiki gave me a clear picture. Thanks! – tintin Jan 03 '11 at 10:40
  • You can use context specification style BDD - using tools like MSpec that work at the "unit test" level. – nick Jan 10 '11 at 21:37