Skip to content

Testing

Projects

Project Focus
UnitTests Blazor components (bUnit), services, controllers, options validators, SEO models, navigation audit, Hebrew resource completeness
IntegrationTests WebApplicationFactory<Program> — page HTTP responses, SEO APIs, contact API, health, security headers, CORS, rate limiting, static assets, localization
E2ETests Playwright browser tests — home, about, services, pricing, FAQ, contact form, navigation flow, responsiveness, accessibility

All test projects target net10.0.

Coverage

  • Coverlet + MarketingSiteTemplate.runsettings
  • CI quality gate: 50% line coverage threshold (azure-pipelines.yml)

E2E prerequisites

E2E tests do not reference the app project directly. Start the site at http://localhost:5000 before running E2E tests, or use the pipeline's orchestration.

dotnet test tests/MarketingSiteTemplate.UnitTests
dotnet test tests/MarketingSiteTemplate.IntegrationTests
# With app running:
dotnet test tests/MarketingSiteTemplate.E2ETests

Commands and patterns: README.md in the template repo.