This repository contains automation scripts for the SauceDemo website using Selenium and SpecFlow in C#.
-
Login Feature: Automates the login process for the SauceDemo website. It includes scenarios for successful login with valid credentials.
-
Shopping Feature: Automates the shopping process on the SauceDemo website. It includes scenarios for adding items to the cart, proceeding through the checkout process, and completing the purchase.
-
Features: Contains the SpecFlow feature files and their corresponding step definitions.
-
Hooks: Contains configuration and setup for dependency injection and other pre/post scenario actions.
-
Interactions: Defines tasks or actions that an actor can perform.
-
Pages: Contains page object models for different pages of the SauceDemo website.
-
Steps: Contains step definitions for the SpecFlow scenarios.
- Clone the repository.
- Open the solution in Visual Studio.
- Restore NuGet packages.
- Build the solution.
- Run the tests using the Test Explorer.
Screenshots of failed tests can be found in the screenshots
directory.
Run this command to install SpecFlow.Plus.LivingDoc.CLI
dotnet tool install --global SpecFlow.Plus.LivingDoc.CLI
After that, run this command to generate the file LivingDoc.html, suppose you have run the tests
livingdoc.exe test-assembly .\bin\Debug\net6.0\tests.dll -t .\bin\Debug\net6.0\TestExecution.json