Skip to content

omerakben/tuel-Selenium-WebDriver-RestSharp

Transit to Fully Open-Source TUEL Test Framework

Modern C# test automation template, evolved from a legacy financial services solution into a vendor-neutral, community-ready baseline.

A comprehensive, enterprise-grade test automation framework built with .NET 8.0, Selenium WebDriver, and RestSharp. This framework demonstrates modern SDET architecture patterns and serves as a plug-and-play template for API and UI testing.

Features

  • Modern .NET 8.0 with latest C# features
  • Comprehensive Testing: API + UI test coverage
  • Page Object Model: Maintainable UI test architecture
  • Authentication: Multi-flow Azure AD integration
  • Configuration Management: Environment-specific settings
  • Secret Management: Env/Key Vault/encrypted configuration via SecretManager
  • Retry Mechanisms: Robust error handling and recovery
  • Performance Optimized: Efficient wait strategies
  • WebDriver Lifecycle: Pooling, health checks, and Selenium Grid support
  • Docker Ready: Containerized setup for easy deployment

Architecture

Test Layers

  • API Tests: RESTful API testing with RestSharp
  • UI Tests: Selenium WebDriver with Page Object Model
  • Authentication: Microsoft Entra ID integration
  • Configuration: Centralized environment management

Domain Model

  • Products: Core business entities
  • Orders: Transaction management
  • Customers: User/client management
  • Dashboard: Business intelligence
  • Templates: Reusable configurations
  • Pricing: Fee and cost management

Quick Start

Prerequisites

  • .NET 8.0 SDK
  • Visual Studio 2022 or VS Code
  • Chrome or Edge browser
  • Docker (optional)

Setup

  1. Clone the repository.
  2. Change into the test project directory: cd tuel.test.
  3. Copy TUEL.TestFramework.runsettings.example to TUEL.TestFramework.runsettings.
  4. Update the new file with your environment-specific values (or create TUEL.TestFramework.local.runsettings for machine-specific overrides).
  5. Review the core expectations in docs/testing-guidelines.md.
  6. Run tests:
    dotnet test TUEL.TestFramework.sln --settings TUEL.TestFramework.runsettings

Docker Setup

docker-compose up -d
docker exec -it tuel-test-framework dotnet test

Project Structure

.
├── docs/
├── tuel.test/
│   ├── API/
│   ├── Configuration/
│   ├── Logging/
│   ├── Web/
│   ├── GlobalUsings.cs
│   ├── InitializeTestAssembly.cs
│   ├── TUEL.TestFramework.sln
│   ├── TUEL.TestFramework.csproj
│   ├── TUEL.TestFramework.runsettings.example
│   └── README.md
├── logs/
├── Dockerfile
├── docker-compose.yml
└── README.md

Configuration

Environment Variables

  • ENV: Environment name (dev, staging, prod)
  • BaseURL: Application base URL
  • BaseurlAPI: API base URL
  • DefaultTimeoutSeconds: Default timeout for operations

WebDriver

  • Browser: local-edge, local-chrome, or remote-<browser> to target Selenium Grid/cloud providers.
  • WebDriverProvider: local or grid to control provider selection.
  • SeleniumGridUrl: Remote WebDriver hub when WebDriverProvider=grid.
  • WebDriverEnablePooling: Enable/disable the shared driver pool (default true).
  • WebDriverCommandTimeoutSeconds: Increase for slow Selenium Grid providers.

Authentication

  • Azure AD: Client credentials flow
  • ROPC: Resource owner password credentials
  • Local JWT: RS256/ES256-signed development tokens with pluggable PEM keys

Secret Management

  • Use env://, kv:// (Azure Key Vault), or enc:// (AES-256 encrypted) references in runsettings.
  • Configure Key Vault access through SecretManagement__KeyVaultUri, optional managed identity, and disable plaintext fallback for production.
  • Generate encrypted references with ConfigurationEncryptionUtility.EncryptToReference.

Test Categories

API Tests

  • Product management endpoints
  • Order processing APIs
  • Customer data APIs
  • Authentication flows

UI Tests

  • Dashboard functionality
  • Product management
  • Order workflows
  • Customer management
  • Template configuration

Reporting

  • Test Results: Detailed test execution reports
  • Performance Metrics: Execution time tracking
  • Screenshots: Failure capture and analysis
  • Logs: Comprehensive logging for debugging

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests for new functionality
  5. Submit a pull request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Use Cases

  • Enterprise Applications: CRM, ERP, e-commerce platforms
  • API Testing: RESTful services and microservices
  • UI Automation: Web application testing
  • Regression Testing: Continuous integration pipelines
  • Performance Testing: Load and stress testing

Community

Support & Security

  • Need help? Check SUPPORT.md for the right channel.
  • Report security issues privately via the process in SECURITY.md. Do not open public issues for vulnerabilities.

Links

Metrics

  • Test Coverage: 95%+ code coverage
  • Execution Time: < 5 minutes for full suite
  • Reliability: 99%+ test stability
  • Maintainability: Clean architecture patterns

Built by Omer "Ozzy" Akben — Full-Stack Developer • AI Engineer • SDET • [email protected] • (267) 512-4566

About

No description, website, or topics provided.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published