An example of how to use speclfow with selenium, tdd and page object
Main resource used to create first tests: http://ralucasuditu-softwaretesting.blogspot.co.uk/2015/06/write-your-first-test-with-specflow-and.html?m=1
-
Install Visual Studio (Enterprise 2015)
-
Install NuGet (package manager). http://docs.nuget.org/consume/package-manager-dialog#managing-packages-for-the-solution
-
Connect to github (View > Team Explorer), publish to github then commit solution to github
-
Create new Unit test project "SpecFlow Tests" Visual C# > Test > Unit Test Project https://my330space.wordpress.com/2015/02/18/how-to-setup-selenium-webdriver-with-visual-studio-2013/
-
Use NuGet (Project > Manage NuGet packages) to install specflow (Specflow NUnit)
-
Use NuGet to install selenuium? http://nugetmusthaves.com/Tag/selenium
-
Use NuGet to install selenium support package
-
Create folder 'dependencies'. Download chrome, IE drivers directly here rather than use NuGet packages (might be out of date?) Right click on the chromedriver.exe and select Properties Ensure the Build Action Content is selected Copy to Output Directory Copy Always has been selected. This will ensure that chromedriver.exe is always in the folder of the running assembly so it can be used.
-
As part of the NuGet installs, you will notice that an App.config file was generated in the structure of the project. Because we chosen to use MSTest to execute out tests, we need to do a configuration in this file. Add line
-
Tools > Extensions and Updates > Online. Install SpecFlow extension and restart VS
-
Create a new SpecFlow feature by right-clicking on the project name --> Add --> New Item --> Visual C# Items --> SpecFlow Feature File. Name the feature
-
Follow these steps: http://ralucasuditu-softwaretesting.blogspot.co.uk/2015/06/write-your-first-test-with-specflow-and.html?m=1
Nuget - install Specflow.mstest
n. Create new Project "SpecFlow Pages" (Separate out page objects from tests)
TO READ: https://github.com/alisterscott/SpecDriver
DECISIONS: xUnit/ nUnit / Specflow+ (Execution) - chosen NUnit for now Reporting???