Add xUnit v3 packages to Architecture.Tests (#176) - #182
Merged
mpaulosky merged 1 commit intoApr 26, 2026
Conversation
…Tests pilot) — closes #176 - Replace xunit 2.x PackageReference with xunit.v3 (3.2.2, centralized in Directory.Packages.props) - Add xunit.analyzers PackageReference (version 1.27.0 centralized) - Add xunit.runner.json matching Domain.Tests Sprint 7 pilot config - No version pins in .csproj — all versions remain in Directory.Packages.props Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
🏗️ PR Added to Squad Triage QueueThis PR has been labeled with Next steps:
|
There was a problem hiding this comment.
Pull request overview
Upgrades the Architecture.Tests project to the repo’s xUnit v3 pilot setup (already used in Domain.Tests), aligning it with centralized package versions and adding runner configuration.
Changes:
- Switch
Architecture.Testsfromxunit(v2) toxunit.v3and addxunit.analyzers. - Add
xunit.runner.jsonand ensure it’s copied to the test output directory for runner configuration.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tests/Architecture.Tests/Architecture.Tests.csproj | Updates test dependencies to xUnit v3 + analyzers and wires in runner config file as content. |
| tests/Architecture.Tests/xunit.runner.json | Adds xUnit runner configuration matching the existing Domain.Tests setup (method display + parallelization settings). |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## sprint/8-xunit-v3-pilot #182 +/- ##
========================================================
Coverage 72.53% 72.53%
========================================================
Files 43 43
Lines 721 721
Branches 112 112
========================================================
Hits 523 523
Misses 149 149
Partials 49 49 🚀 New features to boost your workflow:
|
mpaulosky
added a commit
that referenced
this pull request
Apr 26, 2026
## Summary Migrates Architecture.Tests test methods to xUnit v3 API conventions, following the Sprint 7 Domain.Tests pilot pattern. Closes #178 **Working as Gimli (Tester)** --- ## What Changed All 4 test files updated with proper xUnit v3 migration conventions: | File | Tests | Change | |------|-------|--------| | `DomainLayerTests.cs` | 4 | AAA comments + extract `assembly` variable for clean Arrange/Act split | | `VsaLayerTests.cs` | 3 | AAA comments + extract `domainAssembly` variable | | `ThemeLayerTests.cs` | 2 | AAA comments | | `CachingLayerTests.cs` | 2 | AAA comments | **Total: 11 tests migrated** ## xUnit v3 API Observations - `[Fact]` attribute is **identical** in xUnit v2 and v3 — no attribute changes required - No async/await patterns in architecture tests — no lifecycle changes needed - No `IClassFixture` / `ICollectionFixture` — stateless tests, no collection changes needed - FluentAssertions `.Should()` works unchanged with xUnit v3 - Parallelization via `xunit.runner.json` was already configured in Wave 1 (#182) ## Pattern Reference (Sprint 7 Domain.Tests Pilot) Followed the same approach as the Sprint 7 Domain.Tests migration: - xUnit v3 meta-package via `<PackageReference Include="xunit.v3"/>` ✅ (Wave 1) - `xunit.runner.json` with `parallelizeAssembly: true` ✅ (Wave 1) - Gimli Rule #3: AAA comments on all test methods ✅ (this PR) - Gimli Rule #6: File headers present on all files ✅ (pre-existing) ## Test Results ``` Passed! - Failed: 0, Passed: 11, Skipped: 0, Total: 11 — Architecture.Tests.dll Passed! - Failed: 0, Passed: 42, Skipped: 0, Total: 42 — Domain.Tests.dll ``` Zero failures. Ready to merge to `sprint/8-xunit-v3-pilot`. Co-authored-by: Boromir <boromir@squad.dev> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #176
Working as Boromir (DevOps Engineer)
Mirrors the Sprint 7 Domain.Tests xUnit v3 pilot by upgrading Architecture.Tests from xunit 2.x to xunit.v3 3.2.2.
Changes
tests/Architecture.Tests/Architecture.Tests.csproj<PackageReference Include="xunit"/>with<PackageReference Include="xunit.v3"/>(version 3.2.2 centralized inDirectory.Packages.props)<PackageReference Include="xunit.analyzers"/>(version 1.27.0 centralized)xunit.runner.jsonasContentitem (matching Domain.Tests pattern)tests/Architecture.Tests/xunit.runner.json— new file matching Domain.Tests Sprint 7 configurationSprint 7 Pilot Context
Directory.Packages.propsalready containedxunit.v3 3.2.2,xunit.v3.assert,xunit.v3.extensibility.core, andxunit.analyzers 1.27.0from the Sprint 7 Domain.Tests pilot. This PR wires up Architecture.Tests to use those centralized entries.NuGet Policy Compliance
✅ All versions remain in
Directory.Packages.props— no version pins in.csprojLocal Validation
dotnet build: ✅ 0 errorsdotnet test tests/Architecture.Tests: ✅ 11/11 passeddotnet test tests/Domain.Tests: ✅ 42/42 passed (pilot unaffected)