Skip to main content

How can .NET developers use BDD/SpecFlow to automate acceptance tests



  • Andreas Willich

    The nice thing about SpecFlow is, that you can execute any code in your bindings. You can use Selenium or RestSharp, but nothing stops you from calling your methods on your classes directly. If you don't need to do black-box testing, then don't do it. And that was the way I did it in most of my projects.


    About who writes it:

    As long there is one that automates it, all is good. Depends on how your team is setup.

    Personally, I am not a big fan of splitting these responsibilities at all. Regardless of which technology/tools/frameworks are used. With it, the automation part will always be behind the application code and the developer of the application code will not care about the existing automation and will it break all the time.

  • sandeep hegde

    Thanks Andreas for explaining how a developer can use his/her classes and method inside the step bindings.

    I believe what you are saying is, it is ideal if a developer (who is implementing the functionality) automates the step definition. That way the automated step definition will drive his/her implementation. He may not use Selenium or Rest Sharp instead will call his/her classes/methods directly.


Please sign in to leave a comment.

Powered by Zendesk