If the business owner/QA are writing/running the Acceptance test against the front end of a Asp.Net Mvc Application, is there a benefit to using SpecFlow/Watin or SpecFlow/Selenium over Cucumber/Watir, besides the "all on one platform" benefit?
1 Answer
The major benefit for me is that Specflow compiles feature file into the unit tests.
I am using NUnit and with this feature I can run my tests written in “classic” style and GivenWhenThen style in one suite. Some things look very ridiculous when I’ve tried to describe them in Gherkin (Specflow):
Scenario: The edit user page should have button Delete
Given I am on the EditUserPage
When I open ‘MyUser’ for edit
Then I see the Delete button on the EditUserDetailsPage
Imagine, If I have about 20 such UI scenarios in one feature, so who will read all this GivenWhenThen mess?
Sure, I can refine that scenario to make it in one step, but instead of that I am writing a classic unit test:
public void The_edit_user_page_should_have_button_Delete()
{
EditUserDetailsPage editUser = new EditUserDetailsPage();
editUser.Invoke(“MyUser”);
Asset.IsTrue(editUser .btnDelete.Exists, “Button Delete should be there”);
}
Using the Specflow, I can use classic unit tests and features in one test suite because specflow compiles the scenarios into the unit tests
-
I think this answer would probably fit under the one platform benefit. It also sounds like you are mainly managing the feature tests. I'm curious about scenarios where you have a QA team writing these tests primarily. Commented Mar 21, 2012 at 23:10
-
Also, please check out this page: agile-wiki.wikispaces.com/Comparing+SpecFlow+and+Fitnesse Fitnesse also has its advantages and many successful automation teams are using it. Specflow fits better for my project than Fitnesse, but my coworkers from parallel projects are happy with Fitnesse. Both projects are enterprise solutions written in .NET. Commented Mar 22, 2012 at 0:34