QA Lab · Cross-Stack Series · Stack 5

Playwright + C#
+ NUnit Framework

Strongly-typed .NET automation framework demonstrating the C# async/await patterns expected in enterprise Microsoft-stack organisations — built against the same QA Lab target as all Cross-Stack Series frameworks.

Microsoft.Playwright 1.44 · C# 12 (.NET 8) · NUnit 3.14 · Playwright HTML Reporter · GitHub Actions

✓ CI Green 13 Test Files 13 UI Sections Covered C# 12 / .NET 8 LTS 📊 Playwright HTML Report Live .NET Enterprise Stack

About This Project

The Purpose

Playwright + C# is the expected stack in any Microsoft-ecosystem organisation: .NET shops, Azure DevOps pipelines, and teams already invested in the C# toolchain. Hiring managers in these environments look for native async/await fluency, NUnit familiarity, and the ability to structure a test project as a proper .NET solution.

This is Stack 5 of the Cross-Stack Series — the same QA Lab target tested with Playwright but in C# rather than TypeScript. Both stacks use the identical Playwright engine, making this a clean apples-to-apples comparison of language ecosystem fit, not automation capability.

Stack choice is an engineering decision, not brand preference. This framework demonstrates what idiomatic C# automation looks like — strongly typed, compiled, zero sync-over-async anti-patterns.

Architecture Constraints

Every decision reflects real .NET enterprise requirements:

  • Strongly-typed Page Object Model — IPage dependency injection, no static state
  • Native async/await throughout — await page.ClickAsync() is idiomatic, not bolted on
  • NUnit [TestCase] — parametrized tests without DataProvider boilerplate
  • [Parallelizable(ParallelScope.Self)] — parallel-safe, each class gets its own IPage
  • Expect() for all assertions — not Assert.That() on raw strings
  • TreatWarningsAsErrors in .csproj — code quality discipline expected in enterprise
  • C# records for test data (FormData.cs) — immutable, value-equality, concise
  • Environment variable for BASE_URL — zero hardcoded URLs in test code

Test Coverage

13 QA Lab UI sections covered across 13 test files. Same automation surface targeted in every Cross-Stack Series framework.

Buttons
Click states, disabled state assertion
Forms
Validation, field interaction, submit
Input Fields
Text, number, date, search, URL types
Checkboxes
Check/uncheck, disabled state
Radio Buttons
Selection, mutual exclusivity
Dropdowns
SelectOptionAsync(), multiple select
Tables
Cell content, row count, edit action
Alerts & Modals
Open, confirm, cancel
Dynamic Visibility
Checkbox-triggered panel reveal
Async Buttons
Loading → success/error transitions
IFrames
FrameLocator — full support
Drag & Drop
DragAndDropAsync()
Slider
FillAsync() on input[type=range]

Tech Stack

.NET stack — every tool justified by real-world enterprise hiring requirements. Zero exotic NuGet packages.

💻
C# 12 / .NET 8 LTS
Language — native async/await, records, nullable enable, LTS release
🌐
Microsoft.Playwright 1.44
Browser automation — official .NET binding, same engine as TypeScript stack
NUnit 3.14
Test framework — [TestCase] parametrization, [Category] grouping, parallel execution
📊
Playwright HTML Reporter
Reporting — built-in, zero config, professional output, GitHub Pages ready
⚙️
GitHub Actions
CI/CD — smoke on push, regression on main, Monday schedule, free tier
📄
GitHub Pages
Report hosting — free, automated deploy from CI artifact on every main push
🔧
.runsettings
NUnit + Playwright parallel config — 4 workers, Chromium headless
📝
TreatWarningsAsErrors
Build quality gate — zero compiler warnings enforced in CI and local builds
🤖
Claude Code
AI engineering accelerator — scaffolding, pattern review, CLAUDE.md specification

Cross-Stack Series

Same target, different stacks. Five frameworks built against the same QA Lab UI to produce evidence-based comparisons — not vendor benchmarks.

01
Playwright + TypeScript
✓ Complete
02
Pytest + Python
Planned
03
Selenium + Java + TestNG
✓ Complete
04
Cypress + JavaScript
Planned
05
Playwright + C# + NUnit
✓ This Project
Evgenii Subbotin
QA/SDET Lead · QA Architect · SAFe RTE

20 years in software engineering. This framework demonstrates cross-stack fluency — the ability to operate effectively in .NET environments while understanding where different stacks deliver better outcomes for a given team context.