How can .NET developers use BDD/SpecFlow to automate acceptance tests
Hi,
As per book "bddbooks-discovery", Chapter 5 - who does what and when, BDD scenarios can be automated either by Developer or Test Automation Expert.
I am a Test Automation Engineer and plan to use either the UI (Selenium) or API (RestSharp) to automate the BDD scenarios.
I was wondering how would a Developer who is close to his implementation code automate the BDD Gherkin Scenarios. I don't believe they will use Selenium(Page Objects) or API which are more black box. What methodology will they use to automate Gherkin Scenarios.
Can you please share few examples/case study?
Also, which is preferable - Gherkin Automation by Developers or Automation by Automation Experts.
I will use these examples/case study to have conversation with the developers
-
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.
0 -
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.
0
Please sign in to leave a comment.
Comments
2 comments