Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
291 views
in Technique[技术] by (71.8m points)

.net - BDD And Unit Testing

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 I am working on an app and I have a simple spec and I implement it. I have just enough bdd/spec to cover it. Now after I've re-factored it and am happy and it's passed as done for that spec, should I start writing Unit tests to cover all possible inputs, because that's what I did in TDD?

I 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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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/


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...