Skip to content

cleeding/CSharpSeleniumFramework

Repository files navigation

Lightweight C# Selenium & NUnit Framework

This framework leverages C#, Selenium, NUnit, POM, Allure Report, and automatic screenshot capture for efficient and comprehensive testing.

Prerequisites

Before running the tests and generating reports, make sure you have the following installed:

  • .NET SDK (8.0 or higher)
  • Selenium WebDriver
  • Allure Commandline
  • NUnit Console (optional, if you prefer to run tests through NUnit)

Run Locally

  1. Clone the repository to your local machine

  2. Building the Project

Make sure the required dependencies are installed. Run the following command to restore NuGet packages:

  dotnet restore
  dotnet build
  1. Running Tests

You can run the tests with the following command:

  dotnet test
  1. Generating Allure Report

To generate an Allure Report, run the following steps:

Run the tests with the following command to specify the logger for Allure:

  dotnet test --logger "nunit;LogFilePath=allure-results/results.xml"

After running the tests, generate the Allure report:

  allure generate --clean

To serve the report locally:

  allure serve allure-results

This will start a local server and open the Allure Report in your browser.

  1. Screenshots for failing tests will be saved in a 'screenshots' folder at the project root directory

About

Lightweight Test Automation Framework using C#, Selenium, NUnit, POM pattern and Allure Report

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages