This repository contains a .NET 8 API test framework and Playwright UI tests...
This repository contains a .NET 8 / C# API test automation framework, built as part of ongoing QA Automation upskilling and CI/CD practice.
- .NET 8 / C#
- xUnit for test execution
- RestSharp (or HttpClient) for API calls
- Coverlet for code coverage
- ReportGenerator for HTML/Cobertura reporting
- GitHub Actions for CI/CD
- CI Pipeline (
api-ci.yml
)- Restore dependencies
- Build in Release mode
- Run tests with coverage
- Generate coverage report
- Upload artifacts (test results + HTML report)
This project reads runtime secrets from GitHub Actions → Secrets:
API_BASE_URL
→ Base URL for API under testAPI_KEY
→ Authentication key
Secrets are consumed inside tests using:
var baseUrl = Environment.GetEnvironmentVariable("API_BASE_URL");
var apiKey = Environment.GetEnvironmentVariable("API_KEY");