tags:

views:

435

answers:

2

I have been doing TDD and was using it more as unit testing than to drive my design. Recently I have read a lot about BDD; now that I have a better idea about them both, I was trying to figure out how to use BDD and unit testing concurrently.

For example I would drive my design using BDD Dan North style ,and lets say am working on app and I have a simple spec and I implement it , I have just enough bdd/spec to cover it , now after Iv re-factored it and am happy and its passed as done for that spec , should I start writing Unit tests to cover all possible inputs , beacuses thats what I did in TDD?

Am the only developer in the company and everything is on my shoulders , although the other team do try to manual test the app, I would like to lower the defect rate.

+6  A: 

Pick up "The RSpec Book". The book uses Cucumber & RSpec. Could easily be Cucumber & NUnit or something else though. Cucumber and BDD extend the red, green, refactor concept a level deeper.

http://www.pragprog.com/titles/achbd/the-rspec-book

Cucumber: http://cukes.info/
RSpec: http://rspec.info/
NUnit: http://www.nunit.org/
JUnit: http://www.junit.org/

Michael Pardo
Am a .NET developer , but i'll give the book a try thanks!
Jamie
I agree, this book is great. And Cucumber is possible to use with .NET as well.
Jimmy Stenke
Yep, and Java. Cuke for Nuke and Cuke for Duke.
Michael Pardo
Got the book now , and I must say its awesome.
Jamie
Good, it's a great book. Glad you agree.
Michael Pardo
Also have a look at SpecFlow (www.specflow.org). It is a pure .NET tool and tries to bring pragmatic BDD to .NET.
jbandi
A: 

I agree. The RSpec Book book does a decent job of describing the "Outside - In" approach to development. Cucumber (outside) helps describe the expected behavior (in terms that the user understands); and RSpec/*Unit (inside) helps to describe your class' behavior.

Jon Kern