Are there any really simple step-by-step examples/tutorials of how Unit Testing and Specflow testing works and can be done?
In order to execute your SpecFlow tests, you need to define the tests as Gherkin feature files, bind the steps defined in your feature files to your code, and configure a unit test provider to execute the tests. SpecFlow generates executable unit tests from your Gherkin files.
Specflow is a testing framework supporting BDD practices in . NET framework. It's an open source framework hosted on GitHub. It aids in using ATDD (Acceptance test driver development) for . NET Applications.
What is SpecFlow? SpecFlow is a BDD framework for . NET which boosts your productivity by helping you with writing your feature files and automation code in your favorite IDE using C# and . NET methods.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With