I am working on building a test automation project for our application using SpecFlow, SpecFlow+ and Selenium WebDriver. Have been going through a few tutorials and each has a different viewpoint.
- SpecFlow.org says to use an MSTest (.NET Code) or Unit Test (.NET Framework) once the solution is created
- Other tutorials on Selenium sat to use the Class Library (.NET Framework) or the Unit Test (.NET Framework) https://saucelabs.com/resources/articles/getting-started-with-webdriver-in-c-using-visual-studio
- Still others say to use Console App (.NET Framework) https://www.guru99.com/selenium-csharp-tutorial.html
So can anyone inform what is the best project-type to use with the SpecFlow project and what to use with the Selenium project in the same VS 2019 Solution?
Also, should I have the main project as the SpecFlow and the added project as Selenium (or vice-versa)?
Has anyone done a similar solution with 2 projects that I can have a look at?
If you start with the MSTest, Unit Test or Class Library template doesn't matter. All of them produce a normal class library assembly. The only differences between these project templates are the style (classic or SDK) and the NuGet packages that are added by default.
And in the tutorial of Guru99 they are changing somewhen during the tutorial the project from a console application to a class library.
At the moment I would choose the template depending on which project format you are using in your project. And for that I would follow our "Getting Started"- Guide to choose the right template.
About one or multiple projects: Stay with one project. Why making it more complicated than needed?
Full disclosure: I am the community manager and one of the maintainer of SpecFlow and SpecFlow+