Reputation: 547
Are there any really simple step-by-step examples/tutorials of how Unit Testing and Specflow testing works and can be done?
Upvotes: 6
Views: 12500
Reputation: 4822
I learned a lot about BDD (and Specification by example) from this presentation by Matt Wynne: http://skillsmatter.com/podcast/agile-scrum/bdd-as-its-meant-to-be-done
It's not SpecFlow but I'm sure you can learn a lot by it anyway.
For the SpecFlow-tooling I would suggest the free TekPub video: http://vimeo.com/46915798.
Upvotes: 2
Reputation: 6961
Yes, there are, but the big problem is that to do TDD well and understand how Sepcfication By Example (such as SpecFlow) fits in, I'd recommend that you go a little deeper.
If you start with Gojko Adzic's http://gojko.net/2011/02/04/tdd-breaking-the-mould/ then it hopefully will set the big picture. I would recommend paying close attention to the section with the seven-step tdd or dual cycle section of the talk. For me, the specification by example is the outer circle, when we receive a new business requirement, encode it in Gherkin and use Specflow to validate that the feature doesnt work yet.
Then I recommend the use TDD to help develop your code technically. Use multiple tests to shape the development towards meeting your business goal. Having dome Keith Braithwaite's TDD as if you mean it exercise I can really recommend you have a go at this.
Finally your TDD drives your Specification to pass, and at this point I would recommend you consider refactoring everything, consider your production code, your unit tests and even your specifications for simplification and duplication removal. Make it clean.
Good luck.
Upvotes: 3