This repository contains the proof of concept related to the usage of Selenium (C#) with Specflow, this PoC will show how is implemented these automation tools with a simple test scenario.
These instructions will get you a copy of the project up and running on your local machine for testing purposes. Make sure to read the code, understand how it's implemented and play around, add, delete or modify steps to learn the capabilities of these tools.
Note: This repository tested under Windows 10 OS requirements, all the software should be installed according this system to make it run properly.
It is necessary to install the software below to build the project:
- Visual Studio IDE - Community 2019
- .NET Core 3.0
- C# 8.0
- Git
- If there are issues with the dependencies while running the project, make sure it has the following packages.
- Microsoft.NET.Test.Sdk (v16.6.1)
- NUnit (v3.12.0)
- NUnit3TestAdapter (v3.16.1)
- SpecFlow (v3.3.16-beta)
- SpecFlow.NUnit (v3.3.16-beta)
- SpecFlow.Tools.MsBuild.Generation (v3.3.16-beta)
- Selenium.WebDriver (v3.141.0)
- Selenium.WebDriver.ChromeDriver (v83.0.4103.3900)
- ExtentReports.Core (v1.0.3)
Note: The dependencies version listed for selenium and specflow could vary in the future of the upload if this PoC. Feel free to leave all the dependencies are they are to make the project run, and then update them all with the current stable versions at the time you are running this PoC.
- Open a Windows Terminal
- Clone this repository or download the zip with the source code in to your local system
$ git clone https://github.com/usersadok/selenium_specflow.git
- Navigate to this project
$ cd selenium_specflow/SeleniumSpecflow/SeleniumSpecflow
- Run the command
$ dotnet test
If everything is working correctly, you will see a browser window opening and doing some stuff. The output of the console will be something like this:
No se pudo ejecutar la serie de pruebas.
Pruebas totales: 4
Correcto: 3
Incorrecto: 1
Tiempo total: 35.6024 Segundos
To visualize the report that is generated by the ExtentReports plugin, you should look for it in the path ./Reports/index.html inside the cloned project.
- Israel G. - Initial work