I've been playing with SpecFlow recently, but I failed to make it work properly. Steps I took are:
1. Downloaded and installed SpecFlow
2. Downloaded and launched Guestbook solution (VS2010)
3. Run NavigationToHomepage test from this project using Visual NUnit under debugger.
4. Got Null Reference Exception on Scenario: Navigation to homepage line.
StackTrace:
in Guestbook.Spec.Features.BrowsingFeature.ScenarioSetup(ScenarioInfo scenarioInfo) in F:\VS Projects\SteveSanderson-GuestbookDemo-bf2bdab\SteveSanderson-GuestbookDemo-bf2bdab\Guestbook.Spec\Features\Browsing.feature.cs:line 0
in Guestbook.Spec.Features.BrowsingFeature.NavigationToHomepage() in f:\VS Projects\SteveSanderson-GuestbookDemo-bf2bdab\SteveSanderson-GuestbookDemo-bf2bdab\Guestbook.Spec\Features\Browsing.feature:line 6
What might be wrong?
UPDATED
I tried to perform the same actions on the another computer and everything worked fine there. I'm completely confused.
I think the best thing to do is create your own:
Create a new solution with a class project. Add a reference to the TechTalk.SpecFlow dll. Create a new SpecFlow Feature File. This will give you a basic spec feature for a calculator. Compile the app and run it in Nunit test runner. You'll be given a load of 'no matching step..' errors. Create a new SpecFlow Step Definition file. Copy the methods that Nunit test runner gave you into the definition file. Recompile and run it in Nunit. Then you just need to implement the guts of each method.
I'm loving SpecFlow for making me write smarter, more manageable code.
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