A production-ready C# test automation framework demonstrating enterprise-level automation engineering practices. Built to showcase expertise in Selenium WebDriver, API testing, cross-browser compatibility, containerization, and CI/CD integration.
- β Cross-Browser Testing - Chrome, Firefox, Edge with automatic driver management
- β REST API Testing - Complete CRUD operations with authentication & validation
- β Page Object Model - Scalable, maintainable UI test architecture
- β Parallel Execution - Concurrent test runs for faster feedback cycles
- β CI/CD Integration - GitHub Actions with comprehensive reporting
- β Docker Support - Containerized execution for consistent environments
- β Structured Logging - Detailed execution traces with Serilog
- β Auto Screenshots - Failure evidence capture for debugging
- β Multi-Format Reporting - TRX, JSON, HTML test reports
| Component | Technology | Purpose |
|---|---|---|
| Framework | .NET 8 | Modern C# development platform |
| UI Testing | Selenium WebDriver 4.x | Browser automation & testing |
| API Testing | HttpClient + NUnit | REST API validation |
| Test Runner | NUnit | Test execution & assertions |
| Containerization | Docker | Consistent test environments |
| CI/CD | GitHub Actions | Automated pipeline execution |
| Logging | Serilog | Structured diagnostic logging |
| Reporting | Multiple formats | Comprehensive test reporting |
- Smoke Tests - Core functionality validation
- Functional Tests - Feature-complete testing with parameterized inputs
- Performance Tests - Response time validation (< 5 second thresholds)
- Cross-Browser Tests - Multi-browser compatibility verification
- Edge Case Tests - Special characters, empty inputs, error scenarios
- CRUD Operations - Complete Create, Read, Update, Delete testing
- Authentication - Bearer token, Basic auth, API key validation
- Data Validation - Schema verification, field validation
- Error Handling - 404, 500, timeout scenario testing
- Performance Testing - API response time benchmarking
# Required software
- .NET 8 SDK
- Chrome/Firefox/Edge browsers
- Docker (optional)
- Git# Clone repository
git clone https://github.com/[username]/[repo-name].git
cd [repo-name]
# Restore dependencies & build
dotnet restore
dotnet build --configuration Release
# Run all tests
dotnet test --configuration Release
# Run specific test suites
dotnet test UI.AutomationTests/UI.AutomationTests.csproj
dotnet test API.AutomationTests/API.AutomationTests.csproj# Chrome (default)
$env:BROWSER="Chrome"; dotnet test UI.AutomationTests/
# Firefox
$env:BROWSER="Firefox"; dotnet test UI.AutomationTests/
# Edge
$env:BROWSER="Edge"; dotnet test UI.AutomationTests/# Build & run containerized tests
docker build -t test-automation-framework .
docker run --rm test-automation-framework
# With result collection
docker run --rm \
-v ${PWD}/TestResults:/app/TestResults \
-v ${PWD}/Screenshots:/app/Screenshots \
test-automation-frameworkTestAutomationFramework/
βββ π§ TestFramework/ # Core automation components
β βββ DriverFactory.cs # Cross-browser WebDriver factory
β βββ BasePage.cs # Page Object Model base class
β βββ ApiClient.cs # REST API testing client
βββ π₯οΈ UI.AutomationTests/ # User interface test suite
β βββ Pages/ # Page Object implementations
β β βββ GoogleHomePage.cs # Home page interactions
β β βββ GoogleSearchResultsPage.cs # Results validation
β βββ Tests/ # UI test cases
β βββ GoogleSearchTests.cs # Search functionality tests
βββ π API.AutomationTests/ # API test suite
β βββ Tests/
β βββ JsonPlaceholderApiTests.cs # REST API validation
βββ βοΈ .github/workflows/ # CI/CD automation
β βββ test-automation.yml # GitHub Actions pipeline
βββ π³ Dockerfile # Container configuration
βββ π appsettings.json # Framework configuration
βββ π README.md # This documentation
# Smoke tests (quick validation)
dotnet test --filter "Category=Smoke"
# Performance tests (timing validation)
dotnet test --filter "Category=Performance"
# Functional tests (feature testing)
dotnet test --filter "Category=Functional"
# Cross-browser compatibility
dotnet test --filter "Category=Cross-Browser"Test Run Summary:
β
UI Tests: 12 passed, 0 failed (Chrome)
β
UI Tests: 12 passed, 0 failed (Firefox)
β
API Tests: 15 passed, 0 failed
β±οΈ Total execution time: 2.3 minutes
πΈ Screenshots: 0 (no failures)
π Logs: Generated in ./logs/
- π Trigger Events: Push to main/develop, PRs, scheduled runs
- π Multi-Browser Testing: Parallel Chrome & Firefox execution
- π API Validation: Comprehensive REST endpoint testing
- π³ Container Testing: Docker-based execution validation
- π Artifact Collection: Results, logs, screenshots
- π Scheduled Regression: Daily 6 AM UTC automated runs
- β‘ Performance Monitoring: Baseline performance validation
- API Tests - Fast validation of backend services
- UI Tests (Chrome) - Primary browser automation
- UI Tests (Firefox) - Cross-browser validation
- Docker Tests - Containerized execution
- Test Reporting - Consolidated results & artifacts
{
"BrowserSettings": {
"Chrome": {
"Arguments": [
"--no-sandbox",
"--disable-dev-shm-usage",
"--window-size=1920,1080"
]
}
}
}{
"Environment": {
"CurrentEnvironment": "Development",
"Environments": {
"Development": { "BaseUrl": "https://dev.example.com" },
"Staging": { "BaseUrl": "https://staging.example.com" },
"Production": { "BaseUrl": "https://example.com" }
}
}
}- Page Object Model - Encapsulated page interactions
- Dependency Injection - Loose coupling & testability
- Wait Strategies - Robust element synchronization
- Error Handling - Graceful failure management
- Logging - Comprehensive execution tracing
- Atomic Tests - Independent, self-contained scenarios
- Data-Driven - Parameterized test execution
- Descriptive Naming - Clear test purpose & expectations
- Category Organization - Logical test grouping
- Setup/Teardown - Proper test isolation
- Containerization - Platform-independent execution
- Pipeline Automation - Automated quality gates
- Artifact Management - Result preservation & analysis
- Notification Systems - Failure alerting
- Performance Monitoring - Trend analysis & baselines
# Update browser drivers
dotnet add package Selenium.WebDriver.ChromeDriver --prerelease
# Check browser version compatibility
chrome --version# Test API connectivity
curl https://jsonplaceholder.typicode.com/posts/1
# Verify proxy settings
$env:HTTP_PROXY=""
$env:HTTPS_PROXY=""# PowerShell execution policy
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser- Scalable Architecture - Supports large test suites
- Maintainable Codebase - Clean, documented, modular design
- Cross-Platform Support - Windows, Linux, macOS compatibility
- Integration Ready - Easy integration with existing CI/CD pipelines
- Performance Optimized - Parallel execution, efficient resource usage
- Modern Practices - Current industry standards & patterns
- Comprehensive Coverage - UI, API, integration testing
- Tool Expertise - Professional toolchain utilization
- Quality Focus - Robust validation & error handling
- π Issues: Create GitHub issues for bugs/features
- π Documentation: Check README & inline comments
- π Logs: Review execution logs for troubleshooting
- ποΈ Examples: Reference existing test implementations
- Fork repository
- Create feature branch:
feature/new-capability - Implement changes with tests
- Update documentation
- Submit pull request
This Test Automation Framework demonstrates enterprise-level automation engineering expertise suitable for:
- π― Quality Assurance Engineers - Comprehensive testing capabilities
- π§ Automation Engineers - Modern framework architecture
- β‘ DevOps Engineers - CI/CD integration & containerization
- π¨βπ» Software Engineers - Clean, maintainable code practices
Built with β€οΈ for Quality Engineering Excellence
Showcasing professional automation skills with production-ready code, comprehensive documentation, and industry best practices.