3

I'm working with a project and I'm planning to use Specflow and Selenium C#. I'm new with using Specflow (SpecFlow is the open source port of Cucumber for .NET) for automation and I'm going to use it for regression testing of an existing website. My previous project was using .csv files to make the test data-driven. I'm just curious if SpecFlow's Scenario Outline/Data Table Approach is enough to make my test case data-driven?

3

Hope it is not too late to reply.

For data-driven-testing, I prefer SpecFlow's Scenario Outline approach than csv file for a automated test. Why? As a known benefit of BDD, SpecFlow's Scenario Outline brings all of detail in one readable place - your feature file. Then you can manage your feature behavior and data that you decide to test against in one single file.

Scenario Outline ...
    Given aaa <xxx>
    When bbb <yyy>
    Then ccc <zzz>
Example:
    | xxx | yyy | zzz |
    | ... | ... | ... |

If you want to migrate your previous data-driven CSV file to the Specflow one, using a text editor with replace feature should work it out in a second with replace tab, ^, and $ with |. done!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.