[Sprint 10] Migrate Web.Tests.Bunit to xUnit v3 - #194
Conversation
🏗️ PR Added to Squad Triage QueueThis PR has been labeled with Next steps:
|
Test Results Summary273 tests ±0 273 ✅ ±0 16s ⏱️ -1s Results for commit d46ca03. ± Comparison against base commit 24c9b6e. This pull request removes 61 and adds 61 tests. Note that renamed tests count towards both. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #194 +/- ##
=======================================
Coverage 78.64% 78.64%
=======================================
Files 43 43
Lines 721 721
Branches 112 112
=======================================
Hits 567 567
Misses 108 108
Partials 46 46 🚀 New features to boost your workflow:
|
- Upgrade package reference: xunit v2 → xunit.v3 (v3.2.2) - Add coverlet.msbuild for code coverage tracking - Create xunit.runner.json with test parallelization enabled - Update file headers in all 7 test-related files (Web.Tests.Bunit namespace) - Validate all 61 tests pass in Debug and Release configurations - Confirm AAA (Arrange-Act-Assert) structure in all test methods Closes #193
There was a problem hiding this comment.
Pull request overview
Migrates the Web.Tests.Bunit bUnit test project from xUnit v2 to xUnit v3, aligning it with the repository’s existing xUnit v3 test project pattern used by other test suites.
Changes:
- Updated
Web.Tests.Bunitto referencexunit.v3and addedxunit.runner.jsonto configure the test runner (including parallelization). - Copied
xunit.runner.jsonto output via the.csprojsodotnet testpicks up runner settings consistently. - Renamed multiple test methods to match the current naming style (removed underscores) and cleaned up/adjusted file headers in some files.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/Web.Tests.Bunit/Web.Tests.Bunit.csproj | Switches to xUnit v3 and ensures runner config is included in test output. |
| tests/Web.Tests.Bunit/xunit.runner.json | Adds xUnit runner configuration (method display + parallelization settings). |
| tests/Web.Tests.Bunit/Components/RazorSmokeTests.cs | Updates file header project name and renames test methods. |
| tests/Web.Tests.Bunit/Components/Layout/NavMenuTests.cs | Updates file header project name and renames test methods. |
| tests/Web.Tests.Bunit/Components/Theme/ThemeProviderTests.cs | Renames test methods; header/comment consistency needs follow-up. |
| tests/Web.Tests.Bunit/Components/Theme/ThemeSelectorTests.cs | Renames test methods; header/comment consistency needs follow-up. |
| tests/Web.Tests.Bunit/Features/ProfileTests.cs | Renames test methods; header consistency needs follow-up. |
| tests/Web.Tests.Bunit/Testing/TestAuthorizationService.cs | Cleans up redundant/incorrect header block. |
| [Fact] | ||
| public void ThemeProvider_RendersChildContent_WithoutError() | ||
| public void ThemeProviderRendersChildContentWithoutError() |
There was a problem hiding this comment.
File header still says Project Name : Unit.Tests, and the top-of-file NOTE about being “scaffolded ahead of production code” / “Do NOT merge before #82” appears outdated now that ThemeProvider exists and these tests are running in CI. Update the header to Web.Tests.Bunit and either remove or refresh the NOTE so it reflects the current state of the codebase.
| [Fact] | ||
| public void ThemeSelector_Renders_WithoutError() | ||
| public void ThemeSelectorRendersWithoutError() |
There was a problem hiding this comment.
File header still says Project Name : Unit.Tests, and the NOTE about being scaffolded / “Do NOT merge before #82 and #83” is likely stale now that ThemeSelector components exist and the suite is passing. Please update the header to Web.Tests.Bunit and remove or update the NOTE to avoid misleading future readers.
| [Fact] | ||
| public void Profile_RendersIdentityDetailsRolesPictureAndClaims() | ||
| public void ProfileRendersIdentityDetailsRolesPictureAndClaims() |
There was a problem hiding this comment.
File header still says Project Name : Unit.Tests. Please update it to Web.Tests.Bunit for consistency with the project and the other updated test files in this PR.
d46ca03 to
8102a08
Compare
✅ ARAGORN APPROVES — Ready for MergeFinal Review Complete: All corrections verified and confirmed. ✅ Verification Summary
🎯 Recommended Merge CommandUse squash merge per squad convention: gh pr merge 194 --squash --delete-branch --title "[Sprint 10] Migrate Web.Tests.Bunit to xUnit v3"Why squash: Consolidates into single clean commit, maintains dev history readability, aligns with test suite migration pattern. 📋 Post-Merge ActionsOnce merged to
✅ CLEAR FOR MERGE Gimli: Excellent work executing this migration with precision. Clean code, proper testing, and full alignment with the Sprint 9 pattern. This completes xUnit v3 adoption across all primary test suites. 🚀 |
Overview
Completes Sprint 10 Task #193: Migrate Web.Tests.Bunit test suite from xUnit v2 to xUnit v3, following the proven pattern from Sprint 9's Web.Tests migration.
Changes
Testing & Validation
✅ Debug Build: 61/61 tests passed (439 ms)
✅ Release Build: 61/61 tests passed (486 ms)
✅ Gate 3 (Full Suite): 261/261 tests passed across all projects
✅ Pre-Push Hooks: All gates passed (0–4)
No Regressions
Files Modified
Closes #193